为 iOS 开发

安装 Xcode 后,Qt Creator 会自动检测工具链并创建必要的工具包,以便在配置好的 iOS 设备上构建并运行应用程序。

您只需要为 iOS 构建的 Qt 库。您可以使用 Qt Online Installer.

iOS 17 设备

Qt Creator Qt 会检测 iOS 设备,你可以在这些设备上部署和运行应用程序。

iOS 17 及更高版本的设备仅支持 C++ 调试,而且需要 Xcode 16 或更高版本。

指定支持的 iOS 版本

您可以为最新的 iOS 版本构建应用程序,并将其部署到以前的版本。在大多数情况下,这都是自动完成的。不过,在手动设置目标版本时,您必须小心谨慎。如果设置的值高于 Qt 要求的值,并提供自己的Info.plist 文件,则必须在Info.plist 中添加一个LSMinimumSystemVersion 条目,该条目必须与CMAKE_OSX_DEPLOYMENT_TARGET(使用 CMake 时)、QMAKE_IOS_DEPLOYMENT_TARGET(使用 Qmake 时)或cpp.minimumIosVersion(使用 Qbs 时)的值相匹配,因为 iOS(和 App Store)会将LSMinimumSystemVersion 的值作为权威值。

如果指定的部署目标值低于 Qt 的要求,当在比 Qt 支持的版本更老的版本上运行时,应用程序几乎肯定会在 Qt 库的某处崩溃。因此,请确保实际的构建系统代码反映了实际需要的最低 iOS 版本。

另请参阅 " 如何:为 iOS 开发"和 "表达支持的 iOS 版本"。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.