无法在仪器中启动我的应用程序:至少有一个目标无法启动

时间:2013-09-19 21:46:06

标签: iphone ios xcode instruments

我已正确设置所有代码签名权利。在我的手机上运行应用程序很好,但在仪器中启动它会给我一个错误信息:

Error Starting Recording
At least one target failed to launch; aborting run

然后:

Target failed to run. Permisson to debug [app name] was denied. The app must be signed with a development identity (i.e. iOS Developer)

我有什么想法可以阻止这种情况发生?我的iPad上没有发生。

9 个答案:

答案 0 :(得分:214)

编辑目标方案,在“Profile [App Name]”下将Build Configuration设置为Debug(默认情况下通常为Release)。

答案 1 :(得分:33)

据说您需要使用开发者证书(而非分发证书)对该应用进行签名。

在Xcode 5中,只需将构建设置"Provisioning Profile"版本的"Release"字段更改为开发者证书,而不是您的分发证书。无论如何,在测试期间。 Xcode不允许您使用分发证书进行构建。

确保项目构建设置不会覆盖目标构建设置或在项目中进行更改构建设置。

在完成测试后,不要忘记将个人资料设置为

我不建议使用harrywynn的方法,因为更好地分析版本构建,因为那时您考虑了编译器优化,并且具有您的用户的确切经验。

答案 2 :(得分:9)

添加到之前的答案。

  • 乐器抱怨关于签名身份
  • 我认为在发布模式下个人资料更为可取,原因与Zolten相同。 (考虑到编译器的优化,并获得用户的确切经验等等。)
  • 要更改 Xcode 6 的代码签名标识:
    • 单击您的项目,选择您正在分析的目标。
    • 构建设置 - >代码签名 - >代码签名身份 - >释放
    • 选择您的iOS开发者资料。
  • 配置文件:让Xcode为您选择正确的配置文件,例如:切换到自动
  • 完成配置文件后,切换回正常设置

这是一张非常直观的照片;)

enter image description here

答案 3 :(得分:1)

I was getting the same issue : [INST STDERR] Instruments Trace Error : Target failed to run: Permission to debug was denied. The app must be signed with a development identity (e.g. iOS Developer).

Solution: 1. I archived the the app with Debug Developer Profile in xcode for device. 2. The go to Window -> Organiser -> to see all the list of archieves 3. Now select the archive to wanted to export and open it in finder 4. Right click and show package contents 5. Go to the Products/Applications folder You will see the .app file.

Use this instead of the ipa.

Make sure that the device has been already added to the developer portal and all the certs are installed on it for the above steps to work.

Once this is in place. Also, make sure you get the ios-webkit-debug-proxy from the link below:

https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/ios-webkit-debug-proxy.md

Also, enable developer tools on on the device setting. Also, make sure safari webinspector (safari -> Develop) -> Inspector is on Hope it helps:-)

NOTE: When you want appium to install the app on the device for you, don't provide Bundle ID.

答案 4 :(得分:0)

我通过这样做来实现在我的机器上解决这个问题:

  • 在列表中为您的设备生成new Developer Provisioning Profile,或者至少确保您的计算机位于配置文件设备的列表中。
  • 在项目设置中 - >代码签名 - >供应资料 - >调试:设置新创建的配置文件。
  • 在目标设置中 - >代码签名 - >供应资料 - >调试 AND 版本:设置新创建的配置文件。

希望有所帮助。

答案 5 :(得分:0)

我意识到了什么"至少有一个目标未能启动"手段。似乎两者开发和发布方案(如果你有调试方案和发布方案)必须具有开发标识。

我在运行探查器时选择了调试方案,而XCode顶部的消息表示"正在运行debug"。但是,这似乎还不够。

我将发布方案代码签名标识更改为与调试方案(以及配置文件)相同,问题就消失了。

答案 6 :(得分:0)

it worke ..当我将我的配置文件模式更改为调试模式并确保时,构建配置中包含开发人员证书。感谢

答案 7 :(得分:0)

这里没有其他解决方案解决了我的问题,但我确定在模拟器上这对我来说只是一个问题。该设备工作正常。也许模拟器存在问题。

答案 8 :(得分:0)

我在Xcode 9.1中遇到了模拟器和设备的这个问题,我的运行方案已经设置为" Debug"的分析。最后发现this Apple forum discussion非常有帮助并解决了问题。简而言之,对我有用的解决方案是......重新启动Mac。