Build IOS Environment

Source: Internet
Author: User

Installation conditions:

Hardware: a PC with a 64-bit dual-core processor supporting virtual technology and 2 GB memory or above.

Note: To Run Mac OS, you need to support virtual technology (VT) on the computer. During installation, You need to enable VT in BIOS.

You can download this tool from the following website to test how your computer supports Vt:

Http://www.grc.com/securable.htm

Or click the following link to download:

Http://www.grc.com/files/securable.exe

Software:

Windows XP:

VMware: VMware-workstation-7.0.0-203739 EXE Installation File

Mac OS: mac_ OS _10.6_snow_leopard_10.6 DMG image file

IPhone SDK: iphone_sdk_3.1.2_with_xcode_3.2.1 DMG image file

Darwin. ISO or rebel EFI. ISO boot cd iso Image File

1. Download the installation package

1. Download VMware 7.0:

This is the link of vmware-workstationstandard version .exe. You can download it with thunder:

Http://download.pchome.net/system/sysenhance/detail-4673.html

1. 2. Download Mac OS:

This is Apple's operating system. This article downloads leosnow, Mac OS 10.6.2. The iPad and iPhone sdks require a MAC of 1.6.

This link can be downloaded using Thunder:

Http://www.verycd.com/topics/2778507

Find a seed for installing Mac and download it here (which contains all the boot files, which is very convenient). I have downloaded it and set up the iPhone development environment, real availability is found. If you are using this tool, skip the installation of Mac on the VM and check the following environment.

Http://www.rayfile.com/zh-cn/files/6b56760a-1eb5-11e0-81b6-0015c55db73d/

1. 3. Download the iPhone SDK:

Xcode_3.2.3_and_iphone_sdk_4 _ final. DMG 2.06 GB

Software Development Kits for iPad and iPhone, including xcode 3.2.3 integrated development environment, iPhone sdks (up to 4.0 supported), iPhone OS simulator, and performance analysis tools

System Requirements: for intel-based Mac computers, run the OS seeds for Mac OS x snow leopard 10.6.2 or later. I put them on rayfile. You can download them:

Http://www.rayfile.com/zh-cn/files/21e1da05-0e45-11e0-9cd4-0015c55db73d/

This BT seed has been downloaded and tested, which is very slow. Sometimes the downloading process stops and there is no speed. The official website is provided below, but you need to log in with an Apple id. If you do not have an ID, register it first.

Http://developer.apple.com/ios/download.action? Path =/iPhone/iphone_sdk_4 _ final/xcode_3.2.3_and_iphone_sdk_4 _ final. DMG

. Download Boot Disk:

Darwin. ISO or rebel EFI. ISO is used to boot the ISO image file on the CD.

Darwin. ISO http://www.verycd.com/topics2818537

Rebel EFI. ISO http://www.rayfile.com/zh-cn/files/689c7f1c-0f05-11e0-a0c9-0015c55db73d/

1.5 register a mac account

Http://developer.apple.com/programs/register/ I cannot register... Khan...

2. Install vmware7.0

2.1 install virtual machines

Install the VM on Windows XP: VMware Workstation 7.

This document installs vmware-workstation-full-7.1.3-324285.exe.

There are 14 sets of available registration codes I have collected here. Of course I have not tried them one by one. I chose one of them, which is correct. Try the other.

 
 
  1. CC542-2QF41-M847P-EZPQT-Q3AU6
  2. UA7MH-0NW80-08EVZ-7XMZT-MGAZA
  3. YY1E0-A6E51-M892Y-FGPZZ-XC0TF
  4. ZY7N8-F7Y44-M88RP-VGWXZ-QAAR2
  5. FC78A-6ZXDN-M88DP-DPN7V-YZHX4
  6. FA18H-4ZZ15-M805P-6MN5G-ZY0G0
  7. AF1T0-4PW1M-H84LP-FDQ5C-ZQ0T4
  8. VV3M0-42Z4M-M80XY-T5PNT-MAUZF
  9. CG308-08Y10-0892Q-XNMEZ-PKKD0
  10. GY51K-2MED5-M84MQ-5EPG9-NLUUD
  11. CC542-2QF41-M847P-EZPQT-Q3AU6
  12. VA34H-DWWD6-08ELZ-3XQ7X-PAK90
  13. AF1R8-21X17-M8EHQ-QYZXX-WKKW8
  14. VU59U-D0E0L-48ENQ-G6WGG-PQUZF

