IOS Development Study Notes (1)

Source: Internet
Author: User
I. Necessary Conditions

1. an Intel-based Macintosh computer running snow leopard (OS X 10.6.5 or later.

2. Register as an iOS developer and download the ios sdk.

3. Download The xcode integrated development environment.

2. developer selection:

1. The free SDK contains a simulator that allows you to create and run iPhone and iPad on Mac.Program. However, the simulator does not support certain hardware features, such as the iPhone accelerator or camera, and does not support installing applications on the actual iPhone or other devices. The developed applications cannot be published to the appstore. To implement these functions, You need to register two additional billing options.

2. The standard solution is $99 a year. It provides a large number of development tools, resources and technical support, and supports publishing applications on the appstore. The most important thing is to support debugging and testing on iOS, not on simulators.Code.

3. The enterprise plan is USD 299 a year. It is intended for enterprises that develop dedicated and internal IOS applications.

Iii. What are the differences between writing iOS programs: 1. Only one application is running

On iOS, only one application is activated and displayed on the screen within a specific period of time. Starting from IOS 4, when you press the Home button, the application may continue to run in the background, but this situation is only limited to specific scenarios.
When the application is not activated or is not running in the background, it does not attract any attention from the CPU, which will lead to network disconnection and other problems. IOS 4 has greatly improved its background processing capabilities, but your own efforts are required to make your applications continue to run well in this case.

2. There is only one window

In the desktop and laptop operating systems, multiple programs can run simultaneously, and multiple windows can be created and controlled separately. IOS is different. It only allows applications to operate on one "window ". All interactions between applications and users are completed in this window, and the size of this window is the size of the IOS screen, which is fixed.

3. Restricted Access

Programs on computers can access any content that their users can access, while IOS strictly limits the access permissions of applications.
You can only read and write files in the file system that iOS creates for the application. This area is called a sandbox for applications, where applications store various types of data such as documents and preferences that need to be stored.
There are other restrictions on the application. For example, you cannot access a network port with a small port number on iOS, or perform operations that require root user or administrator permissions on a desktop computer.

4. limited response time

Because of the special usage, ios and its applications need to have a fast response time. When you start an application, you need to open it, load preferences and data, and display the main view on the screen as soon as possible, which will be completed in seconds.
As long as the application is running, you can drag a menu bar below it. If you press the Home button, IOS returns to the home page. You need to quickly save everything and exit. If the application is not saved within 5 seconds and the control is abandoned, the application process is terminated, regardless of whether the user has saved the application.

Note that in IOS 4, this situation is improved because of the existence of a new API. This API allows your application to apply for more time before termination.

5. Limited screen size

The iPhone's screen displays very well. Since its launch, it has been the screen with the highest resolution among consumer devices.

However, the display screen of the iPhone is not big, and the space you use is much smaller than that of modern computers. The latest Retina Display (iPhone 4 and 4th-generation iPod Touch) is only 640x960 pixels, the older version is only 320x480 pixels.

In addition, the current size is the same as before, except that the retina display is 640x960 pixels, so do not think you can put more controls or something-only the resolution is higher than before.

The iPad is slightly larger, which is 1024x768 pixels, but not very large. In stark contrast, Apple's cheapest iMac supports 1920x1080 pixels while the cheapest laptop MacBook supports 1280x800 pixels. Apple's largest display, the 27 inch led cinema display, supports ultra-large 2560x1440 pixels.

6. Limited system resources

Any Senior Programmer reading this book may sneer at machines with 256 MB of memory and 8 GB of storage space because of their limited resources, but such machines actually exist. Perhaps, developing IOS applications is not at the same level as writing complex spreadsheet applications on a machine with a memory of 48 KB. The two are not comparable, however, due to iOS's graphic attributes and functions, its insufficient memory is very likely to occur.

Currently, the physical memory of IOS is either 256 MB or 512 MB. Of course, the memory will continue to grow in the future. Some of the memory is used for screen buffering and other system processes. Generally, less than half (or even less) of memory will be left for applications.

Although these memories may be sufficient for such a small computer, there is another factor to consider when talking about IOS memory: modern computer operating systems, such as Mac OS X, some unused memory blocks are written to the swap file on the disk. In this way, when the memory requested by the application exceeds the actual available memory of the computer, it can still run. However, IOS does not write volatile memory (such as application data) into swap files. Therefore, the amount of memory available for applications is limited by the amount of physical memory not used in mobile phones.

Cocoa touch provides a built-in mechanism to notify applications of insufficient memory. In this case, the application must release unnecessary memory and may even be forced to exit.

7. Garbage collection is not supported

As mentioned before, cocoa touch uses objective-C 2.0, but a key feature of this language is not available in IOS: Cocoa touch does not support garbage collection.

8. New Features

As mentioned above, cocoa touch lacks some features of cocoa, but some new features in ios sdk are not available in cocoa, or at least not on any mac.

    • The iPhone SDK provides an application with a locating method, that is, using core location to determine the current geographic coordinates of the mobile phone.
    • Most IoS also provides a built-in camera and photo library, and the SDK allows applications to access the two.
    • IOS also provides a built-in accelerator (with a gyroscope in the latest iPhone and iPod Touch) to detect the grip and movement of the host.
9. distinctive methods

IOS does not have a keyboard or mouse, which means that it interacts with the user in a completely different way from a common computer during programming. Fortunately, most interactions do not need to be handled by you. For example, if you add a text field to an application, IOS knows to call the keyboard when the user clicks this field, and you do not need to write any additional code.

DescriptionCurrently, devices support Connecting External keyboards through Bluetooth, which provides a good keyboard experience and saves some screen space, but this situation is still very small. The mouse connection still does not work.

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.