在Linux和Windows(WSL)上构建iOS应用
Build iOS Apps on Linux and Windows

原始链接: https://forums.swift.org/t/xtool-cross-platform-xcode-replacement-build-ios-apps-on-linux-and-more/79803

苹果开发者计划许可协议将iOS应用开发限制在苹果品牌的硬件产品上。主要条款包括: * **许可用途:** 开发和测试必须在苹果硬件上进行。 * **限制:** 禁止租赁、转租、再分发或将软件用于未经许可的目的。 * **硬件锁定:** 明确禁止在非苹果硬件上运行iOS SDK、操作系统或配置文件。 * **反向工程:** 通常禁止反编译、反向工程或创建衍生作品,但兼容性或开源组件除外,有限制性例外。 虽然像*甲骨文诉谷歌*这样的法律先例改变了反向工程用于兼容性的格局,但许可协议中的限制似乎非常严格。考虑到苹果公司在执行其开发者协议方面的强大力量,正如*Epic Games诉苹果*案所强调的那样,将非苹果生态系统中开发的应用部署到App Store可能会导致账户终止。因此,在非苹果硬件上开发iOS应用是一项存在法律风险的尝试。

Hacker News 上热议在 Linux 和 Windows 上开发 iOS 应用的可能性,起因是 `swift.org` 的最新公告。用户们对无需苹果硬件就能开发 iOS 应用的前景感到兴奋。 一些评论者提到了使用 AltStore、SideStore 和 CodeMagic 等工具在其他平台上构建 iOS 应用。渐进式网页应用 (PWA) 也被提及作为一个替代方案,尽管它们在 UI 打磨方面不如原生应用。 讨论还涉及到苹果封闭的生态系统及其偏好开发者使用 Mac 的原因,一些人认为反垄断压力可能会改变这一现状。一些用户推测史蒂夫·乔布斯对苹果独特做法的影响。 通过 Docker 运行 macOS 虚拟机以及使用 GitHub Actions 等云构建服务也被提及为应对苹果硬件限制的潜在解决方法。一位用户还提到了 Project Sandcastle 项目,该项目旨在在 iPhone 上运行 Android 系统。

原文

My understanding has always been that building iOS apps on other OSes is more of a legal/licensing challenge than a technical one. For example, quoting from the Apple Developer Program License Agreement:

2.1 Permitted Uses and Restrictions; Program Services

Subject to the terms and conditions of this Agreement, Apple hereby grants You during the Term, a limited, non-exclusive, personal, revocable, non-sublicensable and non-transferable license to:

  1. Install a reasonable number of copies of the Apple Software provided to You under the Program on Apple-branded products owned or controlled by You, to be used internally by You or Your Authorized Developers for the sole purpose of developing or testing Covered Products designed to operate on the applicable Apple-branded products, except as otherwise expressly permitted in this Agreement;

2.6 No Other Permitted Uses

Except as otherwise set forth in this Agreement, You agree not to rent, lease, lend, upload to or host on any website or server, sell, redistribute, or sublicense the Apple Software, Apple Certificates, or any Services, in whole or in part, or to enable others to do so. You may not use the Apple Software, Apple Certificates, or any Services provided hereunder for any purpose not expressly permitted by this Agreement, including any applicable Attachments and Schedules. You agree not to install, use or run the Apple SDKs on any non-Apple-branded computer, and not to install, use or run iOS, iPadOS, macOS, tvOS, visionOS, watchOS, and Provisioning Profiles on or in connection with devices other than Apple-branded products, or to enable others to do so. You may not and You agree not to, or to enable others to, copy (except as expressly permitted under this Agreement), decompile, reverse engineer, disassemble, attempt to derive the source code of, modify, decrypt, or create derivative works of the Apple Software, Apple Certificates or any Services provided by the Apple Software or otherwise provided hereunder, or any part thereof (except as and only to the extent any foregoing restriction is prohibited by applicable law or to the extent as may be permitted by licensing terms governing use of open-sourced components or sample code included with the Apple Software).

Now, I am not a lawyer, so I can't give a very informed opinion about whether this falls within the permitted use or whether these terms are even enforceable. I am aware that the copyright situation with regard to reverse engineering for compatibility has changed recently (see Oracle vs Google), but I'm not sure to what extent that affects the terms in the license agreement.

At the very least, I can say that it seems risky, and certainly if you do deploy directly to the AppStore (as it is suggested is coming) I would not be surprised if you were found to be in violation of the agreement. Again, not a lawyer, but my understanding of the Epic Games vs Apple case is that Apple has pretty wide latitude to terminate developer accounts.

Can you comment on this? I assume you know better than I do. What's your understanding of the licensing issue?

联系我们 contact @ memedata.com