--- Image:
Image:
Recently, I started to study the development of the iPhone. I don't know how to put all the information I can find on the iPhone, A lot of people should be confused like me! After several days of research, the first helloworld is always displayed, and you don't have to pay $99 for it to go to the real machine! Today, I would like to share with you how to put it on a mobile phone and how to use xcode:
My environment is as follows:
Ibmx60 + ideneb 10.5.5
IPhone port 16g + fw2.2 + yuyue
IPhone sdks 2.2 final
Mobileinstallation has been replaced (this is very important, or you can not put it on the IP, you can test this post weiphone: http://www.weiphone.com/thread-206698-1-1.html)
Note: The SDK version is best consistent with the IP version!
Good, fellow students, it's time to get started!
1. production certificate
Because all versions after xcode require that the application must have been deployed, you must
I spent $99 to join Developer Program (black). I didn't pay for the app store anyway. I just wanted to use it with my own certificate.
Open the key access tool (in the application program> tool Program ), create a certificate for the "iPhone developer" name. (do not change this name. Otherwise, you must change it in the case)
Type-based selection "parameter names"
Renew your ICP filing information
The last option is stored in "login" (not "system", because the subsequent xcode cracking requires "login)
You have saved $99!
2. Open xcode to create a View Based Application
2. After the project is established, open the project setting and enter the following in user-defined settings:
Provisioning_profile_allowed = No
Provisioning_profile_required = No
3. open info. plist: This case mainly stores the Related Description of the application. Press add row on the right and add signeridentity = "Apple iPhone OS application signing" (the same is true, zookeeper does not seem to work)
Next, we will crack xcode.
- Close xcode, open your command line terminal, and copy and paste the following code:
#! /Bin/bash
CD/developer/platforms/iphoneos. Platform/developer/library/xcode/plug-ins/iphoneos \ build \ System \ support. xcplugin/contents/MACOs/
Dd If = iphoneos \ build \ System \ support of = working BS = 500 COUNT = 255
Printf "\ x8f \ x2a \ x00 \ x00"> working
Dd If = iphoneos \ build \ System \ support of = working BS = 1 skip = 127504 seek = 127504
/Bin/MV-N iphoneos \ build \ System \ support. Original
/Bin/mv working iphoneos \ build \ System \ support
Chmod A + x iphoneos \ build \ System \ support
- Copy and paste the following code to the command line terminal after execution: (Internet connection is required)
Mkdir/developer/iphoneentitlements30
CD/developer/iphoneentitlements30
Curl-O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
MV gen_entitlements.txt gen_entitlements.py
Chmod 777 gen_entitlements.py
- After the script is executed, modify the "/developer/platforms/iphoneos. Platform/info. plist" file and make the following changes:
Add the following two items:
Provisioning_profile_allowed = No
Provisioning_profile_required = No
- Use a text editor to open "/developer/platforms/iPhone OS. platform/info. in the plist file, replace all "xciphoneoscodesigncontext" with "xccodesigncontext" (very important. If you do not perform this step, xcode opens the project file and reports an error and exits.) Save and exit.
- Open xcode, open your project, project> edit project setting, select the "build" Page, select all for deployments and show, locate the code signing identity item, and delete its subitem, assign "code signing identity" to "iPhone developer" (which is actually an option ).
- Then find the xxx-Info.plist file for your project and add the "signeridentity" item with the value "Apple iPhone OS application signing". Save.
- Connect your iPhone to your computer. In xcode WINDOW> organizer, your iPhone is detected. check that the iPhone and your xcode are properly recognized and exit organizer. Select "iPhone device-3.1.2 | release" as the compiling environment and click "Build and go ", during this period, let's select the signature certificate, click "allow", and pray that your iPhone screen is on.
- Your program will be automatically downloaded to your iPhone. Click to run without any error prompt.
PS:
There are a few small issues. Let's talk about it to avoid future detours.
1. if you do not install xcode on the system disk, for example, I am in another partition, run the following command: CD/volumes/partition volume tag/xcode Folder/platforms/iphoneos. platform/developer/library/xcode/plug-ins/iphoneos \ build \ System \ support. xcplugin/contents/MACOs/others don't seem to need to be changed, but I just typed them in the terminal one by one, instead of copying and pasting them. It's fast to directly complete them with tab.
2. if you have used other methods and created a new certificate, you must delete the previous certificate before this operation (in/application/key access or Chinese key string access ), in addition, it is best to log out and delete it again. Otherwise, it may not be possible to delete it. I just did not delete it, and many questions were asked later.