14

I created an iPhone OS 2.2 app some time ago and recently installed the 3.1 SDK.

When I try to run my app on my (3.1) iPod Touch, the launch window says "Error from Debugger: Error launching remote program: security policy error."

Viewing the iPod Touch's Console (via the Console tab for my device in Xcode's Organizer) shows:

Wed Feb  3 23:29:17 unknown SpringBoard[24] <Warning>: Unable to launch com.blahblah.Blah_Blah because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
Wed Feb  3 23:29:17 unknown com.apple.debugserver-43[789] <Error>: error: unable to launch the application with CFBundleIdentifier 'com.blahblah.Blah_Blah' sbs_error = 9

I already sifted through a bunch of code-signing issues just to get it to build and deploy, so I think this might be something else.

Woody Zenfell III
  • 1,905
  • 17
  • 31

5 Answers5

40

After trying the above solution of deleting expired certs, I was still encountering this issue. Turned out I needed to launch the application manually once and accept the prompt asking if I really wanted to launch that application signed by that profile with that dev account. After accepting that, Xcode was able to successfully launch it subsequent times.

noir
  • 539
  • 5
  • 6
  • This solution worked for me, also. It's worth a try before some of the slightly more involved solutions. – Kent Jan 28 '13 at 22:05
  • Yeah, this worked for me with my new iPhone 6 and iPhone 6 plus we are testing with our app with iOS 8. unfortunately, it seems to not save the trust of that developer key that is OKed and if I delete the app and relaunch in Xcode (for example, testing app with new database), I have to go through it again. PITA. Thanks! – chadbag Sep 22 '14 at 19:13
  • Instead of deleting on the device, try deleting the app using the Xcode Devices window. This seems to preserve the the previously granted trust. – noir Sep 15 '16 at 23:59
21

The solution for me was to delete all expired provisioning profiles on the device (even unrelated ones) Window -> Organizer - choose your device and under profiles delete any that have expired. Thanks to: "security policy error" on iPhone and iPod Touch

Community
  • 1
  • 1
Dittimon
  • 986
  • 2
  • 14
  • 28
1

I had the same problem when trying to run on my "newest" iPad after adding the device in XCode. Apparently this device was not in the list of devices for the development profile I was using.

Solution: go to iOS Provisioning Portal, select "Provisioning" on the left hand size, select the 'Development" tab on top and change in the applicable profile in the list on Edit/Modify

Then you can edit the settings for the Certificates to use and add the individual devices.

Then once you connect the device with the XCode organizer, the info on the device will sync automagically. You may then also want to remove the outdated profiles in the Organizer.

Problem solved.

maarten
  • 455
  • 3
  • 7
1

The problem turned out to be spaces in the executable's filename (I think).

I had previously sorted out a similar problem with bundle identifiers by appending ":rfc1034identifier" to PRODUCT_NAME in my info.plist, but this is a little different.

I'm not sure how to set the executable name directly, but I eventually just changed the Product Name in the "Packaging" section on the "Build" tab for my Target to something that didn't have any spaces. Fixed!

Woody Zenfell III
  • 1,905
  • 17
  • 31
0

Fixed this issue myself.

Go to Organiser Window Select Provision Profiles from the left hand side Press the refresh button in the bottom right of the window punch in your AppleID and password Feel free to recompile your app

My issue was I updated my profiles to add new devices but did not update the profile in XCode.