• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Migrating shared library plugins to Cocoa Touch Frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Fri, 02 Dec 2016 07:57:37 +0100

> On 2 Dec 2016, at 01:31, Jens Alfke <email@hidden> wrote:
>
>
>> On Dec 1, 2016, at 7:58 AM, Andreas Falkenhahn <email@hidden> wrote:
>>
>> My app supports external plugins. On macOS, Linux, and Windows those plugins
>> are just shared objects/dylibs (or DLLs) loaded via dlopen() (or LoadLibrary()
>> on Windows) at runtime.
>
> Does iOS still not support dlopen? I thought that, when iOS 8 granted the ability to load dynamic libraries, that dlopen would start working.

Yes, dlopen is supported in iOS 8 and following.
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

> What about the CFBundle API? Is that supported?
>
>> Now I'm looking for a way to port this design to iOS. The obvious choice seems
>> to be turning the individual plugins into individual Cocoa Touch Frameworks.
>> However, this results in the following big problem: The symbol names are the
>> same for every plugin, i.e. every plugin has a symbol named InitPlugin(), a
>> symbol named FreePlugin(), and so on.
>
> If you use frameworks then yes, you’ll have to rename the exported symbols in every plugin to be unique.

You don’t need to rename external symbols when you load a library dynamically.  In that case, each library has its own symbol table, and you can search for symbols of same name in different libraries, using the dlsym function.

—
__Pascal 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


  • Follow-Ups:
    • Re: Migrating shared library plugins to Cocoa Touch Frameworks
      • From: Andreas Falkenhahn <email@hidden>
References: 
 >Migrating shared library plugins to Cocoa Touch Frameworks (From: Andreas Falkenhahn <email@hidden>)
 >Re: Migrating shared library plugins to Cocoa Touch Frameworks (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Accessing the bundle of the call-site
  • Next by Date: Drag and drop on table view
  • Previous by thread: Re: Migrating shared library plugins to Cocoa Touch Frameworks
  • Next by thread: Re: Migrating shared library plugins to Cocoa Touch Frameworks
  • Index(es):
    • Date
    • Thread