Kodeco Forums

How to Create a Framework for iOS

Learn how to create a framework for iOS, allowing you to elegantly and efficiently package up and redistribute your code across different apps and teams


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/2430-how-to-create-a-framework-for-ios

Hi i done this tutorial successfully.
My Issue: Now i want to Create another framework say “Test.Framework” in which “RWUIControls.framework” will be sub-framework (In short nested framework ) in which i should able to access “RWUIControls.framework” methods through “Test.Framework”

Hi,

I don’t really understand what you mean. However, I’ll also suggest that you should check that you definitely want to create a old-style pseudo-framework. iOS 8 introduced the ability to create proper dynamic frameworks, and we’ll have a tutorial on how to use them in the near future.

sam

hi. I made this testApp / framework after reading this tutorial… trying to go to the next step…
https://github.com/nissaba/workSpaceTest---Example.git
and like many many people I am running in the dreaded error: dyld: Library not loaded: … Reason: no suitable image found.

It would be grate to have some advance tutorial. Thanks

Hi nissaba,

As I mentioned before, there will be a tutorial very soon (keep checking the site over the next couple of weeks) which explains how to create a modern, dynamic framework. That may well solve the issues you’re seeing.

sam

I hope by now you would have already added your framework to the project.
It doesnt end here, you need to link it in the embedded libraries.
To do this, click on the project from the left panel, you will see tabs like, General, Build Settings etc.
Drag and drop you framework to Embedded Binaries.
And you will not get this error.

Hi I am also looking for same. on searching I am getting links for : How to create an umbrella framework in iOS SDK
Did you get the solution of your problem. if yes pls share the same.

Hi, I have a Cocoa touch static and o want him To receive remote notification. It’s possible?

(It’s an Chat(static library) inside the other App)

Hi @fernandadrm

Remote notifications are delivered to apps through the app delegate, and so there’s no way to register that a static library should receive remote notifications directly. Instead, you’d have to provide a public method to handle remote notifications, and request that the person using your library call it from the appropriate app delegate method.

That would then involve that app setting up and sending remote notifications. There is no way for you as a library developer to send remote notifications to your library alongside the notifications that go to the app. An app can only receive remote notifications registered, signed and sent by the app developer.

Hope that clears it up a bit.

sam

Hi all,

You should check out the dynamic framework approach to this same problem, either in screencast form [subscribers only]:

https://videos.raywenderlich.com/screencasts/creating-a-framework

Or written form:

https://www.raywenderlich.com/126365/ios-frameworks-tutorial

sam

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]