> On 2 Dec 2016, at 15:37, Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
> 
> On 02.12.2016 at 07:57 Pascal Bourguignon wrote:
> 
>> Yes, dlopen is supported in iOS 8 and following.
> 
> Is this support official or does it just work by chance and might stop 
> working in the
> future? I've tried to find an official word from Apple concerning dlopen() on 
> iOS
> but I haven't been successful so far. Is there one? 

Yes, it’s “official”.
I’ve read the document about what is allowed and rejected for the AppStore, and 
this is not rejected.


> 
>> But of course, you can only open and link with libraries that have been code 
>> signed properly.
>> We use dlopen to load at run-time frameworks properly code signed
>> and included in the application bundle
> 
> So how does that work in practice? Should I create a Cocoa Touch Framework, 
> code sign
> it, include it in the "Embedded binaries" section in Xcode in my project and 
> select
> "Optional" for that framework in the "Linked frameworks and Libraries" 
> section in
> Xcode and then just use dlopen() on the framework's executable as listed in 
> the
> frameworks Info.plist? 

http://framemywork.blogspot.fr/2015/01/ios-8-app-extensions-dlopen-loading.html 
<http://framemywork.blogspot.fr/2015/01/ios-8-app-extensions-dlopen-loading.html>

You would just embed the framework, without linking it.


> I can imagine that this works but once again the question is whether or not
> Apple officially supports directly dlopen()ing a framework executable? If they
> do, that would be great but if this is something that just happens to work 
> right
> now but might not do so in future versions I'd rather do it in a more 
> conventional
> way.


dlopen wasn’t available before iOS 7. It wasn’t officially supported in iOS 7, 
only from iOS 8 (when Xcode started to provide a iOS framework  template).

There are applications published in the AppStore that use dlopen.


Now, the framework must be code signed and packaged with your application, so 
this doesn’t concern third-party plug-ins, or anything you’d download from the 
internet.

On the other hand, in iOS 9 they started to allow modular downloading of 
applications in the AppStore: you can install eg. a game with the first levels, 
and only download and install further levels modularly once the previous ones 
are completed; 

http://ddeville.me/2014/04/dynamic-linking 
<http://ddeville.me/2014/04/dynamic-linking>


-- 
__Pascal J. Bourguignon__



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to