For the corresponding Chinese patch, please download it here:

Http://www.rayfile.com/zh-cn/files/83d4fbf5-0f00-11e0-b6ba-0015c55db73d/

2.2 create a virtual machine

Use File-> New-> Virtual Machine to create a virtual machine.

Standard (recommended)-"

Install the operating system later-"

When selecting an operating system, select other-> FreeBSD 64-bit.

2.3 Virtual Machine Settings

1. Set the CPU to 1-core or 2-core.

2. The recommended memory size is 1024 MB.

3. At least 15 GB for the hard disk.

4. Delete the drive.

You can delete the soft drive in the Customize hardware option, because we will not use the soft drive any more.

The hardware I set is as follows:

2.4 Virtual Machine Modification

Do not rush to enable the VM after it is created. Disable VMware. Enter the created virtual machine directory and find a file with the extension. vmx,

Open it with notepad or ue, find the guestos = "freebsd-64" line,

Change the freebsd-64 in quotes to darwin10,

The modified file is guestos = "darwin10". Save the modified file.

Now, on Vmware, choose Options> General options on the VM,

The OS version is Mac OS X Server 10.6.

If the Mac OS X installer cannot be started later, this step may be ignored or the modification is incorrect.

3. Install Mac OS on vmware7.0

3.1 boot with a Darwin. ISO image.

First load the image file: in the Virtual Machine Settings> hardware just created,

Select a CD/DVD (IDE) device,

Select use ISO image file on the right,

Click Browse to load Darwin. ISO.

After the image file is loaded, start the VM.

Run the rebel EFI image to start the instance. After the boot is complete, follow the prompts.

Follow the on-screen prompts to wait for 10 seconds or press the '1' key to select the current disc drive.

We are prompted to insert the Mac OS X DVD.

Now, we can re-open the settings-> hardware,

Find the CD/DVD (IDE) device (you can double-click the disc icon in the lower right corner of the VMware window to quickly open it ,),

Replace the rebel EFI image with the DMG image of the Apple system;

Click Browse and change the file type CD-ROM images (*. ISO) to all files (*. *) to browse the DMG file.

Here is a key point: After selecting the DMG image file,

Check connected in device status (otherwise, the installation interface cannot be entered), and then confirm.

Now, we enter the installation preparation stage of Mac OS X.

Some friends may use the rebel EFI boot to prohibit symbols and cannot install it.

If this problem occurs, replace rebel EFI with the Darwin image and restart the VM.

After the prompt page appears, change the Darwin image to the Apple DMG image on the CD/DVD (IDE) device. Remember to check the "connected" option.

After a while of preparation, the installation process of the Apple system was started;

Some students do not see the hard disk option during the steps for selecting and installing a disk,

Choose utility> disk tool from the menu at the top of the screen ";

"Erase" your virtual hard disk;

After the operation is complete, close the "disk tool" window;

Depending on your computer configuration, you can use the Apple OS after tens of minutes of installation.

The page indicates that your system has been installed and needs to be restarted.

Before restarting, you must remove the Apple DMG image loaded on the CD/DVD (IDE) device during installation,

Change to the Darwin or rebel EFI boot image. Otherwise, you will not be able to boot the installed Mac OS X system.

If one boot fails, try using another boot image.

If you need to install sound cards, graphics cards, and other drivers on the Mac system of VMware, you can find related articles and drivers online,

Or refer to "no! Unlimited! This article will not go into details about installing snow leopard 7.0 on VMWare Workstation 10.6 virtual machines.

4. XP and Mac shared directories

Because I downloaded necessary Mac OS and iPhone SDK files in Windows XP, to install the iPhone development environment, I need to burn the downloaded installation package file to a CD; if you do not want to burn a CD, you can directly upload these files to the Virtual Machine VMware 7 for installation.

