5

My colleague and I are writing a software named hin2n-ios, which is an implementation of n2n (a peer to peer VPN software) on iOS platform. So it is inevitable to call or use the code of n2n.

the n2n software is under GPLv3. But I don't want to make our software ( main project at least ) under GPLv3 or open-source by some reasons. Is it possible ?

By the way, the hin2n-ios is almost developed.

6
  • Apple APP Store may refuse our software if we choose GPLv3. Which is a part of the reason why we want to make it source-closed.
    – gemini
    Oct 11, 2021 at 7:57
  • 7
    it is a misconception that apple rejects apps purely because they are released under the GPL. you can go ahead and use the correct license required by your third party components. Oct 11, 2021 at 17:42
  • 3
    Would you be okay with releasing your source code under either the Apache 2.0 or MIT license? Those licenses are both fine for the App Store, and doing so might make the n2n developers more likely to grant you an exception than they would if you insist on it being closed source. Oct 11, 2021 at 18:14
  • 3
    I've contacted author of n2n, Luca Deri, and he asked me which license will be acceptable by both Apple and us. It looks like MIT or Apache license is the choice.
    – gemini
    Oct 12, 2021 at 3:51
  • 2
    @gemini your overall program cannot be MIT or Apache if it contains GPL code. Your own code can be MIT or Apache, but that's not the actual program, is it? That's just one part of the program.
    – user253751
    Oct 12, 2021 at 8:52

2 Answers 2

18

Nearly no way if we talk GPL.

If you use GPLv3 code in your project or you use it for reference for a re-implementation or port, you are bound by the license. That's the point of a license: you are given permission to use the code on the conditions stated in the license. Without license you would not have legal access to use it at all.

If you call the n2n code via library calls or copy code from that project into your project, you are bound. If n2n offers a well-defined public API and operates as a separate programme, available separately and which you call, then you can interact with it via API and not be bound by its license (then it's a mere aggregation).

The implementation state of your software is insubstantial for this question as is a limitation by whatever app store - that's why you should consider licensing questions before you do any work so that you can possibly work around copyright issues, like choosing different libraries to rely on or implementing a library with a similar effect in a clean room re-implementation process.

Apple does a big dis-service to the community with its app store guidelines, but there is no legal way to put code exclusively GPL-licensed in Apple's app store (I tried. They flat-out refuse and removed it from the app store): It is problematic as the app store puts additional restrictions on the usage in its TOS which are not compatible with the GPL (see this summary by the FSF). You will have to get a license exceptions by the n2n authors - or re-implement a similar library without ever looking at the n2n code (cleanroom implementation) - a thing you probably cannot do anymore as you are aquainted with its code.

16
  • 16
    You probably can't, because people who use the GPL generally want to keep their software free. As planetmaker notes, this is an Apple-created problem, and not something anyone except them can fix. We can only encourage you to develop for less free-software-hostile platforms instead.
    – MadHatter
    Oct 11, 2021 at 9:25
  • 14
    @gemini: "Then how can I get a license exception by the n2n authors ?" – Ask them for one. Oct 11, 2021 at 16:25
  • 4
    Asking is the only way. But as you will need permission from ALL contributors... that will be exceedingly hard. On GitHub I count 45 unique contributors. So I believe the chance that they actually CAN give you one is very very slim. Oct 11, 2021 at 21:42
  • 5
    More than that, Apple can't permit it. Somebody tried it with Gnu GO long ago. Apple got served with a lawsuit demanding the signing key because they were distributing GPL v3 software that was hardware locked by a signing key.
    – Joshua
    Oct 12, 2021 at 1:15
  • 3
    @gnasher729 Where in the world did you get the idea that you can't charge for GPL'd software? Point to where that is stated in the license. Do you mean GPL clause 11? Otherwise, clarify what you mean, please. Oct 12, 2021 at 22:06
1

You have some very strong misconceptions about the AppStore.

Apple won't reject your app because it is opensourced (just add the open source license as your own license). BUT Apple will reject your app if one of the copyright holders complains. Including the copyright holders of the original open source code. That's not because there would be anything wrong with your app (only some expensive lawyers can decide that) but because Apple doesn't want to be involved in anything that could go to court.

If you publish your app as opensource, the copyright holders might complain. Or they might not complain. Whether they are right or wrong, I couldn't decide. However, if you publish NOT as opensource, then 1. they WILL complain and your app WILL disappear from the app store, and 2. If they sue you for copyright infringement, they will win.

In addition, note that you can't put opensource code on the AppStore for money. That's because Apple on one hand says that any payment is not for the app itself, but for the license to use it, and GPL on the other hand says that you can charge any amount for the app itself, and a reasonable amount for the source code, but you can NOT charge for the license. Therefore, any open source app on the app store must be free (as in free beer).

@Joshua: Nobody knows if Apple can or cannot permit it, but if a copyright holder complains (and the open source authors are usually copyright holders), then Apple will remove the app. So are you sure that a lawsuit actually happened? Note that for any open source app, you can demand the source code, and recompile it on your own computer, without needing any keys.

1
  • This would be better if you didn't assume that "GPL" licensed code was the only possible type of "open source" software. The wording here, particularly in your fourth paragraph, makes the assumption that GPL is the only thing that "open source" can be, which is blatantly false. The GPL is merely one, of many, licenses which are commonly used for open source software. The various licenses, of course, have different requirements. While the OP is, obviously, concerned about using GPL licensed code, the wording here goes too far in generalizing over all open source software.
    – Makyen
    Oct 13, 2021 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.