views:

733

answers:

5

Hi

I am using my iPhone as a development device. Whenever I run an application on the iPhone with Instruments (Instruments->Launch Executable->my app), the app is launched but I get the error mentioned in the subject in Instruments.

I have tried removing the device from xcode and adding it again as a development device but I still get the same error. Can someone please tell me how to solve this.

Thanks.

+1  A: 

Does it crash normally? or only using Instruments?

I've had lots of oddness with instruments and app installation that was only fixed by a complete restore of the iPhone/iPod Touch.

Squeegy
The app doesn't crash. Instruments does not show the trace but the app is launched and it runs. I am restoring my phone right now. Thanks.
lostInTransit
+3  A: 

Did a fresh certificate-provisioning profile routine and changed the bundle identifier to read myAppId.somethingForTheStar.${PRODUCT_NAME:identifier}

Also, if you open the mobileprovision in TextEdit and search for

<key>get-task-allow</key>

if the value for the key is true, make sure the option is checked in your Entitlements.plist file (though Apple developer portal says it should be unchecked - which it should ideally be, if your mobileprovision file wants it checked, keep it checked)

Strange, I had to use an Entitlements.plist with the "get-task-allow" checked for Debug profile and unchecked for Distribution profile for the respective profiles to work!

Hope that helps someone.

lostInTransit
A: 

Does it mean that it is possible to profile only own provisioned apps but not any other?

Looks like it. I always get the error if I try to profile any other apps installed on my iPhone
lostInTransit
A: 

make sure you are compiling as debug and not release

also make sure you are using development profile for both project and target

+1  A: 

I got it to work only with my development provisioning profile which is not my distribution profile.

I also made sure i have the same provisioning profile in project and target and turned on get-task-allow in Entitlements.plist

It sometimes still doesn't work and then i restart xcode unplug/plugin my iphone, clean the target and run instruments from Xcode via 'Start with Performance Tool'

This is by the way with XCode 3.1 / SDK 3.0. Hope this gets less painful with SDK 3.1 (which i'm downloading now).

Oh and yeah my app crashes sometimes during 'CPU Sampler' which i believe has to do with Instruments.

Christian