Tutorial on creating an IPhone Development Environment

Source: Internet
Author: User

IPhone Development Environment ConstructionIs the content to be introduced in this article, mainly about balancingEnvironment Construction, Which is detailed for friendsIphone DevelopmentFirst, let's look at the details.

1. Determine the Mac OS version

Version: Mac OS X version 10.5.5

 
 
  1. CPU: Processor 1 GHz PowerPC G4  
  2. iPhone SDK:iPhone_sdk_for_iPhone_os_2.2.19m2621afinal.dmg 

Note: Each IPhone SDK may be compatible with different Mac OS versions. This SDK supports Versions later than 10.5.3. In addition, different CPU configuration files for Intel and PowerPC are also different. For details, see the following section.

Important: the official iPhone SDK only supports Intel Mac with OSX 10.5.

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 is/Developer by default). You must install the SDK 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:

 
 
  1. No architectures to compile for (ONLY_ACTIVE_ARCH = YES, active arch = ppc, i386 VALID_ARCHS =) 

Further configuration files are required.

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

 
 
  1. /Developer/Platforms/iPhoneSimulator.platform/Developer/  
  2. Library/Xcode/Specifications/ 

You will see three files, and 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:

 
 
  1. (
  2. // 32-Bit
  3. {Type = Architecture;
  4. Identifier = Standard;
  5. Name = "Standard (iPhone Simulator: i386, ppc )";
  6. Description = "32-bit iPhone Simulator ubuntures ";
  7. ListInEnum = YES;
  8. SortNumber = 1;
  9. Real‑tures = (i386, ppc );
  10. Ubunturesetting = "ARCHS_STANDARD_32_BIT ";
  11. },
  12. // Old-style Debug
  13. {Type = Architecture;
  14. Identifier = Native;
  15. Name = "Native Architecture of Build Machine ";
  16. Description = "32-bit for build machine ";
  17. ListInEnum = YES;
  18. SortNumber = 101;
  19. Ubunturesetting = "NATIVE_ARCH ";
  20. },
  21. // G3
  22. {Type = Architecture;
  23. Identifier = ppc;
  24. Name = "Minimal (32-bit PowerPC only )";
  25. Description = "32-bit PowerPC ";
  26. PerArchBuildSettingName = "PowerPC ";
  27. ByteOrder = big;
  28. ListInEnum = No;
  29. SortNumber = 201;
  30. },
  31. // G4. This is the model of my server.
  32.  
  33. {Type = Architecture;
  34. Identifier = ppc7400;
  35. Name = "PowerPC G4 ";
  36. Description = "32-bit PowerPC for G4 processor ";
  37. ByteOrder = big;
  38. ListInEnum = NO;
  39. SortNumber = 202;
  40. },
  41. // G5 32-bit
  42. {Type = Architecture;
  43. Identifier = ppc970;
  44. Name = "PowerPC G5 32-bit ";
  45. Description = "32-bit PowerPC for G5 processor ";
  46. ByteOrder = big;
  47. ListInEnum = NO;
  48. SortNumber = 203;
  49. },
  50. // Intel
  51. {Type = Architecture;
  52. Identifier = i386;
  53. Name = "Intel ";
  54. Description = "32-bit Intel ";
  55. PerArchBuildSettingName = "Intel ";
  56. ByteOrder = little;
  57. ListInEnum = NO;
  58. SortNumber = 105;
  59. },
  60. )

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

This completes the settings.

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.

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

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

Summary:IPhone Development Environment ConstructionI hope this article will help you with the introduction of this tutorial!

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.