I am have two existing projects. One I have written in ObjC and the other in Swift following along from online tutorials.
I would like to know how I can import the entire ObjC project into my Swift project.
Can this be easily done?
I am have two existing projects. One I have written in ObjC and the other in Swift following along from online tutorials.
I would like to know how I can import the entire ObjC project into my Swift project.
Can this be easily done?
Swift’s compatibility with Objective-C lets you create a project that contains files written in either language. You can use this feature, called mix and match, to write apps that have a mixed-language codebase. Using mix and match, you can implement part of your app’s functionality using the latest Swift features and seamlessly incorporate it back into your existing Objective-C codebase
Checkout this reference from Apple of how to import your Objective-C files into your Swift project.
The most important thing is the bridging header, checkout the reference above and follow the steps.
It depends what you mean by easy, is there a one-click solution? No. But you can drag all of your Obj-c stuff into your swift project and use it no problem though. You just need to set up a bridging header. (for storyboards and nibs you may need to reconnect some stuff)
If you are talking about using it as a framework then that is a seperate story.