ios Today Widget 扩展的配置文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25837722/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 02:26:40  来源:igfitidea点击:

Provisioning profile for Today Widget extension

iosxcodeprovisioning-profileios-app-extension

提问by user3746428

I am trying to archieve my app for submission however I am running into issues with code signing.

我正在尝试归档我的应用程序以供提交,但是我遇到了代码签名问题。

Basically I have a Today Widget extension for my app. I am unsure about what I should be setting the provisioning profile as. I assumed that I would just use the same profile that I have used for my app, however I get this error:

基本上,我的应用程序有一个 Today Widget 扩展。我不确定我应该将配置文件设置为什么。我假设我只会使用与我的应用程序相同的配置文件,但是我收到了这个错误:

The provisioning profile specified in your build settings (“AppName”) has an AppID of “BundleID” which does not match your bundle identifier “BundleID2”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.

在您的构建设置(“AppName”)中指定的配置文件具有“BundleID”的 AppID,它与您的包标识符“BundleID2”不匹配。Xcode 可以通过从会员中心下载新的配置文件来解决此问题。

I can of course click 'Fix Issue', but does this actually solve the problem? It just changes my distribution settings to 'iOS Developer' and providing profile to 'Automatic'.

我当然可以点击“修复问题”,但这真的能解决问题吗?它只是将我的分发设置更改为“iOS 开发人员”并将配置文件提供给“自动”。

回答by Markus Rautopuro

I was struggling with the same problem, and resolved it this way:

我正在为同样的问题而苦苦挣扎,并以这种方式解决了它:

  • You need one App ID configured to the provisioning portal (I assume you have your com.apple.yourappnamethere)
  • You need to then configure the second App ID for the Today Widget (which should be com.apple.yourappname.something, where something is the name for your widget, like Today)
  • 您需要为配置门户配置一个 App ID(我假设您在com.apple.yourappname那里拥有)
  • 你需要再配置的今天,插件的第二应用ID(应该是com.apple.yourappname.something,这里的东西是你的插件的名字,像今天)

Then you need to create two App Store Distribution provisioning profiles:

然后您需要创建两个 App Store Distribution 配置文件:

  • One for the main App
  • Second one for the widget
  • 一个用于主应用程序
  • 小部件的第二个

Then assign the correct provisioning profiles for each target to the project settings and set to build for Distribution.

然后为每个目标分配正确的配置文件到项目设置并设置为构建分发。

回答by Daniel Nord

Try to create a new App Id for your App extension in Certificates, Identifiers & Profiles (https://developer.apple.com/account). Then create a Provisioing profile for the newly created App id.

尝试在证书、标识符和配置文件 ( https://developer.apple.com/account) 中为您的应用扩展创建一个新的应用 ID 。然后为新创建的 App id 创建 Provisioing 配置文件。

If the bundle id for your App is com.apple.appname you create an app extensions with the bundle id com.apple.appname.appextensionname. The same id is then used in Xcode for the widget.

如果您的应用程序的包 ID 是 com.apple.appname,则您创建一个包 ID 为 com.apple.appname.appextensionname 的应用扩展。然后在 Xcode 中为小部件使用相同的 id。