Monday, November 17, 2008

Error from debugger: Error launching remote program: security policy error

I paid $99 and became an iPhone developer today.
When I tried to run a program on iPhone, I got the following error:
"Error from debugger: Error launching remote program: security policy error" in the xcode.
I followed exactly the steps of it.

Later, I found this is a really stupid small mistake.
In xcode, Groups & Files -> Targets -> xxxxx (xxxxx is your project name). Highlight it and click Info (command + i). 
In the "Properties" tab, there is an "Identifier" field. DEFAULT VALUE IS WRONG!!!
You need you use your own one that you use in creating an app id.
In iPhone Developer Program's program portal page. Click App IDs. Each id will look like this
"XXXXXXXXXX.com.mywebsitename"
XXXXXXXXXX is the nenerated bundle id.
In the "Identifier" filed of "Properties" tab, type "com.mywebsitename".
If this is not consistent with the one used in program portal page, when you try to launch program. "Error from debugger: Error launching remote program: security policy error" will be prompted.

How come Apple give such an stupid error that gives no information at all???

Recently I'm struggling with Apple and iPhone.
If I have a chance to choose whether to choose iPhone as my development platform, I will definitely say "NO!". I would rather use QBASIC in "文曲星" (a small computing device famous in China)

2 comments:

Aboo said...

Try this:
http://isagoksu.com/2009/development/iphone/how-to-get-rid-of-security-policy-error/

Unknown said...

I found this error also happens if you have an expired mobile provision on the device. You could have a current one also but it seems to default to the expired one first.

Remove the offending provision by going to settings->General->Profiles