Step 1: Make sure you have latest version of Xcode (Recommended Xcode 11 & newer). You can use "Swift + Objective-C" as of now to make your app running smoothly and also giving updates regularly rather than waiting for the months to convert it completely.You may end-up having clean code under proper structure. You may find some unusual code or libraries lying around.Andreas Oetjen Suggestion: You might start by separating the class hierarchy, and convert one "subtree" after the other.Besides, you can also build modules from scratch in the form of smaller projects and then just drag and drop in Objective-C project.Once you are done with smaller ones, slowly start picking up big modules also you may find open source Swift libraries which are in Objective-C in your project.Reference: How can I import Swift code to Objective-C? From your project, first of all start picking up smaller modules which don't affect app in any way and see that the "Swift" file works well with Objective-C (Your old code). Rather than start converting complete project, adapt modular way.Pick the latest version of Swift (i.e.So what I suggest you to go via following way: The biggest problem is that Swift is still evolving and probably next year we might see "Swift 5.0". Your approach of converting Objective-C to Swift is wrong! Apple also took time to adopt Swift completely in their frameworks and the news is in 2018, 85% of the frameworks are converted to Swift, so the point is they has also taken nearly 3 years to get it done!
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |