Re: Migrating shared library plugins to Cocoa Touch Frameworks
Re: Migrating shared library plugins to Cocoa Touch Frameworks
- Subject: Re: Migrating shared library plugins to Cocoa Touch Frameworks
- From: Pascal Bourguignon <email@hidden>
- Date: Sat, 03 Dec 2016 01:37:01 +0100
> On 3 Dec 2016, at 00:40, Jens Alfke <email@hidden> wrote:
>
>
>> On Dec 2, 2016, at 2:17 PM, Andreas Falkenhahn <email@hidden <mailto:email@hidden>> wrote:
>>
>> Well, just because apps that use undocumented features aren't rejected from the
>> app store doesn't make it official for me.
>
> dlopen is hardly undocumented; it’s part of the core BSD Unix library. It’s got a man page and everything.
>
> Prior to iOS 8, the sandbox that 3rd party iOS apps ran in blocked calls to dlopen, as well as other attempts to load dynamic libraries from within the app bundle. That is now no longer the case, so you can use dlopen, dynamic frameworks, etc.
>
>> Also, there is no "Library" template for iOS in Xcode. Only a Cocoa Touch
>> Framework template. This also doesn't look like dlopen() is officially
>> supported on iOS.
>
> That’s sort of weird; however, a framework is just a dynamic library packaged with its headers in a specific bundle format. You can always use a framework target and then add a script build step to copy the library out of the framework.
>
> I think the lack of a dylib target may just reflect that plug-ins of the kind you’re implementing aren’t really very useful on iOS. Since there’s no way to install extra plugins (downloading executable code is explicitly forbidden), the set of plugins is effectively fixed, meaning it would be more efficient to just statically link them all into the app.
The reason is rather you need to provide a code signature along with the dylib, hence the use of a framework bundle instead of a standalone .dylib.
--
__Pascal J. Bourguignon__
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden