Step 1 of iPhone app development: Debug helloworld from scratch
ICC original, reprinted please indicate the source!
Recently, I started to study iPhone development. Because there is no mac, I used amd cpu + win7 + VMware to install Mac OS X snow leopard, upgrade it, And then install xcode 4.2 and iOS SDK 5.0, it is one of the most difficult and difficult ways to do. If conditions permit, do not make some tossing, time-consuming and labor-consuming. Since then, the real machine debugging is my iPhone 4S, the System 5.0 has been jailbroken, non jailbreak machine and no IDP account How to debug, I did not test. You will definitely log on to the app stroe later.
The focus is as follows:
1. Install VMware and Mac OSX snow leopard
Note: My machine configuration is as follows. If it is lower than this configuration, we recommend that you discard this installation. We recommend that you buy and buy a Mac. Otherwise, even if it is installed, it does not have much practical significance. One word: Card
In addition, the virtual machine hard disk should be at least GB of space, one time in place, to avoid future troubles.
I also learned the installation process online. Refer to this article:Http://bbs.weiphone.com/read-htm-tid-1628444.html
Note the following points: (1) the ISO to be guided should be correct. Before installing the system, because it is an AMD machine (Intel can already install lion, which will not be discussed here). The application of darwin_snow_legacy.iso is used, for guidance, and then install it all the way until it is successful;
(2) After the installation is complete, install vmtools for sharing and the sound card driver. (3) Upgrade the system (I upgraded from 10.6 to 10.6.7 ), install the kenerl cracking patch before the upgrade. Otherwise, the patch is necrotic and must be reinstalled. You can download the combo upgrade file by yourself (for example, macosxupdcombo10.6.7.dmg). (4) After the upgrade, you can use darwin_snow_legacy.iso to change the system to rebel EFI. ISO. So far, the installation of Mac OSX has been completed. The following are the various files to be used. The following files are not guaranteed to be valid here. If they are invalid, find them by yourself. The link hats mentioned above include:
VMware 8.0 and finished packages: http://3.xp510.com: 801/xp2011/vmware_workstation_wmb.zip
Mac OSX system Snow Leopard 10.6: [official version of the apple Snow Leopard operating system]. snowleopard_10a432_userdvd.dmg has been lost. It is estimated that there are many verycd or other systems with 10.6 download and download.
Darwin_snow_legacy.iso: http://hot23.down.115.com/gdown_hot23/66/57/b719b7af17d97f760c736f6dc0685ceeff2c46fd/darwin_snow_legacy.iso.zip? Bytes
Rebel EFI. ISO: Thunder: // outputs =
Mac OSX system 10.6.7 (or higher) combo upgrade package: Apple official website can: http://support.apple.com/kb/DL1361
Kernel Cracking patch, must be installed in the combo upgrade package before installation, otherwise, the system is installed in white, from the beginning to the legacy_kernel.pkg.zip: http://zjmcc.att.weiphone.com/temp11/Day_110211f/legacy_kernel-10.6.0.pkg.zip (how to install this file? Install it on Mac 10.6)
2. Install xcode later
It is very difficult. During the installation process, black screen may be restarted several times. It is related to wood. It has been installed in the/developer/applications directory with xcode and can be run on OK. What error does it report?
: Http: // 119.84.79.248/file/mdawmdawmdf7vghqhcs3pe2fepljpjlhxneibit2q2rjklrih34mrw .. /3eae10560d2dd03dfc91_ca224136c8d15/% 5bwww.pc175.com % 5 dxcode % 204.2% 20ios % 20sdk % 205% 20% 28 snow % 20 Leopard % 29% E4 % B8 % 8B. torrent? Key = aaabqe_obdoj7ljt & P = & A = 0-3da644f7 & mode = download
3. Upgrade iTunes to version 10.6 or later. Do not upgrade other software components. You only need to download the latest version of iTunes. Otherwise, the system may be installed in white. The consequence of not upgrading iTunes is that the iPhone is unresponsive and not recognized.
4. Learn how to write a helloworld in xcode and start the debugging process on the real machine after it runs successfully in the simulator of IOS 5.0.
First, the iPhone needs to be jailbroken. A non-jailbroken machine does not study how to debug a real machine without an IDP account.
Next, we need to do some things:
(1) create a certificate: in addition to the name, just confirm it all the way:
Select key string access
Enter iPhone developer
(2) then, modify some things in shell:
Modify sdksettings. plist
Back up the original file first:
CD/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos4.3.sdk/
Sudo CP sdksettings. plist sdksettings. plist. orig
Edit:
Sudo VI sdksettings. plist
Change "yes" in the following two paragraphs to "no ".
<Key> code_signing_required </key>
<String> Yes </string>
...
<Key> entitlements_required </key>
<String> Yes </string>
Modify info. plist
Back up the original file first:
CD/developer/platforms/iphoneos. Platform/
Sudo CP info. plist info. plist. orig
Edit:
Sudo VI info. plist
Modify all xciphoneoscodesigncontext to xccodesigncontext. There are three parts in total.
(3) set your helloworld project in xcode and change all Code Sign items to don't code sign: (every project in this step needs to be done once)
Then, plug in your iPhone (my iPhone 4S, 5.0 system), and click the USB icon in the lower-right corner of VMware to confirm that the host is disconnected (that is, it is disconnected from win7, connect to the virtual machine). Then, run xcode once. Because this is the first time this device is inserted, xcode will start orgnizer to identify your iPhone, and because it is a jailbreaking machine, the system will prompt that the system cannot be identified and the information to be collected is related to wood. Click collect until your iPhone is displayed in the device in orgnizer, and there is a small green dot (red or yellow dots both indicate that the configuration is still unsuccessful), which means your iPhone has been accepted by xcode. Now, go back to xcode and select your iPhone at scheme. Everything is okay. Select your iPhone, run, and report any error until the iPhone has your helloworld installed.Program.
Well, I will write it here first. There must be errors or omissions, which will be supplemented later. In short, it is very painful for non-Mac machines to play with MAC systems and xcode. We still need a certain level of RP. Good luck!