ios 由于应用程序标识符授权,应用程序安装失败

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

App installation failed due to application-identifier entitlement

ioswatchkitwatchos-2

提问by Ric Santos

I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab.

由于应用程序标识符权利,我无法安装 watchOS 2 WatchKit 应用程序。这是在“功能”选项卡中打开“应用程序组”后发生的。

Full error:

完整错误:

App installation failed

This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

应用安装失败

此应用程序的应用程序标识符权利与已安装应用程序的权利不匹配。这些值必须匹配才能允许升级。

Screenshot 1

截图 1

This is running the app in debug mode on a physical device. Running just the iOS app works fine.

这是在物理设备上以调试模式运行应用程序。只运行 iOS 应用程序工作正常。

I have turned App Groups off again and removed the entitlements files that were added, but same error.

我再次关闭了应用程序组并删除了添加的权利文件,但同样的错误。

回答by John Nesbitt

I had this problem with an iPhone app, and fixed it using the following steps.

我在 iPhone 应用程序上遇到了这个问题,并使用以下步骤修复了它。

  • With your device connected, and Xcode open, select Window->Devices
  • In the left tab of the window that pops up, select your problem device
  • In the detail panel on the right, remove the offending app from the "Installed Apps" list.
  • 连接设备并打开 Xcode 后,选择 Window->Devices
  • 在弹出窗口的左侧选项卡中,选择您的问题设备
  • 在右侧的详细信息面板中,从“已安装的应用程序”列表中删除有问题的应用程序。

After I did that, my app rebuilt and launched just fine. Since your app is a watchOS app, I'm not sure that you'll have the same result, but it's worth a try.

在我这样做之后,我的应用程序重建并启动得很好。由于您的应用程序是 watchOS 应用程序,我不确定您会得到相同的结果,但值得一试。

回答by Tom Harrington

I had this problem and was not able to resolve it without deleting and reinstalling the app (messing with provisioning profiles, as some here suggested, did not help).

我遇到了这个问题并且无法在不删除并重新安装应用程序的情况下解决它(混淆配置文件,正如这里的一些人所建议的那样,没有帮助)。

However, I did not lose my existing test data.Here's how to do that, for anyone having this problem in the future:

