Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't launch my app in Instruments: At least one target failed to launch

I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message:

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

And then:

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

Any ideas how I could stop this from happening? Doesn't happen on my iPad.

like image 997
Andrew Avatar asked Sep 19 '13 21:09

Andrew


4 Answers

Edit the scheme for your target and under "Profile [App Name]" set the Build Configuration to Debug (it's usually Release by default).

like image 151
harrywynn Avatar answered Nov 12 '22 05:11

harrywynn


It is saying that you need to sign the app with a developer certificate (not a distribution certificate).

In Xcode 5 just change the "Provisioning Profile" field for your "Release" build in the Build Settings to your developer certificate instead of your distribution certificate. For the duration of the testing anyway. Xcode doesn't allow you to build with a distribution certificate.

Make sure that the project build settings do not override the target build settings or make the change in your project build settings.

Don't forget to set the profile back after you're done with the testing.

I do not recommend harrywynn's method, since it is better to profile the release build because then you are taking into account the compiler optimizations, and having the exact experience your users will.

like image 32
Zoltán Matók Avatar answered Nov 12 '22 06:11

Zoltán Matók


To add to the previous answers.

  • Instruments is complaining about the signing identity.
  • I believe it is preferable to profile in release mode, for the same reasons given by Zolten. (take into account the compiler optimizations, and have the exact experience your users will, etc...)
  • To change your code signing identity for Xcode 6:
    • Click on your Project, Select the Target you are Profiling.
    • Build Settings -> Code Signing -> Code Signing Identity -> Release
    • Select your iOS developer profile.
  • Provisioning Profile: Let Xcode pick the correct Provisioning Profile for you, e.g: switch to Automatic
  • When you are done with the Profile, switch back to your normal settings.

Here's a picture for those who are very visual ;)

enter image description here

like image 9
dornad Avatar answered Nov 12 '22 06:11

dornad


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.

like image 1
swathy valluri Avatar answered Nov 12 '22 04:11

swathy valluri