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

1.1k views Asked by At

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.

2

There are 2 answers

0
Nitish On

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.

1
Muhammad Danish Qureshi On

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.