I'm writing an iPhone app, and I would like to use a 3rd party library for part of its functionality. I intend on selling it through the App Store and my code will not be open sourced. Which open source licenses allow to make derivate works and publish them under apple's own conditions ?
问题:
回答1:
In Short/TL;DR:
The LGPL and application stores have a few incompatibilities which means that you do not have the rights to distribute LGPL code on DRM-enabled AppStores or locked devices.
It is best if you look for alternative implementations of the library under other laxer licenses like the Apache 2 License, the Microsoft Public License or the MIT X11 License.
Longer:
The LGPL states:
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
The rights for statically linking LGPL code with proprietary code comes from section 6 of the LGPL. In addition to the rights granted that section deals with the requirements on your part towards downstream recipients of your code.
You should read this section in detail.
Conflicts between Pay-for-Development and the LGPL
Application Stores that require users to pay to enter the program and obtain key certificates, provisioning profiles and tools to deploy to the device are in direct contradiction with the LGPL.
The LGPL requires that the end user is able to fetch your object files plus the open source library (plus tools, see the section below) and produce some code that works. There is no room for having the downstream recipient have to enter a separate agreement with Apple, Microsoft, Amazon or Google to be able to deploy a working version of the code on his own hardware.
In particular this section is relevant:
You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
You do not need to give users the right to republish your application on an AppStore, but you need to give users the right to deploy your app with the modified version of the LGPL code on their own devices, so any developer program or device that requires extra payments to deploy is in conflict with the LGPL.
Distribution of Object Files
You must ensure that the terms of the resulting executable allow the recipient to make changes to the LGPL code and produce a new working bits of code out of it. This in practice means that you need to distribute the object files of your program so that a third party can relink your application with a modified version of the library, possible to fix bugs, improve it in some way, or provide their own features.
You could get away with this by posting the object files in your web site and providing a project so third parties can relink the application. Not doing so revokes your license to the LGPL.
Rights for Reverse Engineering
This is another requirement from Section 6.
This might be in direct conflict with the terms of various application stores, but you need to check the exact terms with the application store you are using (Apple, Amazon, Android or other third parties).
Notice and Advertisements
As part of the requirements for LGPL code, the application that is shipped to the downstream user must ship with the LGPL license and point to this license on any places of the application that display any copyright notices. Some application stores post this on the application store site, while others might have the copyright information on the executable itself.
Distribution of the Modified LGPL code
This is very easy to abide by, you just need to distribute the copy of the LGPL code on your web site (there are some extra details about this on the license about the length of time you need to keep the code available).
Requirements that you can not fulfill
One of the major problems with the LGPL and using static libraries in applications that are distributed through application stores is the requirement that you distribute the tools and scripts that are necessary for an end-user to rebuild the software.
For some embedded system scenarios, you would require the embedded system vendor to disclose his developer tools and APIs to any end users and this might not be possible. It is not clear if something like the iPhone or Windows SDKs can be freely redistributed to fulfill the obligations in this case, you might want to discuss with your lawyers and find out how comfortable you are with the exposure of the requirements.
What you can do
If you absolutely need to use some LGPL code in an appstore or an embedded system, you can always reach out to the original authors of the code and ask them to grant you a license to the code under different terms.
Alternatively, you can look for alternative implementations of the library under other laxer licenses like the Apache 2 License, the Microsoft Public License or the MIT X11 License.
回答2:
Regarding the LGPL, I believe that St3fan is incorrect, but Louis Gerbarg is correct: it is possible to use LGPL libraries in closed-source iPhone apps, but with restrictions.
If you take a look at http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License, you can read "Alternatively, a statically linked library is allowed if either source code or linkable object files are provided."
So as Louis Gerbarg mentioned, if you use an LGPL library, you are allowed to keep your application closed-source as long as you make freely available the object (e.g. *.o) files that are needed for your customers to take your application and link it.
I go in depth into the subject of iPhone and LGPL compatibility here.
Detailed requirements on your app imposed by the LGPL license of the library:
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
回答3:
I don't think LGPL will work for iPhone applications.
The problem is that the iPhone runtime does not allow you to bundle shared libraries (or frameworks) with your app. Only single binary applications are allowed. The LGPL is based on the assumption that you bundle a shared library with an application. Direct linking is still forbidden.
回答4:
The Apple App Store is incompatible with the FSF's copyleft idea which is present in all versions of both the GPL and LGPL, and also the Affero GPL. The Apple App Store does not let users take Free Software, modify it, then run it on their own devices freely. They require you to use DRM, pay $100 a year, to agree to their additional terms, etc. There is a pretty good write up of this here: http://michelf.com/weblog/2011/gpl-ios-app-store/
It is completely legal to distribute GPL/LGPL software for iOS outside of the App Store, the problem lies with the Apple App Store. So I recommend lobbying Apple to change their restrictions. Mac OS X and iOS even fundamentally rely on GPL/LGPL software (e.g. gcc and many more), so Apple is enjoying the freedom yet it is denying its users the same freedom.
As for licenses that the App Store is compatible with, you will need to go with the very permissive licenses like BSD, MIT, Apache, or public domain.
回答5:
This is not legal advice, I am not a lawyer, but it sounds like you need a library with a BSD or Apache license. That would be the case if you were developing a proprietary desktop program that used an open source library. I don't know if Apple has any further restrictions for iPhone apps.
回答6:
(I am not a lawyer.)
Static object file linking may address the question of how to allow an app which uses LGPL licensed code to be made available without distributing the non-LGPL'd portions of its source code.
But it seems like LGPL, as a variant on GPL, imposes a larger insurmountable problem for iPhone app development in that the development tools needed to create and distribute any iPhone app are only available under terms from Apple that are incompatible with GPL. ie. There is a $100/year fee, and there are numerous terms and conditions on the use of those tools that are not part of the GPL license. The terms of the license for Apple's iPhone developer tools seem to be incompatible with the spirit of and perhaps also the letter of GPL.
回答7:
If you're not releasing your source code, you can't use any strict copyleft license. You can't use any GPLv3-based license in any case, since the iPhone distribution conflicts with the no-Tivoization clause.
If you're using LGPLv2, you'll have to provide your program in linkable format, which may or may not be acceptable (at least it's not source code), and this is likely to be something you don't want to deal with, unless the library offers a lot of benefit.
If there's one copyright holder on the library, you can always see if you can get a license exception.
You won't have any problem with the typical BSD/MIT/Boost/whatever permissive licenses. There are a lot of Open Source/Free Software licenses out there, and for the rest you'll have to read them and see.
回答8:
When I try to port Fuego onto iPhone, I asked a similar question on the fuego mailing list. So far, my understanding is "LGPL is not compatible with AppStore". A previous question also receives an answer as: no.
回答9:
A good example is Wunderradio. They use ffmpeg and other LGPLv2 licensed frameworks, and provide the .o files on their website.
Strangely, they also provide full source code for their app.
http://wunderradio.com/code.html
回答10:
The folks who maintain that the App Store terms of service are problematic, in particular the $100 yearly Apple Dev program fee, are wrong. That $100 is not even close to a showstopper. It is typical of developers that they spend so much time worrying about these type of things ;0) Lawyers have been stick-handling around contract provisions for thousands of years and these are hardly worth losing any sleep over.
Prerequisite: Provide the object files and a basic project file from a web location accessible via a link in the app.
Option 1, for cowboys: Jailbreaking is officially legal (and free). That alone voids any concerns over compatibility between LGPL and the App Store terms. Where does the LPGL specify a particular distribution channel? Nowhere. You want to upgrade a statically linked library in an app you downloaded via the app store? Suck it up, alpha dev and jailbreak your phone! Just because Apple is a bully in the playground doesn't force you stay on their merry-go-round. Enterprising developers can thereby receive valuable bragging rights at the next meetup. Plus the fact that you jailbroke your phone in order to upgrade an LPGL library gives you access to the keg room in Richard Stallman's basement!
Option 2 for getting around it legally, and in good faith: Section 1 of LGPL v2.1 (and section 4 of the GPL v3) allows developer to charge a fee for the physical act of copying the library. This provides a mechanism for the developer to re-assign that fee towards the $99 Apple Dev subscription fee.
What about the 100 device limit? End users who wish to upgrade their binary are upgrading a commercial application, so the app developer's own license terms come into play. It is trivial to add a 100 device limit to a custom license agreement. How many people own more than 100 iOS devices? Even Jobs didn't own that many! It's hardly an unreasonable limit. Given that there's no requirement that an end-user be allowed to release their own modified version of the original commercial app into the wild, there will be no basis for complaints when it fails to load on the device of the modifier's 101st friend.
There is no requirement in the LGPL that the end user has to have a comfy, risk-free, or even obvious choice. They just have to have a choice, and there's 2 perfectly good ones.