升级到 XCode 8 后应用安装失败

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

App Installation failed after upgrade to XCode 8

iosxcodecode-signing

提问by George Brown

My apps will no long install on my devices in my development environment after installing Xcode 8 with the error : App installation failed “A valid provisioning profile for this executable was not found.”

安装 Xcode 8 后,我的应用程序将不再安装在我的开发环境中的设备上,并出现错误:应用程序安装失败“找不到此可执行文件的有效配置文件。”

I've seen quite a few questions here on the subject and I've slowly gone through all the answers but to no avail. I thought it might have been ios10 but I keep one of my devices at ios9, that one don't work either.

我在这里看到了很多关于这个主题的问题,我慢慢地浏览了所有的答案,但无济于事。我以为它可能是 ios10,但我将我的一台设备保留在 ios9 上,那台设备也不起作用。

What I've done :

我所做的:

  • I've switched between Xcode automatically handling signing and doing it manually, setting all the profiles to “Development”.
  • I've deleted all the provisioning profiles and redownloaded them.
  • I've tried going to developer portal, manually regenerating the provisioning profiles and using them.
  • When I check the info next to the XCode managed profile, under “Devices”, my current device is listed.
  • Turned on and off the Push notification services. (I don't use push notifications).
  • Also disabled push notification services on my App ID in the development portal.
  • Removed the provisioning profiles from the devices themselves in the Devices Window.
  • Deleted all old certificates in my keychain.
  • Updated all my cocoa pods.
  • Restarted countless times and did many of the different steps in different orders.
  • I recently had to turn on keychain sharing as my app no longer wanted to retrieve an access token used for oAuth from the keychain, but turning that on or off had no effect either.
  • Other than the recently changed keychain access, I have no other entitlements.
  • With the keychain access, I also created an app group in the development portal and made sure it was set for my keychain group. No difference
  • 我已经在 Xcode 自动处理签名和手动执行之间切换,将所有配置文件设置为“开发”。
  • 我已经删除了所有配置文件并重新下载了它们。
  • 我试过访问开发人员门户,手动重新生成配置文件并使用它们。
  • 当我检查 XCode 管理配置文件旁边的信息时,在“设备”下,列出了我当前的设备。
  • 打开和关闭推送通知服务。(我不使用推送通知)。
  • 还在开发门户中禁用了我的 App ID 上的推送通知服务。
  • 在设备窗口中从设备本身中删除了配置文件。
  • 删除了我钥匙串中的所有旧证书。
  • 更新了我所有的可可豆荚。
  • 重新启动无数次,并以不同的顺序执行了许多不同的步骤。
  • 我最近不得不打开钥匙串共享,因为我的应用程序不再想从钥匙串中检索用于 oAuth 的访问令牌,但是打开或关闭它也没有任何影响。
  • 除了最近更改的钥匙串访问权限外,我没有其他权利。
  • 通过钥匙串访问,我还在开发门户中创建了一个应用程序组,并确保为我的钥匙串组设置了它。没有不同

I've been stuck on this a day now and it's really pushing back my next release as I have to test on real devices, the error message is frustratingly vague when everything seems in place, am I missing a log file somewhere that might give me a hint?

我已经被困在这一天了,它真的推迟了我的下一个版本,因为我必须在真实设备上进行测试,当一切似乎都到位时,错误消息令人沮丧地含糊不清,我是否在某处遗漏了可能会给我的日志文件一个提示?

回答by George Brown

I fixed it. I suddenly noticed XCTest was being copied over to the phone. It looks like my testing target is also being installed? I did not think that would happen when building and running my app, code signing was not required before, it certainly wasn't set.

我修好了它。我突然注意到 XCTest 正在被复制到手机上。看起来我的测试目标也正在安装?我不认为在构建和运行我的应用程序时会发生这种情况,以前不需要代码签名,当然也没有设置。

I set the testing target to also Automatically manage signing and now it works! I hope this helps someone else.

我将测试目标也设置为自动管理签名,现在它可以工作了!我希望这对其他人有帮助。

回答by u5258663

I fixed it after I deselected the 'Automatically manage signing' in the testing Target.

我在测试目标中取消选择“自动管理签名”后修复了它。

回答by Dan

Try:

尝试:

  1. Delete DerivedData /Finder-> Go-> (holding Options key) Library-> Developer-> Xcode-> delete DerivedData folder/
  2. Set provisioning profile to Automatic
  3. Set Release to Distributionrather than Developer
  4. Clean.
  1. 删除 DerivedData / Finder-> Go->(按住 Options 键)Library-> Developer-> Xcode-> 删除 DerivedData 文件夹/
  2. 将配置文件设置为 Automatic
  3. 将发布设置为Distribution而不是Developer
  4. Clean.

This pattern worked for me, hope it works for you as well.

这个模式对我有用,希望它也适用于你。

回答by Samer Murad

Xcode 8.3.3:

Xcode 8.3.3:

Had the same problem.

有同样的问题。

tried deleting Derived Data, cleaning project, changed dev team back and forth, manually setting the prov profiles, nothing helped. Fixed it in the end by restarting Xcode :/

尝试删除派生数据,清理项目,来回更改开发团队,手动设置 prov 配置文件,没有任何帮助。最后通过重新启动 Xcode 修复它:/

回答by BHAVIK PANCHAL

try this command in terminal

在终端中试试这个命令

rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode