xcode 为参数“appIdName”提供了“无效值”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27046246/
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-09-15 06:13:41  来源:igfitidea点击:

An "invalid value" being provided for the parameter 'appIdName'?

iosxcode

提问by Nerrolken

I've been working on this app for several weeks, and everything's been great. I've been building and archiving and having a ball. All certificates and profiles and IDs have (seemingly) been in order and working well.

我已经在这个应用程序上工作了几个星期,一切都很棒。我一直在构建和存档,并有一个球。所有证书、配置文件和 ID 都(似乎)井井有条并且运行良好。

Then a few days ago, seemingly without any change that I can discern, Xcode said I didn't have any "provisioning profiles with a valid signing identity", and when I told it to "fix issue" I would get this error every time:

然后几天前,似乎没有任何我可以辨别的变化,Xcode 说我没有任何“具有有效签名身份的配置文件”,当我告诉它“修复问题”时,我每次都会收到此错误:

An invalid value 'Xcode: Wildcard AppID' was provided for the parameter 'appIdName'.

I've found a fewquestions that seem similar, but I can't find anything at all about this error specifically. Google, SO, nothing. I do have an AppID in the Developer Portal called "Xcode: Wildcard AppID" with an ID of *, and I've tried making another (as suggested in those other questions) but it hasn't helped.

我发现了一些看起来相似的问题,但我根本找不到任何关于这个错误的具体信息。谷歌,所以,什么都没有。我在开发人员门户中有一个名为“Xcode:Wildcard AppID”的 AppID,ID 为*,我尝试制作另一个(如其他问题中所建议的),但没有帮助。

Can anyone explain what this error means, and how I might go about fixing it? And for bonus points, what caused it so I can avoid this in the future?

谁能解释这个错误是什么意思,我该如何解决它?对于奖励积分,是什么原因造成的,以便我将来可以避免这种情况?

回答by nickjwallin

I was able to get it working. I tried what Cirec Bebacksuggested, but here are more specific instructions:

我能够让它工作。我尝试了Cirec Beback 的建议,但这里有更具体的说明:

  1. Go to the Apple Developer Member Center, and sign in
  2. Go to your "Certificates, Identifiers & Profiles"
  3. Under "iOS Apps", select "Provisioning Profiles"
  4. Near the top, in the "iOS Provisioning Profiles" header, hit the + button
  5. Select "iOS App Development" and hit Continue
  6. From the dropdown, select your "Xcode: Wildcard AppID" option and hit Continue
  7. Select your user, or everybody, and hit Continue
  8. Select whatever devices you want, I did all of them, and hit Continue
  9. Give the Provisioning Profile a name, and hit Continue
  10. The next screen will have instructions, but basically it will have a download link, so download the provisioning profile, and open it. Then you should be all good!
  1. 前往Apple Developer Member Center并登录
  2. 转到您的“证书、标识符和配置文件”
  3. 在“iOS Apps”下,选择“Provisioning Profiles”
  4. 在顶部附近,在“iOS Provisioning Profiles”标题中,点击 + 按钮
  5. 选择“iOS App Development”并点击继续
  6. 从下拉列表中,选择您的“Xcode:Wildcard AppID”选项并点击继续
  7. 选择您的用户或所有人,然后点击继续
  8. 选择你想要的任何设备,我都做了,然后点击继续
  9. 为配置文件命名,然后点击继续
  10. 下一个屏幕会有说明,但基本上它会有一个下载链接,所以下载配置文件,然后打开它。那你应该一切都好!

回答by mmmanishs

This may happen if you do not have an updated provisioning profile.

如果您没有更新的配置文件,则可能会发生这种情况。

To fix..

