Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a swift project with storyboards and xibs into a custom sdk/framework

I'm creating a SDK in which I want to use all the functionality, storyboards and xibs of my Swift application. So that if I want import my application into some other application, then I can directly import my SDK into other application and access all the views and functionality in that. How can I achieve this? Please suggest me where I can find this.

like image 252
anirudh Avatar asked Nov 16 '25 22:11

anirudh


2 Answers

The best would be to copy the existing files -> VC + Storyboards + XIB's and paste them in the newly created SDK. That way you don't need to import one application into another, but import a SDK in all applications, including the one you have created.

like image 85
Nitish Avatar answered Nov 18 '25 11:11

Nitish


To convert an app to SDK/Framework.

  1. Create New Project With Cocoa Touch Framework.
  2. Convert all your storyboards files to xib file, (because we cannot present SDK storyboards in Parent application).
  3. Copy all your classes and import them in to your framework project.
  4. Made a Receiver Class YourSDKReceiver that will get all information from the Parent application and will notify/pass it to your SDK/Framework class and present it xib file into your Parent application.

Here is beautiful tutorial to do it. There is another tutorial.

like image 26
Muhammad Danish Qureshi Avatar answered Nov 18 '25 13:11

Muhammad Danish Qureshi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!