ios 自动签名无法解决“projectName”目标的权利文件问题

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

Automatic signing is unable to resolve an issue with the "projectName" target's entitlements file

iosxcodeionic2provisioning-profileionic3

提问by Mohan Gopi

I am new to mac and i am getting this error as below image

我是 mac 新手,出现如下错误 图片

What should i do i have bought the developer licence and i created the provisioning certificate but still i am facing this issue. i am not sure why i am getting this error any help.

我应该怎么做我已经购买了开发人员许可证并创建了配置证书,但我仍然面临这个问题。我不确定为什么我会收到此错误任何帮助。

i have followed this youtube link inorder to create a provisioning profile and distrubution profile https://www.youtube.com/watch?v=Xh2nnjttOwo&t=367s

我已按照此 youtube 链接创建配置文件和分发文件https://www.youtube.com/watch?v=Xh2nnjttOwo&t=367s

UPDATE

更新

after updateing my buildsettings like this below img

像下面这样更新我的构建设置后 图片

and i am getting new error like this img

我收到了这样的新错误 图片

回答by Alexis_Ni

I had the same problem in a project that i used push notifications what i did to fix it is : Target-> Capabillities and turned on push notifications .fix

我在使用推送通知的项目中遇到了同样的问题,我修复它的方法是:目标-> 功能并打开推送通知。使固定

Note:the answer from @codebrew explains this clever fix further.

注意:@codebrew 的回答进一步解释了这个巧妙的修复。

回答by Jim Bak

I was able to resolve this by deleting all my provisional files on my computer (~/Library/MobileDevice/Provisioning Profiles) and restarting Xcode.

我可以通过删除计算机 ( ~/Library/MobileDevice/Provisioning Profiles)上的所有临时文件并重新启动 Xcode来解决此问题。

回答by L. Davis

I was able to fix this same issue by turning on push notifications and then turning them back off.

我能够通过打开推送通知然后关闭它们来解决同样的问题。

Not sure why this works, but in Xcode 9.4.1, and Xcode 10 Beta this fix still works.

不确定为什么会这样,但在 Xcode 9.4.1 和 Xcode 10 Beta 中,此修复程序仍然有效。

Update:This works in Xcode 10.1 & 10.2

更新:这适用于 Xcode 10.1 & 10.2

回答by CodeBrew

Xcode 9 and 10 may pop up this error because it's looking for a entitlements file for the target. You can turn on Push Notification in the target's Capabilities tab then turn it off to create an empty entitlements file for the build, then this error goes away.

Xcode 9 和 10 可能会弹出此错误,因为它正在寻找目标的权利文件。您可以在目标的 Capabilities 选项卡中打开 Push Notification,然后将其关闭以为构建创建一个空的权利文件,然后此错误就会消失。

回答by xiangxin

Under Code Signing Identity, change iPhone Distributionto iPhone Developerfor Debugsection.

在 下Code Signing Identity,更改iPhone DistributioniPhone DeveloperforDebug部分。

回答by Mercurial

I had this issue becaue XCode wasn't generating the entitlements file for Objective-C projects, no matter what I did. I solved it by doing the following:

我遇到了这个问题,因为无论我做什么,XCode 都没有为 Objective-C 项目生成权利文件。我通过执行以下操作解决了它:

  1. Create an empty file at the root of your project(at $SRC_ROOT).
  2. Paste the empty entitlements file template
  1. 在项目的根目录(在 $SRC_ROOT)创建一个空文件。
  2. 粘贴空的权利文件模板
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
  1. Save it as YourAppName.entitlements
  2. Go to Build Settings -> Signing -> Code Signing Entitlements and enter the path to your entitlements file - in my case $(SRCROOT)/YourAppName.entitlements
  1. 将其另存为 YourAppName.entitlements
  2. 转到 Build Settings -> Signing -> Code Signing Entitlements 并输入您的权利文件的路径 - 在我的情况下 $(SRCROOT)/YourAppName.entitlements

You might need to regenerate the Provisioning profiles after this (see @Jim Bak's answer above).

您可能需要在此之后重新生成配置文件(请参阅上面@Jim Bak 的回答)。

回答by Fattie

For 2020 ..

2020年..

Incredibly, Apple still have not fixed this in Xcode 11 onwards ...

令人难以置信的是,Apple 仍然没有在 Xcode 11 中修复这个问题......

The usual fix is the @CodeBrew solution above:

通常的修复是上面的@CodeBrew 解决方案:

"turn on Push Notification in the target's Capabilities tab then turn it off ... this error goes away.

“在目标的功能选项卡中打开推送通知,然后将其关闭......这个错误消失了。

It's that easy (usually).

就是这么简单(通常)。

回答by AlgebraWinter

I'm very new to iPhone development too and had an identical issue with an ionic project. I executed ionic cordova platform add ios, navigated XCode to the ionic generated platforms/ios/, checked the bundle id, associated my Apple developer Id with this App, let XCode manage my signing certs and provisioning profiles and hit the problem immediately.

我对 iPhone 开发也很陌生,并且在 ionic 项目中遇到了相同的问题。我执行了 ionic cordova platform add ios,将 XCode 导航到离子生成的平台/ios/,检查包 ID,将我的 Apple 开发人员 ID 与此应用程序相关联,让 XCode 管理我的签名证书和配置文件并立即解决问题。

So I made an XCode generated project with the same Bundle identifier and Apple developer team values and that was all cool. Which proved my Apple Id and certs were fine.

所以我用相同的 Bundle 标识符和 Apple 开发者团队值制作了一个 XCode 生成的项目,这一切都很酷。这证明我的 Apple Id 和证书没问题。

I compared the Code Signing values under XCode Building Settings (All) and in my case the issue was around the contents of the debug version Code Signing Entitlements file, which revealed I hadn't set up the aps-environment stuff properly.

我比较了 XCode Building Settings (All) 下的 Code Signing 值,就我而言,问题出在调试版本 Code Signing Entitlements 文件的内容上,这表明我没有正确设置 aps-environment 内容。

回答by Chuck Boris

For me unchecking and re-checking "Automatically manage signing" (on "General" tab) solved this.

对我来说,取消选中并重新选中“自动管理签名”(在“常规”选项卡上)解决了这个问题。

回答by Allan

For me the answer was turning on and then off at least one thing in the Capabilities page for ALL targets. The app, watch and watch extension. Even though I already had entitlement files that exactly matched what xCode created, something else changed when it regenerated the files.

对我来说,答案是在所有目标的“功能”页面中打开然后关闭至少一件事。应用程序、手表和手表扩展程序。即使我已经拥有与 xCode 创建的内容完全匹配的权利文件,但在重新生成文件时,其他内容发生了变化。