Xcode 编译遇到过 Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.xxxx’ could not be found 吗?且往下看: Xcode 如果不破解,一方面无法真机调试, 也无法编译真机 Release 文件,只能付费开通 Apple 开发者账号, 才能申请真机调试。而 Xcode 进行破解后,接合越狱的 iPhone 或 iPad, 即可免官方证书开发调试了!目前测试对于 最新的 iOS 4.2 SDK/iOS 4.2.1 SDK 的 Xcode 3.2.5 一样适用!当然,对 iOS 3.2.2/iOS 4.1 SDK 的 Xcode 3.1.2 同样保持兼容。 生成本机证书 应用程序>实用工具>钥匙串访问 菜单:钥匙串访问>证书助理>创建证书, 然后按以下图片顺序操作即可:
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102022174.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102115710.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102127181.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102186869.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102299334.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102309759.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102328448.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102354181.jpg)
Xcode 3.2.5 免证书开发调试_已扩展的密钥使用扩展选择:代码签名
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102423521.jpg)
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102439452.jpg)
Xcode 3.2.5 免证书开发调试_主题备用名称扩展输入 RFC822 名称,填入邮箱名即可
![](https://images.cnblogs.com/cnblogs_com/yishuiliunian/201111/201111171102451795.jpg)
cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/ 3 dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255 4 printf "\x8f\x2a\x00\x00″ >> working 5 dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504 6 /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original 7 /bin/mv working iPhoneOS\ Build\ System\ Support 8 chmod a+x iPhoneOS\ Build\ System\ Support 然后复制粘贴下面的代码到命令行终端: 1 mkdir /Developer/iphoneentitlements30 2 cd /Developer/iphoneentitlements30 3 curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt 4 mv gen_entitlements.txt gen_entitlements.py 5 chmod 777 gen_entitlements.py 6 ./gen_entitlements.py 执行完脚本后修改”/Developer/Platforms/iPhoneOS.platform/Info.plist”文件,做如下修改: 新增如下两项(告知项目编译无需证书):
1 PROVISIONING_PROFILE_ALLOWED = NO 2 PROVISIONING_PROFILE_REQUIRED = NO 然 后 将 该 文 件 中 所 有 的 ”XCiPhoneOSCodeSignContext” 替 换 为 ”XCCodeSignContext” , 即 去 掉 中 间 的”iPhoneOS” 。如果不进行此步,编译 Device Release 版本时會报错: 1 Code Sign error: a valid provisioning 'com.yourcompany.xxxx' could not be found profile matching the application's Identifier
打开 Xcode,打开你的项目,Project>>Edit Project Setting,选择”Build”页面,Configurations 和 Show 都选择 All,找到 Code Signing Identity 项,删除其子项,并将”Code Signing Identity”赋值为”iPhone Developer”(其实是个选项) 然后找到你项目的 xxxInfo.plist 文件,添加”SignerIdentity”项,其值为”Apple iPhone OS Application Signing”.保存。 Xcode 破解完成,或者更准确的讲,是配置完成!