How to create a framework structure like the one used in the book

I’ve been an iOS developer for 2 years but I’ve honestly never created frameworks before.

I really like the way the project of the book is structured with ‘Koober’ as the slim app and ‘Koober_iOS’, ‘KooberUIKit’ and ‘KooberKit’ as frameworks with their own separated code. However, I was wondering how I could build something like this on my own. All of those frameworks show the usual directory icon not this framework icon. Does that mean they are included differently? Can I create them directly inside my app and work on them at the same time as I work on the app itself?

A short answer with a step-by-step guide would be very appreciated! Thanks for writing such a great book! Can’t wait for all chapters to be released.

Thanks in advance.

@brudus Thanks very much for your question!

It just so happens that we recently released a tutorial on that very topic!

Here is the link :slight_smile:

I hope this helps!

All the best!

@syedfa Thanks, I will check that out!

@brudus Anytime! I hope it helps!

I believe the setup is not exactly as the one in tutorial @syedfa mention. You need to add new targets to the project, not new projects. I’m trying to make the same setup with cocoapods but I’m having some issues. I was wondering if you could provide like a sample of a Podfile so I can achieve the same result with cocoapods.

@jab2109 @rcach Can you please help with this when you get a chance? Thank you - much appreciated!

Hi @itspecialists, here’s a version of Koober (KooberPods.zip (2.0 MB)
) that is setup with Cococapods. Each target is a development pod. To create this:

  • I created the Xcode project for the app target, then I ran pod init to create the Podfile for the app.
  • Afterwards, I ran pod lib create [pod name] for KooberKit, KooberUIKit and Koober_iOS.
  • I added all the 3rd party dependencies to each podspec file for KooberKit, KooberUIKit and Koober_iOS.
  • The last step was to add these development pods to the app’s Podfile.

Hope this helps. If anything doesn’t work or if you have any questions please feel free to reach out.

Cheers,
Rene

2 Likes

Thank you so much @rcach. I really appreciate it. And congrats for the awesome book you’ve writing.

I’m sure I’ll help a lot of people.

Regards,

1 Like

I tried but I don’t see them like your structure. Can you explain the steps?

@dangtrunganh Do you still have issues with this?