Xcode
Xcode 是一个完整的开发者工具集,用于为 Mac、iPhone、iPad、Apple Watch 和 Apple TV 创建 App。对于用户界面设计、编码、测试、调试以及提交到 App Store 这些操作,Xcode 将它们集成到了一个统一的工作流程中。
下载和更新 Xcode
Mac App Store 提供 Xcode 最新版本的免费下载。Mac App Store 会在有可用更新时通知你;或者你也可以让 macOS 在有可用更新时自动执行更新。
Xcode 的最新 Beta 版本和较旧版本可从下载页面 下载。要下载 Xcode,使用你的 Apple 账户登录即可。无需 Apple Developer Program 会员资格。
了解 Xcode
有关如何使用 Xcode 来构建、测试 App 并提交到 App Store 的分步指导,请查看 Xcode 文档。你还可以了解 Xcode 的最新特性和功能。如需详细了解最新发布版本 (包括每个 Beta 版本),请查看 Xcode 发布说明。
将 App 提交至 App Store
Xcode 为 Apple Developer Program 成员提供了一个集成式工作流程,帮助你准备 App 并将它提交到 App Store。要提交你的 App,请使用 Mac App Store 上提供的最新版 Xcode,或使用下载页面 上的最新发布候选版本 (如有)。
最低要求和支持的 SDK
Xcode 版本 | 要求的最低 OS 版本 | SDK | 架构 | 部署目标 | 模拟器 | Swift |
---|---|---|---|---|---|---|
Xcode 16.2 beta | macOS Sonoma 14.5 | iOS 18.2 macOS 15.2 tvOS 18.1 watchOS 11.1 visionOS 2.1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 13-18.2 iPadOS 13-18.2 macOS 10.13-15.2 tvOS 13-18.1 watchOS 4-11.1 DriverKit 19-24.2 visionOS 1-2.1 |
iOS 15-18.2 tvOS 15-18.1 watchOS 8-11.1 visionOS 1-2.1 |
Swift 4 Swift 4.2 Swift 5.10 Swift 6 |
Xcode 16.1 | macOS Sonoma 14.5 | iOS 18.1 macOS 15.1 Apple tvOS 18 watchOS 11 visionOS 2 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 13-18.1 iPadOS 13-18.1 macOS 10.13-15.1 Apple tvOS 13-18 watchOS 4-11 DriverKit 19-24.1 visionOS 1-2 |
iOS 15-18.1 Apple tvOS 15-18 watchOS 8-11 visionOS 1-2 |
Swift 4 Swift 4.2 Swift 5.10 Swift 6 |
Xcode 16 | macOS Sonoma 14.5 | iOS 18 macOS 15 Apple tvOS 18 watchOS 11 DriverKit 24 visionOS 2 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-18 iPadOS 13-18 macOS 10.13-15 Apple tvOS 12-18 watchOS 4-11 DriverKit 19-24 visionOS 1-2 |
iOS 15-18 Apple tvOS 15-18 watchOS 8-11 visionOS 1-2 |
Swift 4 Swift 4.2 Swift 5.10 Swift 6 |
Xcode 15.4 | macOS Sonoma 14 | iOS 17.5 macOS 14.5 Apple tvOS 17.5 watchOS 10.5 DriverKit 23.5 visionOS 1.2 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17.5 iPadOS 13-17.5 macOS 10.13-14.5 Apple tvOS 12-17.5 watchOS 4-10.5 DriverKit 19-23.5 visionOS 1-1.2 |
iOS 15-17.5 Apple tvOS 15-17.5 watchOS 8-10.5 visionOS 1-1.2 |
Swift 4 Swift 4.2 Swift 5.10 |
Xcode 15.3 | macOS Sonoma 14 | iOS 17.4 macOS 14.4 Apple tvOS 17.4 watchOS 10.4 DriverKit 23.4 visionOS 1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17.4 iPadOS 13-17.4 macOS 10.13-14.4 Apple tvOS 12-17.4 watchOS 4-10.4 DriverKit 19-23.4 visionOS 1 |
iOS 15-17.4 Apple tvOS 15-17.4 watchOS 8-10.4 visionOS 1 |
Swift 4 Swift 4.2 Swift 5.10 |
Xcode 15.2 | macOS Ventura 13.5 | iOS 17.2 macOS 14.2 Apple tvOS 17.2 watchOS 10.2 DriverKit 23.2 visionOS 1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17.2 iPadOS 13-17.2 macOS 10.13-14.2 Apple tvOS 12-17.2 watchOS 4-10.2 DriverKit 19-23.2 visionOS 1 |
iOS 15-17.2 Apple tvOS 15-17.2 watchOS 8-10.2 visionOS 1 |
Swift 4 Swift 4.2 Swift 5.9 |
Xcode 15.1** | macOS Ventura 13.5 | iOS 17.2 macOS 14.2 Apple tvOS 17.2 watchOS 10.2 DriverKit 23.2 visionOS 1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17.2 iPadOS 13-17.2 macOS 10.13-14.2 Apple tvOS 12-17.2 watchOS 4-10.2 DriverKit 19-23.2 visionOS 1 |
iOS 15-17.2 Apple tvOS 15-17.2 watchOS 8-10.2 visionOS 1 |
Swift 4 Swift 4.2 Swift 5.9 |
Xcode 15 beta 8 | macOS Ventura 13.4 | iOS 17 macOS 14 Apple tvOS 17 watchOS 10 DriverKit 23 visionOS 1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17 iPadOS 13-17 macOS 10.13-14 Apple tvOS 12-17 watchOS 4-10 DriverKit 19-23 visionOS 1 |
iOS 14.0.1-17 Apple tvOS 14-17 watchOS 7-10 visionOS 1 |
Swift 4 Swift 4.2 Swift 5.9 |
Xcode 15.0.x | macOS Ventura 13.5 | iOS 17 macOS 14 Apple tvOS 17 watchOS 10 DriverKit 23 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 12-17 iPadOS 13-17 macOS 10.13-14 Apple tvOS 12-17 watchOS 4-10 DriverKit 19-23 |
iOS 14.0.1-17 Apple tvOS 14-17 watchOS 7-10 |
Swift 4 Swift 4.2 Swift 5.9 |
Xcode 14.3.1 | macOS Ventura 13 | iOS 16.4 macOS 13.3 Apple tvOS 16.4 watchOS 9.4 DriverKit 22.4 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 11-16.4 iPadOS 13-16.4 macOS 10.13-13.3 Apple tvOS 11-16.4 watchOS 4-9.4 DriverKit 19-22.4 |
iOS 13.7-16.4 Apple tvOS 13.4-16.4 watchOS 7-9.4 |
Swift 4 Swift 4.2 Swift 5.8.1 |
Xcode 14.3* | macOS Ventura 13 | iOS 16.4 macOS 13.3 Apple tvOS 16.4 watchOS 9.4 DriverKit 22.4 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 11-16.4 iPadOS 13-16.4 macOS 10.13-13.3 Apple tvOS 11-16.4 watchOS 4-9.4 DriverKit 19-22.4 |
iOS 13.7-16.4 Apple tvOS 13.4-16.4 watchOS 7-9.4 |
Swift 4 Swift 4.2 Swift 5.8 |
Xcode 14.2 | macOS Monterey 12.5 | iOS 16.2 macOS 13.1 Apple tvOS 16.1 watchOS 9.1 DriverKit 22.2 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 11-16.2 iPadOS 13-16.2 macOS 10.13-13.1 Apple tvOS 11-16.1 watchOS 4-9.1 DriverKit 19-22.2 |
iOS 12.4-16.2 Apple tvOS 12.4-16.1 watchOS 7-9.1 |
Swift 4 Swift 4.2 Swift 5.7 |
Xcode 14.1 | macOS Monterey 12.5 | iOS 16.1 macOS 13 Apple tvOS 16.1 watchOS 9.1 DriverKit 22.1 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 11-16.1 iPadOS 13-16.1 macOS 10.13-13 Apple tvOS 11-16.1 watchOS 4-9.1 DriverKit 19-22.1 |
iOS 12.4-16.1 Apple tvOS 12.4-16.1 watchOS 7-9.1 |
Swift 4 Swift 4.2 Swift 5.7 |
Xcode 14.0.x | macOS Monterey 12.5 | iOS 16 macOS 12.3 Apple tvOS 16 watchOS 9 DriverKit 22 |
i386 x86_64 armv7k arm64 arm64e arm64_32 |
iOS 11-16 iPadOS 13-16 macOS 10.13-12.5 Apple tvOS 11-16 watchOS 4-9 DriverKit 19-22 |
iOS 12.4-16 Apple tvOS 12.4-16 watchOS 7-9 |
Swift 4 Swift 4.2 Swift 5.7 |
Xcode 13.4 | macOS Monterey 12 | iOS 15.5 macOS 12.3 Apple tvOS 15.4 watchOS 8.5 DriverKit 21.4 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-15.5 iPadOS 13-15.5 macOS 10.9-12.3 Apple tvOS 9-15.4 watchOS 2-8.5 DriverKit 19-21.4 |
iOS 12.4-15.5 Apple tvOS 12.4-15.4 watchOS 7-8.5 |
Swift 4 Swift 4.2 Swift 5.6 |
Xcode 13.3 | macOS Monterey 12 | iOS 15.4 macOS 12.3 Apple tvOS 15.4 watchOS 8.5 DriverKit 21.4 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-15.4 iPadOS 13-15.4 macOS 10.9-12.3 Apple tvOS 9-15.4 watchOS 2-8.5 DriverKit 19-21.4 |
iOS 12.4-15.4 Apple tvOS 12.4-15.4 watchOS 7-8.5 |
Swift 4 Swift 4.2 Swift 5.6 |
Xcode 13.2 | macOS Big Sur 11.3 | iOS 15.2 macOS 12.1 Apple tvOS 15.2 watchOS 8.3 DriverKit 21.2 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-15.2 iPadOS 13-15.2 macOS 10.9-12.2 Apple tvOS 9-15.2 watchOS 2-8.3 DriverKit 19-21.2 |
iOS 10.3.1-15.2 Apple tvOS 10.2-15.2 watchOS 3.2-8.3 |
Swift 4 Swift 4.2 Swift 5.5 |
Xcode 13.1 | macOS Big Sur 11.3 | iOS 15 macOS 12 Apple tvOS 15 watchOS 8 DriverKit 21.0.1 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-15 iPadOS 13-15 macOS 10.9-12 Apple tvOS 9-15 watchOS 2-8 DriverKit 19-21.0.1 |
iOS 10.3.1-15 Apple tvOS 10.2-15 watchOS 3.2-8 |
Swift 4 Swift 4.2 Swift 5.5 |
Xcode 13 | macOS Big Sur 11.3 | iOS 15 macOS 11.3 Apple tvOS 15 watchOS 8 DriverKit 20.4 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-15 iPadOS 13-15 macOS 10.9-11.3 Apple tvOS 9-15 watchOS 2-8 DriverKit 19-20.4 |
iOS 10.3.1-15 Apple tvOS 10.2-15 watchOS 3.2-8 |
Swift 4 Swift 4.2 Swift 5.5 |
Xcode 12.5.1 | macOS Big Sur 11 | iOS 14.5 macOS 11.3 Apple tvOS 14.5 watchOS 7.4 DriverKit 20.4 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.7 iPadOS 13-14.7 macOS 10.9-11.5 Apple tvOS 9-14.7 watchOS 2-7.6 DriverKit 19-20.4 |
iOS 10.3.1-14.5 Apple tvOS 10.2-14.5 watchOS 3.2-7.4 |
Swift 4 Swift 4.2 Swift 5.4 |
Xcode 12.5 | macOS Big Sur 11 | iOS 14.5 macOS 11.3 Apple tvOS 14.5 watchOS 7.4 DriverKit 20.4 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.6 iPadOS 13-14.6 macOS 10.9-11.4 Apple tvOS 9-14.6 watchOS 2-7.5 DriverKit 19-20.4 |
iOS 10.3.1-14.5 Apple tvOS 10.2-14.5 watchOS 3.2-7.4 |
Swift 4 Swift 4.2 Swift 5.4 |
Xcode 12.4 | macOS Catalina 10.15.4 (搭载 Intel 芯片的 Mac) macOS Big Sur 11 (搭载 Apple 芯片的 Mac) |
iOS 14.4 macOS 11.1 Apple tvOS 14.3 watchOS 7.2 DriverKit 20.2 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.4 iPadOS 13-14.4 macOS 10.9-11.1 Apple tvOS 9-14.3 watchOS 2-7.2 DriverKit 19-20.2 |
iOS 10.3.1-14.4 Apple tvOS 10.2-14.3 watchOS 3.2-7.2 |
Swift 4 Swift 4.2 Swift 5.3 |
Xcode 12.3 | macOS Catalina 10.15.4 (搭载 Intel 芯片的 Mac) macOS Big Sur 11 (搭载 Apple 芯片的 Mac) |
iOS 14.3 macOS 11.1 Apple tvOS 14.3 watchOS 7.2 DriverKit 20.2 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.3 iPadOS 13-14.3 macOS 10.9-11.1 Apple tvOS 9-14.3 watchOS 2-7.2 DriverKit 19-20.2 |
iOS 10.3.1-14.3 Apple tvOS 10.2-14.3 watchOS 3.2-7.2 |
Swift 4 Swift 4.2 Swift 5.3 |
Xcode 12.2 | macOS Catalina 10.15.4 (搭载 Intel 芯片的 Mac) macOS Big Sur 11 (搭载 Apple 芯片的 Mac) |
iOS 14.2 macOS 11 Apple tvOS 14.2 watchOS 7.1 DriverKit 20 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.2 iPadOS 13-14.2 macOS 10.9-11 Apple tvOS 9-14.2 watchOS 2-7.1 DriverKit 19-20 |
iOS 10.3.1-14.2 Apple tvOS 10.2-14.2 watchOS 3.2-7.1 |
Swift 4 Swift 4.2 Swift 5.3 |
Xcode 12.1 | macOS Catalina 10.15.4 (搭载 Intel 芯片的 Mac) macOS Big Sur 11 (搭载 Apple 芯片的 Mac) |
iOS 14.1 macOS 10.15.6 Apple tvOS 14 watchOS 7 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14.1 iPadOS 13-14.1 macOS 10.9-11 Apple tvOS 9-14 watchOS 2-7 DriverKit 19 |
iOS 10.3.1-14.1 Apple tvOS 10.2-14 watchOS 2-7 |
Swift 4 Swift 4.2 Swift 5.3 |
Xcode 12 | macOS Catalina 10.15.4 (基于 Intel 的 Mac) |
iOS 14 macOS 10.15.6 Apple tvOS 14 watchOS 7 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 9-14 iPadOS 13-14 macOS 10.6-10.15.6 Apple tvOS 9-14 watchOS 2-7 DriverKit 19 |
iOS 10.3.1-14 Apple tvOS 10.2-14 watchOS 3.2-7 |
Swift 4 Swift 4.2 Swift 5.3 |
Xcode 11.7 | macOS Catalina 10.15.2 | iOS 13.7 macOS 10.15.6 Apple tvOS 13.4 watchOS 6.2 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.7 iPadOS 13-13.7 macOS 10.6-10.15.6 Apple tvOS 9-13.4 watchOS 2-6.2 DriverKit 19 |
iOS 10.3.1-13.7 Apple tvOS 10.2-13.4 watchOS 3.2-6.2 |
Swift 4 Swift 4.2 Swift 5.2 |
Xcode 11.6 | macOS Catalina 10.15.2 | iOS 13.6 macOS 10.15.6 Apple tvOS 13.4 watchOS 6.2 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.6 iPadOS 13-13.6 macOS 10.6-10.5.6 Apple tvOS 9-13.4 watchOS 2-6.2 DriverKit 19 |
iOS 10.3.1-13.6 Apple tvOS 10.2-13.4 watchOS 3.2-6.2 |
Swift 4 Swift 4.2 Swift 5.2 |
Xcode 11.5 | macOS Catalina 10.15.2 | iOS 13.5 macOS 10.15.4 Apple tvOS 13.4 watchOS 6.2 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.5 iPadOS 13-13.5 macOS 10.6-10.15.4 Apple tvOS 9-13.4 watchOS 2-6.2 DriverKit 19 |
iOS 10.3.1-13.5 Apple tvOS 10.2-13.4 watchOS 3.2-6.2 |
Swift 4 Swift 4.2 Swift 5.2 |
Xcode 11.4.x | macOS Catalina 10.15.2 | iOS 13.4 macOS 10.15.4 Apple tvOS 13.4 watchOS 6.2 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.4.x iPadOS 13-13.4.x macOS 10.6-10.15.4 Apple tvOS 9-13.4 watchOS 2-6.2 DriverKit 19 |
iOS 10.3.1-13.4.x Apple tvOS 10.2-13.4 watchOS 3.2-6.2 |
Swift 4 Swift 4.2 Swift 5.2 |
Xcode 11.3.x | macOS Mojave 10.14.4 | iOS 13.3 macOS 10.15.2 Apple tvOS 13.3 watchOS 6.1.1 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.3 iPadOS 13-13.3 macOS 10.6-10.15.2 Apple tvOS 9-13.3 watchOS 2-6.1.1 DriverKit 19 |
iOS 10.3.1-13.3 Apple tvOS 10.2-13.3 watchOS 3.2-6.1.1 |
Swift 4 Swift 4.2 Swift 5.1 |
Xcode 11.2.x | macOS Mojave 10.14.4 | iOS 13.2 macOS 10.15.1 Apple tvOS 13.2 watchOS 6.1 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.2.x iPadOS 13-13.2.x macOS 10.6-10.15.1 Apple tvOS 9-13.2 watchOS 2-6.1 DriverKit 19 |
iOS 10.3.1-13.2.x Apple tvOS 10.2-13.2 watchOS 3.2-6.1 |
Swift 4 Swift 4.2 Swift 5.1 |
Xcode 11.1 | macOS Mojave 10.14.4 | iOS 13.1 macOS 10.15 Apple tvOS 13 watchOS 6 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13.1 iPadOS 13-13.1 macOS 10.6-10.15 Apple tvOS 9-13 watchOS 2-6 DriverKit 19 |
iOS 10.3.1-13.1 Apple tvOS 10.2-13 watchOS 3.2-6 |
Swift 4 Swift 4.2 Swift 5.1 |
Xcode 11 | macOS Mojave 10.14.4 | iOS 13 macOS 10.15 Apple tvOS 13 watchOS 6 DriverKit 19 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-13 iPadOS 13 macOS 10.6-10.15 Apple tvOS 9-13 watchOS 2-6 DriverKit 19 |
iOS 10.3.1-13 Apple tvOS 10.2-13 watchOS 3.2-6 |
Swift 4 Swift 4.2 Swift 5.1 |
Xcode 10.3 | macOS Mojave 10.14.3 | iOS 12.4 macOS 10.14.6 Apple tvOS 12.4 watchOS 5.3 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-12.4 macOS 10.6-10.14.6 Apple tvOS 9-12.4 watchOS 2-5.3 |
iOS 10.3.1-12.4 Apple tvOS 10.2-12.4 watchOS 3.2-5.3 |
Swift 4 Swift 4.2 Swift 5 |
Xcode 10.2.x | macOS Mojave 10.14.3 | iOS 12.2 macOS 10.14.4 Apple tvOS 12.2 watchOS 5.2 |
i386 x86_64 armv7 armv7s armv7k arm64 arm64e arm64_32 |
iOS 8-12.2 macOS 10.6-10.14.4 Apple tvOS 9-12.2 watchOS 2-5.2 |
iOS 8.1-12.2 Apple tvOS 9-12.2 watchOS 2-5.2 |
Swift 4 Swift 4.2 Swift 5 |
提供反馈并报告错误
你的反馈对于改进 Xcode 来说十分重要。你可以使用“反馈助理”报告 API 和工具的问题,或是请求相关的增强功能。请提供关于问题的详细说明,包括系统和开发者工具的版本,以及所有相关的崩溃日志或控制台信息。要提问和查找 Apple 工程师和其他开发者给出的答案,请访问 Apple 开发者论坛。
无效的专用密钥和证书配对
如果看到这样一条错误信息:“Xcode could not find a valid private-key/certificate pair for this profile in your keychain.”(Xcode 无法在你的钥匙串中找到适用于此描述文件的有效密钥/证书配对。),表明 Mac 上的钥匙串访问 app 缺少你用于对 App 进行签名的证书公钥或密钥。
如果你尝试通过与原本用于请求代码签名证书的 Mac 不同的 Mac 进行 App 签名和构建,则通常会发生此错误。如果证书过期或被撤销,也同样会引发这个错误。请确保 App 的预置描述文件包含有效的代码签名证书,而且 Mac 上的“钥匙串访问”App 包含这个证书、最初用于生成这个证书的专用密钥以及 WWDR 媒介证书。
有关如何解决这个错误和其他代码签名错误的说明,请查阅代码签名支持页面。
Apple 安全更新
如需了解 Xcode 更新的安全内容,请访问 Apple 安全更新页面。