Debug iPhone Apps on Jailbroken iPhone 3G with XCode 3.2.2 – Another Safe Keeping

本文介绍如何通过越狱iPhone3G并利用Xcode 3.2.2进行应用程序直接调试的方法,避免支付苹果官方费用。步骤包括使用AppSync、修改Xcode配置文件、设置自签名证书等。

Been updated the XCode and iPhone SDK into 3.2, now I am ready to debug my apps directly on my jailbroken iPhone 3G. This hacks will save you $99 from paying Apple just to code for fun or perhaps profit.

Needed steps are:
1. Jailbreak your iPhone.
2. Install AppSync or Installd Patch, mine is using AppSync.
3. Download and Install XCode 3.2.2 bundled with iPhone SDK 3.2.
4. Find for Info.plist in the /Developer/Platforms/iPhoneOS.platform/
You’ll find Info.plist, this if you install Xcode on /Developer.
Then do the following:

cd /Developer/Platforms/iPhoneOS.platform/
cp Info.plist Info.plist.bak
nano Info.plist

In nano press ctrl+w, find for the following string:
<key>CODE_SIGN_CONTEXT_CLASS</key>
Now, below that string there is this string:
<string>XCiPhoneOSCodeSignContext</string>

Change the string XCiPhoneOSCodeSignContext into:
<string>XCCodeSignContext</string>
find for another occurences, replace a couple time until you replace all of them.

5. Now everything is made simple since I already gather all the necessary tools from the internet to use it easily, download is available at the bottom.
6. Patch the iPhone OS plugin for Xcode, on the zip archive on the bottom it has file: xcodepatch, run it using:
# sudo sh xcodepatch
7. Run Xcode.
8. Create New iPhone Project.
9. Open the Project Settings ( Projects -> Edit Project Settings ), on the Build tab, search for code signing, it’ll show you Code Signing Identity and its child, now set both of them to value of “Don’t Code Sign”. Close the settings.
10. Add a new build phase script ( Projects -> New Build Phase -> New Run Script Build Phase ), the copy paste the test inside file: Build Phase.txt into the script window.
11. Run, the Xcode will live debug the app on your Device.

One might forget to add codesign. Since we don’t use Apple Code Sign, we create our own Code Sign, using Self Code Sign,
Steps are:

a. Open an app called Keychain Access on Applications/Utilites.
b. On Keychain Access menu, open Certificate Assistant ->Create a Certificate
c. Fill in the name of “iPhone Developer”, you must use this exact name, since the script is set to use this codesign name. Set the certificate type into Code Signing, and check the “Let me override defaults”
d. Leave the rest and continue, and keep continue until the certificate is created successfully.

Now, rerun again the Xcode…

Here is the important thing to notice, if you ever forgot to do step 9 above, you will not be able to do live debug on device, the Xcode debugger will give this message:
Error from debugger: The program being debugged is not being run

This because entitlement is needed in order to debug the app on the device, otherwise you will have to run it manually without debugging support.

File Needed : http://www.mediafire.com/file/wmwmafqnqjn/xcode-jailbreak-3-1-3.zip

or /Files/KiloNet/xcode-jailbreak-3-1-3.zip

Just unzip it, and run: sudo sh install.sh to install it on your Mac.

I already tested this and worked great…

Safe Keeping Complete

 

http://azacode.wordpress.com/2010/06/06/debug-iphone-apps-on-jailbroken-iphone-3g-with-xcode-3-2-2-another-safe-keeping/ 

 

如果以上还是不能运行,那么/Developer/Platforms/iPhoneOS.platform/Info.plist 里面CODE_SIGN_CONTEXT_CLASS的值改为XCCodeSignContext

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/SDKSettings.plist里面 CODE_SIGNING_REQUIRED 的值改为NO 

 

转载于:https://www.cnblogs.com/KiloNet/archive/2010/10/11/1847564.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值