Sonoman
Sonoman

Reputation: 3429

Xcode 4 and jailbroken iPhone

I've just purchased Xcode 4 and am trying to develop my apps in it. I don't currently have a developers license however (and don't want one until I am ready to submit to the app store) so I have jailbroken my device and installed appsync.

After following the steps suggested in this thread, not only can I not deploy to my iPhone, but now any project I create for iPhoneOS, I get the warning;

Target Integrity
Missing SDK in target XXXXX: iphoneos

I don't know enough about sed to know what went on during the steps when I was trying to get it work so my question has two parts really:

  1. How do I restore Xcode to its previous state so I can use the iOS SDK (Really don't want to have to download 4+GB from Apple again).

  2. How do I configure Xcode 4 to deploy to my jailbroken iPhone for testing. ( I should have previously mentioned that I had everything working in Xcode 3.2 an I have already tried deleted and recreating the self signed certificate as iPhone Developer).

EDIT I removed the warnings that I didn't didn't have the SDK by simply reverting to the backup file that sed generated.

EDIT 2 Should have played about a bit more before asking here I guess... I recreated another developer certificate and replace the relevant contents of the SDKSettings.plist with this:

            <key>AD_HOC_CODE_SIGNING_ALLOWED</key>
            <string>YES</string>
            <key>CODE_SIGNING_REQUIRED</key>
            <string>NO</string>
            <key>CODE_SIGN_ENTITLEMENTS</key>
            <string></string>
            <key>DEAD_CODE_STRIPPING</key>
            <string>YES</string>
            <key>ENTITLEMENTS_REQUIRED</key>
            <string>NO</string>

And it all works! However, I am unable to debug as I can't find the Project > New Build Phase > New Run Script Build Phase option in the new XCode layout. Could someone enlighten me?

Upvotes: 3

Views: 17256

Answers (2)

omercnet
omercnet

Reputation: 737

Give Jailcoder a try, it automates the whole process

Upvotes: 0

Vincent Guerci
Vincent Guerci

Reputation: 14419

From what i see in this reply, which I guess you followed, the steps proposed are clean and each time backuping original files. So for your first question, just restore original files :

  • /Developer/Platforms/iPhoneOS.platform/Info.plist.bak
  • /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/SDKSettings.plist.bak
  • /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build\ System Support.xcplugin/Contents/MacOS/iPhoneOS Build System Support.original

EDIT : Run build phase is now there, in project preferences : enter image description here

Upvotes: 2

Related Questions