如何从 QT 应用程序设置 ios 应用程序包 ID [英] How do I set ios app bundle Id from QT application

查看:34
本文介绍了如何从 QT 应用程序设置 ios 应用程序包 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用qt/qml开发和应用.在 iOS 设备上成功运行应用程序.

I have developed and application by using qt/qml. Successfully run the application in iOS device.

我如何从 QT 应用程序设置 ios 应用程序包 ID,因为每次构建它都会重置.

How do I set ios app bundle Id from QT application since, each time build it is reseting.

推荐答案

如果您使用的是 QT 5.11.1 或更高版本,请在 .pro 文件中设置以下变量:

If you are using QT 5.11.1 or higher, set the following variable in your .pro file:

TARGET = app    

QMAKE_TARGET_BUNDLE_PREFIX = com.xxxx

最终结果是 com.xxxx.app 的包标识符.如果您使用的是较旧的 QT,您可能会遇到以下错误:

The final result is a bundle identifier of com.xxxx.app. If you're using an older QT, you might get hit with the following bug:

https://bugreports.qt.io/browse/QTBUG-66462

为了让我的签名生效,我必须将此答案与这篇文章的答案结合起来:

For my signing to work I had to combine this answer with the answer from this post:

Qt for iOS:需要代码签名

为了节省您的时间,这是我的完整 .pro

To save you the time, here is my complete .pro

ios: {
  QMAKE_TARGET_BUNDLE_PREFIX = com.xxxx
  QMAKE_DEVELOPMENT_TEAM = XXXX
  QMAKE_PROVISIONING_PROFILE = XXXXX
}

请记住,您需要先为相关连接的设备设置配置文件,然后才能进行任何操作.为此,您需要访问 apple.developer 网站.有很多关于手动临时证书的文档.我必须通过手动过程,然后进入 xcode -> 帐户 -> 下载手动配置文件;在我的工作之前.

Please keep in mind you need to have your provisioning profile setup for the connected device in question before any of this will work. To do that you'll need to goto the apple.developer website. There is lots of documentation on manual provisional certs. I had to go through the manual process, and then go into xcode -> account -> Download Manual Profiles; before mine worked.

这篇关于如何从 QT 应用程序设置 ios 应用程序包 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