修理..

  1. Go to Xcode preferences.

  2. From the top tab select Accounts.

  3. Click View Details button(Bottom right).

  4. A screen will open showing all the provisioning profiles. Click the refresh button (Bottom left) and wait the refresh to finish.

  5. Check your bundle identifier(General tab) and your provisioning profile(Build Settings).

  6. Clean build.

  1. 转到 Xcode 首选项。

  2. 从顶部选项卡中选择帐户。

  3. 单击查看详细信息按钮(右下角)。

  4. 将打开一个屏幕,显示所有配置文件。单击刷新按钮(左下角)并等待刷新完成。

  5. 检查您的包标识符(常规选项卡)和您的配置文件(构建设置)。

  6. 清洁构建。

回答by zeroimpl

Another explanation for this error message is that your app bundle id contains an unsupported character such as an underscore.

此错误消息的另一种解释是您的应用程序包 ID 包含不受支持的字符,例如下划线。

回答by Bloem

I just had this today (which is why I'm here). In my case, it was just because the build settings had the wrong Code Signing Identity and Provisioning Profile. It had nothing to do with the XCode wildcard.

我今天刚吃过这个(这就是我在这里的原因)。就我而言,这只是因为构建设置具有错误的代码签名标识和配置文件。它与 XCode 通配符无关。

回答by DenVog

The issue for me was that I had an existing app, with an existing appID, that did not have App Groups enabled. This was warned not just in capabilities, but also when I selected my main app target and viewed the Identity section.

我的问题是我有一个现有的应用程序,它有一个现有的 appID,但没有启用应用程序组。这不仅在功能中被警告,而且在我选择我的主要应用程序目标并查看身份部分时也会被警告。

  1. I went to developer.apple.com > Certificates, Identifiers & Profiles > Identifiers
  2. In Identifiers > App IDs: Selected my App ID
  3. Clicked Edit, and enabled App Group under application services
  1. 我去了 developer.apple.com > Certificates, Identifiers & Profiles > Identifiers
  2. 在标识符 > 应用程序 ID:选择我的应用程序 ID
  3. 点击编辑,在应用服务下启用应用组

Then went back to XCode and refreshed the Target General. Then back to Capabilities and let it "fix" it.

然后回到 XCode 并刷新 Target General。然后回到 Capabilities 并让它“修复”它。

回答by Hugo H

I was having about the same issue on an Ionic project:

我在 Ionic 项目中遇到了同样的问题:

An invalid value '-widget-id--com.myapp.main--version--0.1.19--xmlns--http---www.w3.org-ns-widgets--xmlns-android--http---schemas.android.com-apk-res-android--xmlns-cdv--http---cordova.apache.org-ns-1.0---com.myapp.main' was provided for the parameter 'appIdentifierString'.
An invalid value 'XC -widget-id--com myapp main--version--0 1 19--xmlns--http---www w3 org-ns-widgets--xmlns-android--http---schemas android com-apk-res-android--xmlns-cdv--http---cordova apache org-ns-1 0---com myapp main' was provided for the parameter 'appIdName'.

After looking for awhile, I figured out that my platform/ios/MyApp.xcodeproj/project.pbxprojhas it PRODUCT_BUNDLE_IDENTIFIERfilled with

找了一会儿,我发现我的platform/ios/MyApp.xcodeproj/project.pbxproj里面PRODUCT_BUNDLE_IDENTIFIER装满了

-widget-id--com.myapp.main--version--0.1.19--xmlns--http---www.w3.org-ns-widgets--xmlns-android--http---schemas.android.com-apk-res-android--xmlns-cdv--http---cordova.apache.org-ns-1.0---com.myapp.main

I have no idea on how it happened but putting com.myapp.mainfixed it!

我不知道它是怎么发生的,但是把com.myapp.main它修好了!

回答by Cirec Beback

Wanted to let you know I had the same issue today. Might be an Apple issue. Anyway, I was able to go out to developer.apple.com and create the provisioning profile the old fashion way. xCode picked it up and was able to use it without any further issue.

想让你知道我今天遇到了同样的问题。可能是苹果的问题。无论如何,我能够去 developer.apple.com 并以旧时尚的方式创建配置文件。xCode 选择了它并且能够使用它而没有任何进一步的问题。