apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

Cross-platform support #1286

Closed buu700 closed 1 year ago

buu700 commented 1 year ago

Feature Request

Motivation Behind Feature

Cross-platform support would allow building iOS apps from Linux build servers, CI, etc.

Feature Description

Rather than depending on macOS/Xcode, it would be preferable if Cordova could compile the package without that (not sure if this is feasible) and handle signing using apple-codesign.

Alternatives or Workarounds

N/A

Related issue: https://github.com/apache/cordova-electron/issues/250

breautek commented 1 year ago

I do not think this is feasible. Cordova heavily depends on xcodebuild and other xcode command line tools for one, which is simply not available on platforms outside of Macs.

And while some could create a cross toolchain using something like cctools to get AppleClang and the iOS SDK and build on non-macs (and I've done this for educational reasons), it is legally questionable if that is even allowed by Apple terms. It's also not explicitly supported by Apple.

If Apple wants to support build systems on non macs, they would provide the tools to do so.

So I'd have to give a :-1:

buu700 commented 1 year ago

Makes sense, thanks for the quick response!

breautek commented 1 year ago

Also: https://www.apple.com/legal/sla/docs/xcode.pdf

states

Install a reasonable number of copies of the Apple Software on Apple-branded computers that are owned or controlled by You to be used internally by You or Your Authorized Developers only as follows:

Apple Software is defined as

Apple Software” means the Xcode Developer Tools and the Apple SDKs, including any Updates thereto (if any) that may be provided to You by Apple.

And Apple SDKs is defined as:

“Apple SDKs” means the macOS SDK, and the Apple-proprietary Software Development Kits (SDKs) provided hereunder, including but not limited to header files, APIs, libraries, simulators, and software (source code and object code) labeled as part of the iOS SDK, watchOS SDK, iPadOS SDK, and/or tvOS SDK and included in the Xcode Developer Tools package for purposes of targeting Apple-branded products running iOS, watchOS, iPadOS, or tvOS.

I'm not a lawyer, but it's pretty clear that running or using the iOS or Mac SDK is indeed against the terms of use of their software if not running on "Apple-brand" hardware.

This is a legal loophole but it essentially means you need a mac. However, technically you could have a Mac, that is running linux, and legally be allowed to use the software since the linux OS is running on Apple-brand hardware. But if I think realistically most people with apple-brand hardware are indeed running MacOS.

jcesarmobile commented 1 year ago

closing as won't do because of the reasons breautek gave