Installation of xcode image and text tutorials for Apple iPhone development environment in Windows

Source: Internet
Author: User

Because xcode can only be installed on mac systems ~ Therefore, we only need to install the Virtual Machine in Windows, and then install the mac system on the virtual machine.

The latest official version of Xcode for Mac (Apple software development tool)

Http://www.6686.com/soft/2264.html

Installation conditions:

Software:

VMware:

Mac OS:

IPhone SDK:

Darwin. iso or Rebel EFI. iso boot cd iso Image File

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

1. Download the installation package

2. Install the Virtual Machine VMWare

Virtual Machine VMWare Workstation 9 installation tutorial

2.1 install virtual machines

Install the VM on Windows XP: VMWare Workstation.

2.2 create a virtual machine

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

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

Select the path to save and Click Browse.

Click Finish, as shown in figure

[Page_break]

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. Best 30 GB

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.

In Devices, double-click one of the list to modify it.

Memory is the Memory size, modified to 1024

Processors indicates that the cpu is changed to 1 (the default value is 1)

Hard Disk (SCSI) is a Hard Disk and is changed to 30

Then delete Floppy. Select it and click Remove to delete it.

Click OK to save the modification.

2.4 Virtual Machine Modification

Find a file with the. vmx extension under the created virtual machine directory,

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, in the upper left corner of the VM, the OS version is displayed as mac OS X Server 10.6.

If it is still displayed as FreeBSD 64-bit, restart the VM VMWare.

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 the Virtual Machine VMWare

Virtual Machine VMware 9 installation of Apple mac osx 10.8 graphic tutorial

3.1 boot with a Darwin. iso or Rebel EFI. iso image.

Double-click CD/DVD (IDE) in Devices)

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

Select Use ISO image file on the right,

Click Browse to load Darwin. iso or Rebel EFI. iso.

After loading the image file, start the VM and click Power on this virtual machine. Click the CD sample in the lower-right corner of the VMWare tool to re-import the image. Click Reload of the VM.

Reload

If the import is successful

[Page_break]

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. Several minutes.

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.

The interface shown in figure is displayed when the import is successful.

Then import the Mac OS image. Remember to check the "Connected" option. Appears

[Page_break]

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

Click the arrow to enter

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;

Finished. You can see the disk.

[Page_break]

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,

4. Share the XP and MAC directories (if you cannot share them online, or you can use the hard disk to check them)

Because I downloaded necessary Mac OS and iPhone SDK files from Windows XP,

Therefore, to install the iphone development environment, you 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:

5. Install iphoneSDK:

2. Install the IPhone SDK

1. the suffix of the iPhone sdk is. dmg: double-click the file. In the dialog box that appears, click "skip". Three files are displayed, namely, About iPhone SDK.pdf and iphone sdk. mpkg, Packages. for example:

2. Double-click the iPhone sdk. mpkg and press Custom Install on "Macintosh HD,

This shows that the iPhone SDK is not optional and you don't know what the problem is. You don't have to worry about it. There are solutions below. We chose all the options, install all packages in the default path.

Note: The installation path of the Developer Tools essenessenpackage (/Developer by default) must be installed in the same path when installing the iPhone SDK.

In fact, Xcode3.1 has been installed in this step.

3. Install the iPhone SDK.

Go to the Packages folder in the. mdg package, that is, the Packages folder in the first figure. Select the following five Packages to install them one by one. Each package name starts with iphone.

Note:

To install it in the same directory as Developer Tools essen, that is,/Developer

If it has been installed in another directory, you do not need to reinstall it. Go to the installation directory. The default value is/Platforms. Then copy the iPhone. platform and iPhone simulator. platform to/Developer/Platform. Be careful not to copy the entire/Platforms.

Currently, you cannot build an iphone project, even if it is built, it cannot be compiled. The following error occurs:

No ubuntures to compile for (ONLY_ACTIVE_ARCH = YES, active arch = ppc, i386 VALID_ARCHS =)

Further configuration files are required.

Do not compile and compile the HelloWorld project before solving the problem.

4. Configure the ubuntures. xcspec File

Because the official iPhone SDK only supports Intel Mac with OSX 10.5 .. Therefore, you need to change the configurations of all intel.

Go to/Developer/Platforms/iPhoneSimulator. platform/Developer/

Library/Xcode/Specifications/, you will see 3 files, modify the ubuntures. xcspec File

Note: Do not use the copy internal Page code. manually enter the code because the webpage encoding is inconsistent.

The specific modification is as follows:

(

// 32-Bit

{Type = Architecture;

Identifier = Standard;

Name = "Standard (iPhone Simulator: i386, ppc )";

Description = "32-bit iPhone Simulator ubuntures ";

ListInEnum = YES;

SortNumber = 1;

Real‑tures = (i386, ppc );

Ubunturesetting = "ARCHS_STANDARD_32_BIT ";

},

// Old-style Debug

{Type = Architecture;

Identifier = Native;

Name = "Native Architecture of Build Machine ";

Description = "32-bit for build machine ";

ListInEnum = YES;

SortNumber = 101;

Ubunturesetting = "NATIVE_ARCH ";

},

// G3

{Type = Architecture;

Identifier = ppc;

Name = "Minimal (32-bit PowerPC only )";

Description = "32-bit PowerPC ";

PerArchBuildSettingName = "PowerPC ";

ByteOrder = big;

ListInEnum = No;

SortNumber = 201;

},

// G4. This is the model of my server.

{Type = Architecture;

Identifier = ppc7400;

Name = "PowerPC G4 ";

Description = "32-bit PowerPC for G4 processor ";

ByteOrder = big;

ListInEnum = NO;

SortNumber = 202;

},

// G5 32-bit

{Type = Architecture;

Identifier = ppc970;

Name = "PowerPC G5 32-bit ";

Description = "32-bit PowerPC for G5 processor ";

ByteOrder = big;

ListInEnum = NO;

SortNumber = 203;

},

// Intel

{Type = Architecture;

Identifier = i386;

Name = "Intel ";

Description = "32-bit Intel ";

PerArchBuildSettingName = "Intel ";

ByteOrder = little;

ListInEnum = NO;

SortNumber = 105;

},

)

Note: Do not copy. You can only enter the above Code by hand. Otherwise, an error occurs !!

This completes the settings.

[Page_break]

Simple Interface Builder project to implement Hello World.

Double-click/Developer/Applications/Xcoide. app

Remember to go To the shortcut bar hidden below to find the newly started Xcode, and then File-> new project.

Select View-Based Application.

Then, name the project as follows:

Then we can see the following:

Expand the Resources directory under Groups & Files and double-click MainWindow. xib. The xib Main Window and libery window will pop up. If not, you can use Tools to bring up the window. There are different controls in Libery. You can drag and drop them to the View window, click the selected control, and choose Tools> inspetor to open the Properties window and modify the control properties.

Then File-> Save, Build-> build and run.

Success !!

6. Start XCODE and start development.

Start the Xcode development environment:

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

Double-click the Xcode icon to start Xcode:

Click the "Create a new Xcode project" icon to open the project template window:

Select the "View-based Application" icon in the iPhone OS Project template 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. After compilation is complete, the iphone simulator is automatically started.

I hope it will help you.

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.