title: Xcode 4 and jailbroken iPhone
body: <p>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.</p>
  
  <p>After following the steps suggested <a href="https://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-real-iphone-device">in this thread</a>, not only can I not deploy to my iPhone, but now any project I create for iPhoneOS, I get the warning;</p>
  
  <pre><code>Target Integrity
  Missing SDK in target XXXXX: iphoneos
  </code></pre>
  
  <p>I don't know enough about <code>sed</code> to know what went on during the steps when I was trying to get it work so my question has two parts really:</p>
  
  <ol>
  <li><p>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).</p></li>
  <li><p>How do I configure Xcode <strong>4</strong> 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).</p></li>
  </ol>
  
  <p><strong>EDIT</strong>
  I removed the warnings that I didn't didn't have the SDK by simply reverting to the backup file that <code>sed</code> generated.</p>
  
  <p><strong>EDIT 2</strong>
  Should have played about a bit more before asking here I guess... I recreated another developer certificate and replace the relevant contents of the <code>SDKSettings.plist</code> with this:</p>
  
  <pre><code>            &lt;key&gt;AD_HOC_CODE_SIGNING_ALLOWED&lt;/key&gt;
              &lt;string&gt;YES&lt;/string&gt;
              &lt;key&gt;CODE_SIGNING_REQUIRED&lt;/key&gt;
              &lt;string&gt;NO&lt;/string&gt;
              &lt;key&gt;CODE_SIGN_ENTITLEMENTS&lt;/key&gt;
              &lt;string&gt;&lt;/string&gt;
              &lt;key&gt;DEAD_CODE_STRIPPING&lt;/key&gt;
              &lt;string&gt;YES&lt;/string&gt;
              &lt;key&gt;ENTITLEMENTS_REQUIRED&lt;/key&gt;
              &lt;string&gt;NO&lt;/string&gt;
  </code></pre>
  
  <p>And it all works! However, I am unable to debug as I can't find the <code>Project &gt; New Build Phase &gt; New Run Script Build Phase</code> option in the new XCode layout. Could someone enlighten me?</p>