Xcode下免证书真机调试方法(适用iphone3.0 3.12 3.14)
我的系统环境:
* Mac OS X 10.6.2
* Xcode 3.2.1
* iPhone 3G 8G 美版, iPhone OS 3.0 已越狱
证书伪造:
* 先按照 该教程 的步骤添加证书。注意,原教程选择的是“系统”证书,这里我们用“登录”证书,切记。
Xcode破解
* 关闭 Xcode,打开你的命令行终端,复制粘贴下面的代码:
#!/bin/bash
cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
printf “\x8f\x2a\x00\x00″ >> working
dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504
/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
/bin/mv working iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support
* 执行完后再复制粘贴下面的代码到命令行终端:(需要internet网络连接)
mkdir /Developer/iphoneentitlements30
cd /Developer/iphoneentitlements30
curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
mv gen_entitlements.txt gen_entitlements.py
chmod 777 gen_entitlements.py
* 执行完脚本后修改”/Developer/Platforms/iPhoneOS.platform/Info.plist”文件,做如下修改:
新增如下两项:
PROVISIONING_PROFILE_ALLOWED = NO
PROVISIONING_PROFILE_REQUIRED = NO
* 再用文本编辑器打开”/Developer/Platforms/iPhoneOS.platform/Info.plist”文件,将所有 “XCiPhoneOSCodeSignContext”替换为“XCCodeSignContext”,(非常重要,不进行此步骤会导致打开项目文件Xcode会崩溃报错退出)保存退出。
* 打开Xcode,打开你的项目,Project>>Edit Project Setting,选择“Build”页面,Configurations和Show都选择All,找到Code Signing Identity项,删除其子项,并将“Code Signing Identity”赋值为“iPhone Developer”(其实是个选项)。
* 然后找到你项目的xxx- Info.plist文件,添加“SignerIdentity”项,其值为“Apple iPhone OS Application Signing”.保存。
* 将iPhone接入电脑,在Xcode的 Window>>Organizer中会侦测到你的iPhone.查看iPhone和你的Xcode识别正常后退出Organizer,选择编译环境为“iPhone Device-3.1.2|Release”,点击”Build and Go”,期间会出现让我们选择签名证书,点选“允许”后,祈祷你的iPhone屏幕亮起吧。
* 你的程序会自动下载到你的iPhone中。点触运行无任何错误提示。
以上方法在iphone3.0环境中测试也同样通过了!

最新评论