Http://www.yonsm.net/post/763
[Reprint] Developing
Without provisioning Profile
To develop for the devices one shoshould first obtain a provisioning profile by joining the iPhone developer Program (which costs $99 ). however, some simple tricks can be used to make xcode compile and Debug on jailbroken devices without provisioning profiles.
These steps are only tested for xcode 3.2.x/iPhone SDK 3.x and xcode 4.3.x/iPhone SDK 5.x. If for some reason you are stuck with xcode 3.1.x, try [1].
Compiling
Please Ming these steps allows you to use xcode to compile any applications and deploy it yourself.
- 1. Create a self-Signed code-signing Certificate with the name "iPhone developer" on the "login"
(Default) keychain using keychain access[1].
- 2. Open/Applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/info. plist(4.2
Or below:/Developer/platforms/iphoneos. Platform/info. plist)
- 3. replace all occurrencesXciphoneoscodesigncontextByXccodesigncontext.
There are three of them (xcode version 3.2.4 + ).
- 4. Save the file and restart xcode.
If you upgrade the iPhone SDK, You need to perform steps 2-4 again.
Replacing codesign with ldid
These steps are necessary for debugging, since the entitlement can no longer be inserted by using Ming steps 1-4. To actually debug your app, make sure you have add-GTATo other
Code signing flags of your target.
- 5. Make sure you have ldid on your Mac[2].
Place a copy in/Usr/local/bin.
- 6. Create the Python script/Usr/local/bin/ldid3.py.
Make it executable. Fill it:
#!/usr/bin/env pythonfrom sys import argvfrom subprocess import check_callfrom os.path import basename, splitext, joinfrom tempfile import NamedTemporaryFileapp = argv[-1]obj_path = join(app, splitext(basename(app))[0])if '-gta' not in argv: check_call(['/usr/local/bin/ldid', '-S', obj_path])else: with NamedTemporaryFile() as f: f.write("""<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"> <dict> <key>get-task-allow</key> <true/> </dict></plist> """) check_call(['/usr/local/bin/ldid', '-S' + f.name, obj_path])
- 7. Open iphonecodesign. xcspec.
- For xcode 4.3 the file is:/Applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/library/xcode/privateplugins/iphoneos
Build system support. xcplugin/contents/resources/iphonecodesign. xcspec
- For xcode 4.2 The file is:/Developer/platforms/iphoneos. Platform/developer/library/xcode/privateplugins/iphoneos
Build system support. xcplugin/contents/resources/iphonecodesign. xcspec
- For older versions the file is:/Developer/platforms/iphoneos. Platform/developer/library/xcode/plug-ins/iphoneos
Build system support. xcplugin/contents/resources/iphonecodesign. xcspec
- 8. Replace the line sayingCommandLine
= "/Usr/bin/codesign"WithCommandLine = "/usr/local/bin/ldid3.py". It shoshould be around line
12.
- 9. Save the file and restart xcode.
If you upgrade the iPhone SDK, You need to perform steps 8-9 again.
Allowing apps with invalid signatures to be installed
These steps allow you to install an unsigned app to the device. This method only works for iOS 4.0 or above.
- 10. Create a file/Var/mobile/tdmtanfOn
The device, to enable Apple's "tdmtanf bypass" inInstalld(Warning: doing so will also put you
In a sandboxed gamecenter[3]).
If you upgrade the firmware, you need to do step 10 again.
References
- ↑ Procedures
Can be found in http://developer.apple.com/mac/library/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
- Else if
Not, you can install from Fink unstable, compile it from git: // git.saurik.com/ldid.git, or just download https://github.com/downloads/rpetrich/ldid/ldid.zip
- License https://discussions.apple.com/thread/2745420? Start = 0 & tstart = 0