Creating the iOS Application
Create a new project which has Swift as the language.
Add a simple label and an outlet in the viewcontroller for the storyboard.
Creating the Framework
Click on your project and in the list of Targets select the + button to add a new target. Create a new target as a IOS -> Framework & Library -> Cocoa Touch Framework:
Set the Language to Objective-C:
Creating the C Code
Create a new file and select C File as the template.
Write a simple method and expose that in the simple.h header file:
Creating the Objective-C Bridge for Swift
Create a new file with Cocoa Class template and select NSObject as subclass. In the file add a method to get message:
Expose this class in the header file with OBJC_EXPORT:
This will allow us to use this from swift.
Also we need to open the inspector and…
View original post 203 more words