iosxcodedylib

Can you build dynamic libraries for iOS and load them at runtime?


Are dynamic libraries supported on iOS (iPhone/iPad)?

In Xcode, I tried to create a New project -> Framework & Library -> Cocoa Library (dynamic). In the project settings, I set the Base SDK to iOS device 4.1 and target to iOS4.1, but it has a build error:

target specifies product type 'com.apple.product-type.library.dynamic', but there's no such product type for the 'iphonesimulator' platform".

The build i selected is Simulator -> Debug -> i386.


Solution

  • At the time this question was asked, Dynamic libraries were not supported by iOS and will result in your app getting rejected. Only static libraries are allowed.

    However, in iOS8 you can use dynamic libraries and frameworks. It should "just work"