Search code examples
iphonexcodedebuggingiphone-sdk-3.0certificate

How to debug with iPhone?


I have an iPhone and necessary certificates also, but don't know how to debug an application using xCode to iPhone.

I have all these. I have Mac Mini and iPhone 3g, but I don't know how to use all these certificates. I want to debug an application - having shake handling code. That I can't debug on simulator. So I just want to print x,y & z (nslog) while I am shaking phone. This means it's only possible when I am debugging with iPhone.


Solution

  • Login to iPhone Developer connection. Go to: http://developer.apple.com/iphone/manage/overview/index.action

    Then follow on the right tab make sure you:

    1. Register your phone under "Devices"
    2. Register the name of your app under "APP IDs"
    3. Download an app prov profile under "Provisioning" to a local folder

    Install the provisioning profile on the device, through:

    1. Drag and Drop to iTunes and Sync your iPhone
    2. Drag and drop to XCode menu->Window ->Organizer -> Provisioning

    Confirm that the provisioning profile is in the list.

    Choose the Active SDK for the Debug (Tab Located just below the close,minimize buttons of window) select: Device - 3.1.2(or other SDK build you have).

    Then hit Xcode Menu -> Run -> Debugger -> Build and Go (Click Console icon which is another helpful tool)

    This should:

    1. Install the provisioning profile on the phone. Confirm by checking(on the iPhone) Settings -> General -> Profiles -> NameofProvisioningProfile

    2. Install and Run the app.