There is a number of questions (some of them with answers) about creating custom dynamic frameworks for iOS. My practical experiance shows that on iPad2 and iPad3 one can use custom dynamic frameworks and it works. On iPad1 it doesn't work. So my question is. Did it become possible to use dynamic frameworks on new versions of iOS?
-
You mean frameworks for which the bundle executable is a dynamic library as opposed to a static one? – Oct 16 '12 at 15:25
-
exactly. I mean such kind of frameworks – bsa2000 Oct 17 '12 at 02:17
1 Answers
Apple doesn't allow you to create your own dynamic frameworks for the iOS platform. There is however a way to package up your static library and using in a similar way as a framework.
Did you see this post?
I particular check out this GitHub repo, this is what I used to get up and running, very simple explanations: https://github.com/jverkoey/iOS-Framework
Basically you will create a static library and create multiple targets for each platform - simulator and device and one last target which I usually call "build and merge", this target has a script that takes the resulting libraries for device and simulator, and packages them up in a folder called xxxxxx.framework, inside is the standard structure and it contains your static libs, when you use this in other projects you import the framework to that project and include the header files like you would any other real dylib framework.
-
ok. But what about the fact that under iOS 5.1 on iPad2 and iPad3 I was able to run a simple "Hello World" application linked to a custom dynamic framework? Maybe Apple changed its policy concerning such kind of frameworks? – bsa2000 Oct 17 '12 at 02:19
-
Because it wasn't a dynamic framework, it was a static library packaged up as a framework. I bet you. Send me a link but Apple don't allow you to make dynamic frameworks. – Daniel Oct 17 '12 at 02:20
-
:). It wasn't a static framework!!! I'm sure, because it was me who built it! And it was built as a dynamic library packed to a framework bundle. However, thank you very much for links above. I didn't see them before. They are very helpful. I'm going to use static library. This post was caused by a surprising fact that I can use dynamic framework on iOS5.1! And I just wanted to check if anyone else have had such experience :) – bsa2000 Oct 17 '12 at 02:30
-
Interesting... Maybe things have changed. So you created a dynamic framework... But did you get to the App Store with it? I think possibly the rule applies that Apple would refuse this being used? – Daniel Oct 17 '12 at 02:33
-
Did you see this link also? http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ – Daniel Oct 17 '12 at 02:36
-
1May be you are right. Because I didn't try to upload it App Store. This link is not less helpful as previous. Thanks! I will continue with static libs. Unfortunately, dynamic libs will remain just a fun experience. – bsa2000 Oct 17 '12 at 02:37