iOS 开发
使用 USB 数据线将 iOS 设备连接到本地计算机,以便在设备上运行应用程序。
安装 Xcode 后,Qt Creator 会自动检测工具链,并创建必要的套件,用于为已配置的 iOS 设备构建应用程序并在其上运行。
您只需使用专为 iOS 构建的 Qt 库。您可以通过以下方式安装 Qt for iOS Qt Online Installer.
iOS 17 设备
Qt Creator 会自动检测 iOS 设备,您可以在这些设备上部署和运行应用程序。
对于运行 iOS 17 及更高版本的设备,仅支持 C++ 调试,并且需要 Xcode 16 或更高版本。
指定支持的 iOS 版本
您可以为最新 iOS 版本构建应用程序,并将其部署到较早版本上。在大多数情况下,此过程会自动完成。但是,当您手动设置自己的目标版本时,必须格外小心。 如果您将其设置为高于 Qt XML 要求的值,并提供了自定义的 `Info.plist ` 文件,则必须在 `Info.plist ` 中添加一个与 `CMAKE_OSX_DEPLOYMENT_TARGET` 值匹配的 `LSMinimumSystemVersion ` 条目(当使用 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.