Cydia and XCode Local App Testing

1. Go to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/SDKSettings.plist and change CODE_SIGNING_REQUIRED to NO and save it. (if it complains about file permission right click the file and select Get Info and after unlocking the file, change the permission to read&write)

2. In XCode open the info page and change Code Signing Identy to Don’t Code Sign.


3. In the terminal, set the environment variable  CODESIGN_ALLOCATE  as follows: (or you will get an error like this util/ldid.cpp(567): _assert(0:arch != NULL))
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate

4. Open Fugu and connect to your iphone (you can download FUGU from here)(you can find the IP address your iphone from Settings->Wi-fi->ConnectedWirelessName) (Username should be root and password should be alpine OR dottie) (open your iphone and don’t let it pass to stand-by mode during these phases)


5. Go to root directory and from here go to Applications directory


6. In XCode, build your application, from Products folder, select Reveal in Finder

7. Upload the .app file to the Applications folder in your iPhone

8. Open a Terminal and connect to your iphone with ssh like (be  careful that iphone is not in stand-by mode)

[email protected] and enter your password

9. First change the binary file permission of your application

chmod 755 /Applications/Appname.app/Appname

10. Then sign the app file with ldid

ldid -S /Applications/Appname.app/Appname

11. Restart the iphone, you are good to go

Note:
1. If ldid command can not be found, type apt-get install ldid OR aptitude install ldid
2. If apt-get can not be found install aptitude from Cydia

3.There are very useful pages on the net, so just google xcode and cydia, here is one of them http://thebigboss.org/hosting-repository/submit-your-app/compile-for-cydia-submission/

4. If you get an error like util/ldid.cpp(567): _assert(0:arch != NULL), there can be two possible reason for this, you either forget to export CODESIGN_ALLOCATE. The other possibility is that you build the application for the simulator. To fix this,  from XCOde change it to Device – 3.0  or sth similar  . You should see it on the combo box top left top corner of XCode.

你可能感兴趣的:(xcode)