3

I'm creating a sdk in which I want to use all the functionality and 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.

anirudh
  • 49
  • 1
  • 5

2 Answers2

2

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.

Nitish
  • 13,845
  • 28
  • 135
  • 263
1

To convert an app to SDK/Framework.

  1. Create New Project With Cocoa Touch Framework.
  2. Convert Your all storyboards files to xib file, (because we cannot present SDK storyboards in Parent application).
  3. Copy yours all classes and import them in to yours 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.

  • 2
    Hi.. Thanks. But this didn't helped me. But I found a below link which helped me creating cocoa pod and converting my whole application into cocoa pod. [https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift] – anirudh Jun 03 '19 at 08:56