I've running project and its really gigantic, it contain almost 1000 files and 4 Custom (own built) framework and almost 10 others added via Pods. I've gone through Migrating Your Objective-C Code to Swift and also Migrate with Swiftify.
I started to converting each file one by one as Apple suggest but first Conversion isn't successfully done by Swiftify and also dependency issues.
So at this position its looks like that I start walking in Sahara Desert, where I can't see any end point.
So I need some suggestion how to convert to Swift this kinda huge scale project?
The process of Migrating Objective-C code to Swift. The most effectual approach to convert a full Objective-C app to Swift is, to begin with, one class at a time, especially a class without any subclass since you can’t subclass Swift classes in Obj-C.
Unlike that in the case of Objective-C, code written in Swift can be compiled and the errors can be fixed, along with the code writing part. Hence, Swift act better and faster in the testing process, when compared to the process of testing the Objective-C code.
The feature of interoperability enables to integrated converted iOS code back to Objective-C without any hassle, which implies you can explore the myriad of options that Swift offers and then, integrate it back into your Obj-C project without rewriting everything at once. It is always better, to begin with the latest Obj-C code.
Swift is an open-source language and the swift code can be portable on many more platforms than Objective-C was ever. Swift for iOS development is a static-typed language which works with LLVM compiler and can reuse the existing code, eradicate unused resources, manage inline functions, and so on.
I recently converted SVProgressHUD to swift using Swiftify. The converted code can be found at here.
The major takeaways would be:
The detailed conversion strategy can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With