views:

1124

answers:

5

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 this?

+3  A: 

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.

Ryan Ahearn
LGPL will impose additionally restrictions. Since the phone does not support dynamic linking, and the LGPL requires you be able to substituted in modified copies of the code you will need to provide a partially built copy of the app someone can use to relink against modified version of the lib.
Louis Gerbarg
Thanks for the clarification, I removed the suggestion to try LGPL from my answer.
Ryan Ahearn
+3  A: 

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.

St3fan
+5  A: 

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%5FLesser%5FGeneral%5FPublic%5FLicense, 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.

Huy Zing
There are a number of apps currently using LGPL libraries (ffmpeg, among others) on the app store now. Regardless of legality, people are doing it.
Kenny Winker
Apple won't care (it's not their job to police this), but the developers of ffmpeg can assert their rights at any time. It's a risk.
Lou Franco
The developers of ffmpeg don't consider use on iPhone to be a violation of the license.
alex strange
A: 

(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.

Richard Lawler
+1  A: 

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.

David Thornley