Xcode假设不破解。无法真机调试, 也无法编译真机Release文件。仅仅有付费开通Apple开发人员账号,才干申请真机调试。而Xcode进行破解后,结合越狱的iPhone或iPad, 就可以免官方证书开发调试了!

生成本机证书

应用程序->其它->钥匙串訪问

菜单:钥匙串訪问->证书助理->创建证书, 然后按下面图片顺序操作就可以:

Xcode 5免证书开发调试_打开创建证书菜单

Xcode 5免证书开发调试_输入证书名称iPhone Developer并选择覆盖默认值

Xcode
5免证书开发调试_确定继续

Xcode
5免证书开发调试_输入序列号有效期,有效期不要超过365天

Xcode
5免证书开发调试_输入电子邮件地址

Xcode
5免证书开发调试_输入密钥对信息

Xcode
5免证书开发调试_密钥使用扩展扩展选择:签名

Xcode
5免证书开发调试_已扩展的密钥使用扩展选择:代码签名

Xcode
5免证书开发调试_基本约束扩展不选择

Xcode
5免证书开发调试_主题备用名称扩展输入RFC822名称,填入邮箱名就可以

Xcode 5免证书开发调试_用于该证书的位置选择钥匙串类型为登录

Xcode破解

保证Xcode处于关闭状态,命令行终端,复制粘贴以下的代码:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
sudo dd if=iPhoneOS\ Build\ System\ Support of=~/working bs=500 count=255
sudo chown mac<span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 26px; background-color: rgb(248, 248, 248);">(你登陆系统的username,我的username是mac)</span>:staff ~/working
printf "\x8f\x2a\x00\x00" >> ~/working
dd if=iPhoneOS\ Build\ System\ Support of=~/working bs=1 skip=127504 seek=127504
sudo /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
sudo /bin/mv ~/working iPhoneOS\ Build\ System\ Support
sudo chmod a+x iPhoneOS\ Build\ System\ Support
sudo chown root:wheel iPhoneOS\ Build\ System\ Support

权限处理完毕后。把CODE_SIGNING_REQUIRED和ENTITLEMENTS_REQUIRED的值改成NO

Xcode5免证书真机调试-改动SDKSettings.plist

改动保存后再将文件移回原处:

sudo mv ~/SDKSettings.plist /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/
sudo chown root:wheel /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/SDKSettings.plist

运行完脚本后改动"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist"文件(权限处理同上),做例如以下改动:

sudo mv /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist ~/ #文件移动到用户文件夹
sudo chown mac(你登陆系统的username,我的username是mac):staff ~/Info.plist

新增例如以下两项(告知项目编译无需证书):

PROVISIONING_PROFILE_ALLOWED = NO
PROVISIONING_PROFILE_REQUIRED = NO

Xcode5免证书真机调试-改动Info.plist

然后将该文件里全部的"XCiPhoneOSCodeSignContext"替换为"XCCodeSignContext",即去掉中间的"iPhoneOS"

假设不进行此步。编译Device Release版本号时會报错:

Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.xxxx' could not be found

Xcode5免证书真机调试-改动Info.plist替换标识

sudo mv ~/Info.plist /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/ #文件移回原处
sudo chown root:wheel /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist

改动项目属性 (每次新建项目都要运行)

A. 点击项目图标,找到"BuildSettings"选项下的"Code Sign Identity",将其值所有改为"Don't Code Sign"

Xcode5免证书真机调试-选择target

Xcode5免证书真机调试-改动Code Signing Identity

B. 切换到Build Phases选项,点击菜单Editor->Add Build Phase->Add Run Script Build Phase,然后单击Add Run Script,然后在Run Script中输入下面脚本:

export
CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" =="iphoneos" ] || [ "${PLATFORM_NAME}" == "ipados"]; then
/Applications/Xcode.app/Contents/Developer/iphoneentitlements/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

Xcode5免证书真机调试-Add
Run Script Build Phase

Xcode5免证书真机调试-写入脚本

Xcode破解完毕,或者更准确的讲,是配置完毕!

Xcode真机调试

将 iPhone接入电脑,在Xcode的Window->Organizer中会检測到你的iPhone.点击 restore using developer

查看iPhone和你的Xcode识别正常后退出Organizer。选择编译环境为"iPhone Device-我有一个姑娘我非常爱她",点击"Build and Go"

期间会出现让我们选择签名证书,点选"同意"后。等待你的iPad/iPhone屏幕点亮就ok了。

你的程序会自己主动下载到你的iPhone中,能够进行真机调试了

Xcode升级破解

假设是在原Xcode的版本号上升级到5,而且之前已经破解过。那么仅仅须要再做例如以下步骤就可以:

在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist中新增例如以下两项(告知项目编译无需证书):

PROVISIONING_PROFILE_ALLOWED = NO
PROVISIONING_PROFILE_REQUIRED = NO

然后将该文件里全部的"XCiPhoneOSCodeSignContext"替换为"XCCodeSignContext",即去掉中间的"iPhoneOS" 。假设不进行此步,编译Device
Release版本号时會报错:

Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.xxxx' could not be found

最新文章

  1. 创建或打开解决方案时提示&quot;DotNetCore.1.0.1-SDK.1.0.0.Preview2-003131-x86&quot;错误的解决方案
  2. EasyAR 开发教程系列1--小试牛刀
  3. python中列表,元组,字符串互相转换
  4. turn.js 图书翻页效果
  5. jQuery中.bind() .live() .delegate() .on()的区别
  6. Linux 下Firefox无法打开在&#39;.domain&#39;之前带有中划线的域名
  7. 理解 JavaScript Scoping &amp; Hoisting(二)
  8. POJ2104 K-th Number Range Tree
  9. web项目环境搭建(2):整合SpringMVC+velocity
  10. iOS 9之SFSafariViewController
  11. 攻击DotCom小游戏
  12. 通过自动回复机器人学Mybatis 笔记:接口式编程
  13. hadoop-eclipse-plugin-2.x.x 插件编译
  14. Java - Instrumentation
  15. git笔记(2)-常见命令的使用(详解待续)
  16. MD5+salt 工具类
  17. GPUImage API文档之GPUImageContext类
  18. VS2010/MFC编程入门之五十(图形图像:GDI对象之画笔CPen)
  19. 【原创】MySQL CPU %sys高的案例分析(一)
  20. hdu5246 超级赛亚ACMer

热门文章

  1. StarUML 系列,静态图与动态图,用例图,类图【ps:熟悉一下starUML】
  2. linux内核栈与用户栈【转】
  3. 充電到 100 %時,為什麼 Vbat 只有 4.2V?
  4. 安装sass的艰难过程
  5. AC日记——爱改名的小融 codevs 2967
  6. Opencv 最小外接矩形合并拼接
  7. AngularJS的ng-repeat显示表格
  8. JavaScript-4.7-friendly_table---ShinePans
  9. hdoj 2188 悼念512汶川大地震遇难同胞——选拔志愿者 【巴什博弈】
  10. HDOJ1160 Fat Mouse&amp;#39;s Speed