“未找到此可执行文件的有效配置文件"尝试运行单元测试时出错 [英] "A valid provisioning profile for this executable was not found" error when trying to run unit tests

查看:48
本文介绍了“未找到此可执行文件的有效配置文件"尝试运行单元测试时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有单元测试目标的 Xcode 工作区.单元测试在模拟器中运行良好,并且在我的一台设备(运行 iOS 6 的第 4 代 iPod touch)上也运行良好.但是,在其他两台设备(iPad Air 和运行 iOS 7 的第 5 代 iPod touch)上,当我尝试运行单元测试时,我收到一条警告说

I have an Xcode workspace with unit test targets. The unit tests run fine in the simulator, and also run fine on one of my devices (a 4th-gen iPod touch running iOS 6). However, on two other devices (an iPad Air and a 5th-gen iPod touch running iOS 7), when I try to run unit tests I get an alert saying

A valid provisioning profile for this executable was not found

我只在运行单元测试时得到这个.如果我尝试在这些设备上运行该应用,它会安装并运行良好.

I only get this when running unit tests. If I try to Run the app on these devices, it installs and runs fine.

我已验证在应用的代码签名构建设置中设置的(开发者)配置文件包括这些设备,并且它与我的开发者代码签名身份和应用 ID 相匹配.我也尝试过重新创建、重新下载和重新安装配置文件.

I have verified that the (developer) provisioning profile set in the Code Signing build settings for the app includes these devices and that it matches my developer code-signing identity and the App ID. I have also tried recreating, re-downloading, and re-installing the profile.

我应该在哪里看?为什么 Test 的配置文件在 Run 有效时无效?

Where should I look? Why would the provisioning profile for Test not be valid when it is valid for Run?

推荐答案

我在将应用安装到 iPhone 5 & 时遇到了类似的错误iPhone 6.同样的应用程序安装得很好(使用 Xcode 6).但它一直给我这样的错误:
未找到此可执行文件的有效配置文件
代码签名和配置文件设置良好且有效.我尝试了人们建议的不同方法,但没有一个能解决我的问题.如果您在尝试在 iPhone 5 & 上运行您的应用程序时遇到类似问题以上,并收到错误消息,您可以尝试以下操作:
1) 前往苹果开发者网站,将设备(iPhone 5/6)添加到开发设备列表中;
2) 在同一个网站上,点击 Provisioning profile 并将开发配置文件下载到您的本地计算机;
3) 转到 Xcode -> 设备,右键单击要运行应用程序的 iPhone(已将其添加到苹果开发者网站上的开发设备列表中);

4) 选择显示配置文件".一个弹出窗口将显示设备的配置文件.单击+"号并选择您刚刚下载的配置文件.
将为此设备安装配置文件,您可以开始使用了.
我发现只要您想添加新手机进行开发,此过程都可以使用.

I was running into similar error when installing app to iPhone 5 & iPhone 6. The same app install just fine (using Xcode 6). But it kept giving me errors like:
A valid provisioning profile for this executable was not found
The code signing and profile setting were good and valid. I tried different ways people have suggested but none of them solve my problem. If you are running into the similar problem when trying to run your app on iPhone 5 & above, and getting the error message, here is what you can try:
1) Go to apple developer web site and add the device (iPhone 5/6) to the development device list;
2) On the same web site, click on Provisioning profile and download development provisioning profile to your local computer;
3) Go to Xcode -> Devices, right click on the iPhone you want to run your app (which you added it to your development device list on apple developer web site);

4) Select "Show Provisioning Profiles". A popup window will show the profiles for the device. Click on "+" sign and select the provisioning profile you just downloaded.
The profile will be installed for this device and you are ready to go.
I have found this procedure works whenever you want to add a new phone for development.

这篇关于“未找到此可执行文件的有效配置文件"尝试运行单元测试时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