Re: LGPL code in the Mac App Store?
Re: LGPL code in the Mac App Store?
- Subject: Re: LGPL code in the Mac App Store?
- From: Jens Alfke <email@hidden>
- Date: Tue, 26 Jan 2016 12:31:15 -0800
> On Jan 26, 2016, at 11:23 AM, email@hidden wrote:
>
> I’m working on a program that I will be submitting to the Mac App Store that uses LGPL code. I have recently learned that the license requires the capability for the end user to create their own version of the LGPL library to link against the application (I have been compiling the source directly into the library). This means at run time I need to either load the library from what I provide in the application bundle (default, obviously), or, if present, load one that the user provides. I can imagine wrapping the library in a framework could be an answer.
Yes, the usual solution is to build the LGPL code as a shared library (either a framework or just a dylib) and embed it in the app.
> It would be up to the user to build a framework in the correct format (I could easily make an Xcode project to do so available on GitHub).
I don’t think you’re required to do this. As long as the entry points (exported symbols) of the dylib correspond to the public API of the library, building an equivalent library from the LGPL source is straightforward and can be "left as an exercise for the reader” as they say in textbooks.
> Is this possible/allowed for an App Store application?
The only issues I can think of are with code signing. Changing the framework inside the app bundle will invalidate the app’s signature. But I’m pretty sure you can just strip all signatures from the app using the codesign tool, and then run it.
> How would I load the library at runtime given that I normally link against it when I build the application?
You’re still linking against the library at build time. But it’s a dynamic library, so it gets loaded at runtime. The build steps are the same as those when you integrate a 3rd party framework (like, say, Sparkle) into your app. Add the framework to your app’s link build phase, and add a copy-files build phase to copy the framework into the app’s Frameworks subdirectory.
—Jens
_______________________________________________
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