如何设置 Bundle Id、App Identifiers 和 Provisioning Profiles 以发布使用 SwiftUI 和 XCode 制作的 WatchOs 应用程序? [英] How to set Bundle Ids, App Identifiers and Provisioning Profiles to publish a WatchOs App made with SwiftUI and XCode?

查看:92
本文介绍了如何设置 Bundle Id、App Identifiers 和 Provisioning Profiles 以发布使用 SwiftUI 和 XCode 制作的 WatchOs 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 Xcode 12 和 SwiftUI 制作了一个 watchOS 应用程序,但我真的很难发布它.watchOS 应用包含三段代码:

I made a watchOS app with Xcode 12 and SwiftUI but I really struggle trying to publish it. An watchOS app has three pieces of code:

  • 应用程序
  • watchkit 应用
  • watchkit 扩展

我已尝试对所有人使用相同的捆绑 ID(格式:com.domain.appname).那失败了.因此,我尝试为每个包使用不同的包 ID,如下所示(知道我已经创建了 3 个应用标识符和 3 个与 developer.apple.com 上的匹配的配置文件).

I've tried to use the same bundle id for all (in the format: com.domain.appname). That failed. So I've tried to use a different bundle id for each as follow (knowing I've create the 3 App Identifiers and the 3 Provisioning Profiles matching those on developer.apple.com).

  • 应用(包 ID:com.domain.appname)
  • watchkit 应用(捆绑 ID:com.domain.appname.watchkitapp)
  • watchkit 扩展(包 ID:com.domain.appname.watchkitextension)

构建失败,出现以下错误:

This failed to build with this error:

所以我无法构建或存档我的应​​用程序.然后我为应用程序和扩展程序使用了相同的 bundleId,如下所示:

So I cannot build or Archive my app. Then I've used the same bundleId for both App and Extension like this:

  • 应用(包 ID:com.domain.appname)
  • watchkit 应用(捆绑 ID:com.domain.appname.watchkitapp)
  • watchkit 扩展(包 ID:com.domain.appname.watchkitapp)

通过这些设置,我可以构建和归档应用程序.但是,当我尝试将其上传到应用程序商店(使用 XCode 或称为传输器的外部应用程序)时,我收到此错误:

With these settings I can build and archive the app. However when I try to upload it to the app store (with XCode or with the external app called the transporter) I got this error:

所以在这一点上我迷路了...这里是否有人能够使用 swift UI 和 Xcode 发布 watch os 应用程序,并且谁能告诉我如何使用 Bundle Id、App Identifiers 和 Provisioning Profiles这样做.谢谢

So at this point I'm lost... Is there someone here who has been able to publish a watch os app using swift UI and Xcode and who can tell me how to use Bundle Ids, App Identifiers and Provisioning Profiles to do so. Thanks

推荐答案

In Target >一般>捆绑标识符

In Target > General > Bundle Indentifier

对于扩展目标,它们应该是增量的

They should be incremental for the extension targets

  • 主应用 = com.domain.appName

  • Main app = com.domain.appName

手表应用 = com.domain.appName.watchkitapp

Watch app = com.domain.appName.watchkitapp

手表扩展名 = com.domain.appName.watchkitapp.watchkitextension

Watch extension = com.domain.appName.watchkitapp.watchkitextension

就我所见,您的扩展程序不是唯一的(它没有添加扩展程序部分).

Your extension isn't unique (it doesn't add the extension part) from what I can see.

此外,您在同一区域的 VersionBuild 应该匹配所有 3 个项目

Also, your Version and Build in the same area should match all 3 Projects

这篇关于如何设置 Bundle Id、App Identifiers 和 Provisioning Profiles 以发布使用 SwiftUI 和 XCode 制作的 WatchOs 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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