Here I use Windows XP and VMWare shared directory.

In XP, you need to share the iphonesdk directory with the MAC (leosnow) method in vmware7.0:

4.1 In Windows XP, you need to set the directory iphonesdk to share

Step: Set the iphonesdk directory to share in Windows XP:

Right-click,

Select Properties> share, select share this folder on the network, and click OK.

. Write down the IP address of Windows XP

4.3 Access the XP shared directory on the Mac installed in vmware7.0

On the Mac installed in vmware7.0, access the iphonesdk directory, the shared directory in XP.

Step: on Mac, click the finder menu item in the main menu,

Press and hold the command button and K key combination,

Note: cmd + k on a common PC or laptop (non-Mac computer), connection server, SMB: // ip address:

After SMB: //, enter the IP address of Windows XP: 192.168.6.222 and click "Connect". The following prompt is displayed:

Select the iphonesdk directory to be shared and click OK to open the shared directory:

Or you can access the network to see if there is any LAN sharing. If there is any, you can simply open it.

5. Install iphonesdk (ipadsdk ):

1. Find the installation file of the iPhone SDK on Mac:

"Iphone_sdk_3.1.2_with_xcode_3.2.1 _ snow_leopard _ 10m2003. DMG", double-click the file icon and you will see a pop-up window:

Click "continue" to display the installer welcome page:

Click "continue", which is the software "License" agreement information:

Click "continue". The "OK" window appears:

Click "agree" to see the Agreement information:

Click "continue". The "OK" window appears:

Click "agree". The installation path selection window is displayed:

After selecting the installation target path, click "continue" to display the "installation type" selection window:

Click "continue". The "OK" window appears:

Click "Install:

Note: before the installation process, You need to exit iTunes first.

On the iTunes icon, right-click and select "exit" from the pop-up menu to close it:

Then, click "continue" to continue the installation:

Note: If the installation fails, change the system time to "" And reinstall the system. I tried it myself. It works.

After the installation is completed, the following message is displayed:

After the installation is complete, click "finish.

6. Start xcode and start development.

StartXcodeDevelopment Environment:

Open the finder. In the "Developer" directory on the disk, there is an xcode program in the "Applications" directory,

Double-clickXcodeIcon, that is, start xcode:

Click the "Create a New xcode project" icon to open the project template window:

SelectIPhoneIn the OS Project template, click the "View-based application" icon and click the "choose" button:

The system prompts you to enter the new project name and the Directory saved by the new project,

After entering the information as prompted, click "save". A new window is displayed, showing the project generated by the wizard and the project directory and files:

Click the "build and run" icon to start compilation;

Starts automatically after compilation is completed.IPhoneSimulator.

Summary:IOSDevelopment LearningIDEI hope this article will be helpful to you.

In addition, if you encounter a problem of installing snow leopard with Vmware during the installation process, "the virtual CPU has been turned off".

I tried to solve this problem for one afternoon. I checked CPU virtualization, whether or not the motherboard virtual machine was enabled, and the CPU instruction set. I checked the CPU instruction set for a long time over a hundred degrees, I finally solved this problem. I know it is not easy to chew on an apple. I hope it will help you with the kids shoes that have encountered this problem!
Our solution: When the CPU does support VT virtualization, we tried Darwin. this problem still occurs after the IOS boot file, and rebel EFI has been tried. the IOS answer is yes, no. I finally found a darwin_snow_legacy.iso boot file and finally succeeded. At that time, I had no tears, so I got a result, in the case of a similar situation, it is better for all the children's shoes to replace the boot file. For example, if there are three rounds, please be patient.

Resources: Apple developers Alliance Chinese site http://www.apple.com.cn/developer/support/

IPhone developer Alliance http://iphone.tgbus.com/dev/

Open class at Stanford University: iPhone development Basics
Http://v.163.com/special/opencourse/iphonekaifa.html also provides MP4 format video file download, convenient subway family with iPhone Learning

In addition, an error occurs when I install xcode,

The Installation failed

Xcode the installation failed an unknown error occurred, the installer encountered
An errorThat causedInstallationToFailed

The solution is really strange. It turns out that the Mac OS system can be changed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.