Xcode 4 和越狱的 iPhone

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5802389/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:55:28  来源:igfitidea点击:

Xcode 4 and jailbroken iPhone

iphonexcodeiossdkjailbreak

提问by Sonoman

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.

我刚刚购买了 Xcode 4 并且正在尝试在其中开发我的应用程序。然而,我目前没有开发人员许可证(并且在我准备提交到应用商店之前不想要一个)所以我越狱了我的设备并安装了 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;

按照此线程中建议的步骤操作后,我不仅不能部署到我的 iPhone,而且现在我为 iPhoneOS 创建的任何项目都收到警告;

Target Integrity
Missing SDK in target XXXXX: iphoneos

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

sed当我试图让它工作时,我不知道在步骤中发生了什么,所以我的问题实际上有两个部分:

  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 4to 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).

  1. 如何将 Xcode 恢复到以前的状态,以便我可以使用 iOS SDK(真的不想再次从 Apple 下载 4+GB)。

  2. 如何配置 Xcode 4以部署到我的越狱 iPhone 进行测试。(我之前应该提到,我已经在 Xcode 3.2 中运行了所有内容,并且我已经尝试删除并重新创建自签名证书作为 iPhone 开发人员)。

EDITI removed the warnings that I didn't didn't have the SDK by simply reverting to the backup file that sedgenerated.

编辑我通过简单地恢复到sed生成的备份文件删除了我没有没有 SDK 的警告。

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

编辑 2在问这里之前应该多玩一点我猜......我重新创建了另一个开发人员证书并用这个替换了相关内容SDKSettings.plist

            <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 Phaseoption in the new XCode layout. Could someone enlighten me?

这一切都有效!但是,我无法调试,因为Project > New Build Phase > New Run Script Build Phase在新的 XCode 布局中找不到该选项。有人可以启发我吗?

采纳答案by Vincent Guerci

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
  • /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

编辑:运行构建阶段现在在项目首选项中: 在此处输入图片说明

回答by omercnet

Give Jailcodera try, it automates the whole process

Jailcoder一个尝试,它可以自动的全过程