zoukankan      html  css  js  c++  java
  • Debug iPhone Apps on Jailbroken iPhone 3G with XCode 3.2.2 – Another Safe Keeping

    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 

  • 相关阅读:
    背景图片拉伸显示CSS
    可序列化对象和byte[]数组之间的互转
    简单web性能测试工具——ab命令(ApacheBench)
    测试人员必须掌握的linu常用命令
    robot framework 如何处理循环条件下面的变量自增
    robot framework 的关键字Continue For Loop 用法
    robot framework 的AutoItLibrary常用关键字
    robot framework 关键字Switch Browser和Select Window的区别
    robot framework 接口测试 http协议post请求json格式
    robot framework 怎么验证搜索无记录,页面元素不存在
  • 原文地址:https://www.cnblogs.com/KiloNet/p/1847564.html
Copyright © 2011-2022 走看看