但是,我并没有丢失我现有的测试数据。以下是如何做到这一点,对于将来遇到此问题的任何人:

  1. Beforeremoving the app, open the Xcode "Devices" window (that's cmd-shift-2).
  2. Select your device and find your app in the "Installed Apps" list.
  3. Click on the gear icon and select "Download Container...". This will copy all of the app's data to your Mac. Save that somewhere for now.
  4. Delete the app and reinstall it from Xcode. Kill the app from Xcode (click the stop button), so it's not running.
  5. Back in the "Devices" window, click the gear icon and select "Replace Container...". Select the data that you downloaded to your Mac in step 3.
  1. 删除应用程序之前,打开 Xcode“设备”窗口(即 cmd-shift-2)。
  2. 选择您的设备并在“已安装的应用程序”列表中找到您的应用程序。
  3. 单击齿轮图标并选择“下载容器...”。这会将应用程序的所有数据复制到您的 Mac。暂时把它保存在某个地方。
  4. 删除应用程序并从 Xcode 重新安装它。从 Xcode 中终止应用程序(单击停止按钮),因此它没有运行。
  5. 返回“设备”窗口,单击齿轮图标并选择“替换容器...”。选择您在步骤 3 中下载到 Mac 的数据。

Xcode will then restore your previously saved app data. You now have your old test data back, and the app should run.

然后 Xcode 将恢复您之前保存的应用程序数据。 您现在已经恢复了旧的测试数据,应用程序应该可以运行了。

回答by n.by.n

Delete any previous versions of App from your iPhone and then Clean->Build and Run again. Your app should run smoothly on your Device.

从您的 iPhone 中删除任何以前版本的 App,然后再次清理->构建并运行。您的应用程序应该在您的设备上顺利运行。

Also, please make sure you have not selected Distribution Certificate in your Project Settings while trying to run your project directly on your device.

此外,请确保您在尝试直接在设备上运行项目时没有在项目设置中选择分发证书。

回答by Darren

You will get this error when your AppID prefix does not match the prefix of the previously installed app. If your app is already in the App Store, you will not be able to submit updates without restoring the original AppID prefix or contacting Apple.

当您的 AppID 前缀与之前安装的应用程序的前缀不匹配时,您将收到此错误。如果您的应用程序已经在 App Store 中,您将无法在不恢复原始 AppID 前缀或联系 Apple 的情况下提交更新。

Apple's instructions for handling this problem: https://developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCH_THE_INSTALLED_APP

Apple 处理此问题的说明:https: //developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCHLED_THE

If you did not intend to change the AppID prefix then Xcode is signing your app with the wrong provisioning profile.

如果您不打算更改 AppID 前缀,则 Xcode 正在使用错误的配置文件对您的应用程序进行签名。

If you do intend to change the AppID prefix (because the app was transferred to a new developer, or you are migrating from an old pre-2011 AppID) you must contact Apple to migrate an existing AppID to a new prefix.

如果您确实打算更改 AppID 前缀(因为应用程序已转移给新的开发人员,或者您要从 2011 年之前的旧 AppID 迁移),则必须联系 Apple 以将现有 AppID 迁移到新前缀。

You must also add the previous-application-identifiersentitlement to your app, listing all previous AppIDs (with old prefixes). And you must ask Apple to generate a provisioning profile for you that includes the previous-application-identifiersentitlement.

您还必须将previous-application-identifiers授权添加到您的应用程序,列出所有以前的 AppID(带有旧前缀)。并且您必须要求 Apple 为您生成包含该previous-application-identifiers权利的配置文件。

回答by Dustin

I solved this without deleting the app

我在不删除应用程序的情况下解决了这个问题

With the project open in xcode. Project -> Build Settings -> Code Signing -> Provisioning Profiles (drop down) It is probably set to automatic and is choosing the wrong profile. Open the drop down and choose the correct one, then re-run the app.

在 xcode 中打开项目。项目 -> 构建设置 -> 代码签名 -> 供应配置文件(下拉) 它可能设置为自动并且选择了错误的配置文件。打开下拉菜单并选择正确的一个,然后重新运行该应用程序。

回答by Kunal Gupta

I faced the same problem and was stuck for several minutes and after a search, the simplest solution that i found is just remove the previously installed app from your device manually and try to run the app from Xcode again.

我遇到了同样的问题并被卡住了几分钟,在搜索之后,我找到的最简单的解决方案是手动从您的设备中删除以前安装的应用程序,然后尝试再次从 Xcode 运行该应用程序。

Hope it helps you. All the Best...

希望对你有帮助。祝一切顺利...

回答by Kirit Vaghela

Steps

脚步

  1. With your device connected, and Xcode open, select Window->Devices
  2. Now select the app and download the container using setting icon
  3. Delete the app
  4. Install app again using Xcode
  5. Stop from Xcode
  6. Go to Window->Device and select the app and replace the container that is backup from previous app
  1. 连接设备并打开 Xcode 后,选择 Window->Devices
  2. 现在选择应用程序并使用设置图标下载容器
  3. 删除应用
  4. 使用 Xcode 再次安装应用程序
  5. 从 Xcode 停止
  6. 转到窗口->设备并选择应用程序并替换从以前的应用程序备份的容器

回答by wzzhu

This can be caused by App ID prefix, when you switching different developer accounts. See https://developer.apple.com/library/content/technotes/tn2311/_index.htmlfor Apple's support.

当您切换不同的开发者帐户时,这可能是由 App ID 前缀引起的。有关Apple 的支持,请参阅https://developer.apple.com/library/content/technotes/tn2311/_index.html

回答by Rawand Saeed

I had the same issue. The bundle.identifier and the name of the project has to be the same. At least that was my issue.

我遇到过同样的问题。bundle.identifier 和项目名称必须相同。至少那是我的问题。

回答by arinmorf

I found that I had accidentally changed the provisioning profile to have a wildcard in it.

我发现我不小心更改了配置文件以在其中包含通配符。

Ie., it went from com.companyname.appnickname to com.companyname.*

即,它从 com.companyname.appnickname 到 com.companyname.*

I made a new provisioning profile with the full name correctly named, downloaded it, set the Target->build settings->provisioning profile to that new profile, restarted xcode, got a bizarre error from xcode (it seemed to confuse my various app developer logins), restarted xcode again, and it worked!

我创建了一个全名正确命名的新配置文件,下载了它,将 Target->build settings->provisioning profile 设置为那个新配置文件,重新启动了 xcode,从 xcode 得到了一个奇怪的错误(这似乎让我的各种应用程序开发人员感到困惑登录),再次重新启动 xcode,它起作用了!

I didn't want to delete the existing app, because I was trying to test what happens when a user upgraded their app to a newer version, so I had installed the app store version and then run my xcode with the newer version (which acts like 'upgrading' the app without removing any user data).

我不想删除现有的应用程序,因为我试图测试当用户将他们的应用程序升级到更新版本时会发生什么,所以我安装了应用程序商店版本,然后使用新版本运行我的 xcode(这会起作用)像“升级”应用程序而不删除任何用户数据)。