iOS simulator iOS simulator detailed graphics and text usage tutorial

Source: Internet
Author: User
Tags command line

The iOS Simulator is a helper tool that can be used when developing a program on the iOS platform under Mac. iOS Simulator is part of the Xcode, Xcode is Apple's own iOS development program that can be downloaded for free!

The IOS Simulator is located in the/developer/platforms/iphonesimulator.platform/developer/applications folder. Typically, you do not need to start iOS simulator-it automatically starts when you run (or debug) an application Xcode. Xcode will automatically install the application on the iOS simulator.

IOS Simulator is not an emulator

IOS Simulator is an emulator, but not an emulator. What is the difference between the two? The simulator mimics the behavior of the actual device. Iphonesimulator will imitate the real behavior of the actual Ios/ipad device. But the simulator itself uses various libraries on the MAC, such as QuickTime, to render the effect consistent with the actual iphone. In addition, the application tested on the emulator compiles to x86 code, which is the byte code that the emulator understands. The actual iphone device uses arm code.

iOS supported (analog) devices

My iOS 5.1 simulator here has 4 supported devices:

That

Ipad

IPad (Retina)

Iphone

IPhone (Retina)

How to open the iOS emulator

Xcode iOS Emulator (to debug the current program) automatically when you compile it

When you debug the iOS program in Xcode, tap the corresponding run:

Xcode will compile the current iOS project, and after the compilation succeeds, it will automatically and call the iOS emulator and run the corresponding compiled program:

Note: Your current project, using the corresponding simulator needs to be set to the corresponding simulator.

For example, my project here is for the iphone, so set it for the iphone 5.1 Simulator:

Manually open the iOS simulator

If necessary, of course, you can manually open the corresponding iOS simulator.

Through Xcode->open Developer Tool->ios Simulator:

You can open the corresponding iOS emulator.

About the interface in the iOS emulator

A total of three interfaces:

Here is the third interface: application

This is the second interface: the iphone main function interface

First interface Search interface:

Switching between three interfaces

In addition to clicking on that small dot, you can also drag through the mouse:

Experience with iOS simulator

1. Custom (GPS, (Google) map will be used in the current coordinates)

An inadvertent discovery of a feature that allows you to customize the current coordinates:

The default coordinates are the coordinates of the Apple headquarters:

Latitude: 37.785834

Longitude:-122.406417

This address, the "secret" was discovered before debugging the Add Map feature.

Regarding the coordinates, the map aspect content, may refer to the post of interest:

Support for adding maps to your Second IOS app:birdwatching

Correspondingly, you can see that some other addresses have been provided above, such as:

Apple Stores

Apple

City Bicycle Ride

City Run

Freeware Drive

I temporarily do not go to toss, interested people, can try it on their own.

2. Where is the screenshot saved by "Storage screen shot"?

To store a screenshot from a file->:

A screenshot of the current iOS simulator can be stored.

But where are the saved pictures?

In this, refer to the location where the image is saved after a screenshot in the emulator, but the Finder (equivalent to a resource manager in Windows) cannot find what it says

/Library/Application Support/iphone simulator/

Then forced himself to do a good toss.

Later, the corresponding iphone Simulator was found through the command line:

crifan$ pwd

/users/crifan/library/application Support/iphone simulator/5.1

limatoimac:5.1 crifan$ cd/users/crifan/

limatoimac:~ crifan$ Ls-la

Total 72

drwxr-xr-x+ Crifan Staff 578 8 14 13:50.

Drwxr-xr-x 5 Root Admin 170 8 8 21:16.

-RW-------@ 1 Crifan Staff 5 8 8 21:16. Cfusertextencoding

-rw-r--r--@ 1 Crifan Staff 24580 9 10 16:52. Ds_store

DRWX------Crifan Staff 442 9 5 15:49. Trash

-RW-------1 Crifan Staff 1033 8 13:50. bash_history

-RW-------1 Crifan staff 1098 8 13:50. Viminfo

Drwxr-xr-x 7 Crifan Staff 238 9 09:49 Cocoanotepad

DRWX------+ 6 Crifan Staff 204 9 16:50 Desktop

DRWX------+ 6 Crifan Staff 204 8 10:52 Documents

DRWX------+ Crifan Staff 408 8 17:12 Downloads

DRWX------@ Crifan Staff 1394 8 11:08 Library

DRWX------+ 3 Crifan Staff 102 8 8 21:16 Movies

DRWX------+ 7 Crifan staff 238 8 14:56 Music

DRWX------+ Crifan Staff 9 15:19 Pictures

drwxr-xr-x+ 5 Crifan Staff 170 8 8 21:16 Public

Drwxr-xr-x 5 Crifan Staff 170 9 7 15:36 Develop

Visible, the current user Crifan below, there is a corresponding library under which there is

Application Support/iphone simulator/5.1

However, as a result,/users/crifan/library/is a hidden folder, causing the Library folder to be found in the Finder, Crifan folder.

Then came the idea that the Finder had a trip in which a specific path could be opened:

And finally found the corresponding hidden "Library" folder:

But then again to find a long time, only to find the screen shot snapshot location:

One is, for screenshots in the path where each program is located:

Like what:

/users/your username/library/application support/iphone simulator/emulator version number/applications/xcode The number of the item that was generated/library/caches/ snapshots/Project Name

Like what:

/users/crifan/library/application Support/iphone SIMULATOR/5.1/APPLICATIONS/58D98889-3767-4B2B-B883-88C04345A8A3 /library/caches/snapshots/crifan.com.birdwatching

Here is the corresponding screenshot file uiapplicationautomaticsnapshotdefault-portrait.jpg:

The other is:

/users/your username/library/application support/iphone simulator/Simulator version number/library/caches/snapshots/ios project name

The corresponding here is a collection of different screenshot files for multiple items.

For a single item, there will be the most current screenshot file:

Like what:

/users/crifan/library/application Support/iphone simulator/5.1/library/caches/snapshots/ Com.apple.mobileslideshow

have corresponding screenshot file uiapplicationautomaticsnapshotdefault-portrait.jpg:

Summary

At this point, is finally found a screenshot of the project, there are two locations:

1./users/your username/library/application support/iphone simulator/emulator version number/applications/xcode The number of the item that was generated/library/caches/ snapshots/Project Name

2./users/your username/library/application support/iphone simulator/Simulator version number/library/caches/snapshots/ios project name

In addition, seemingly screenshots only save the latest single screenshot, many screenshots will lead to the previous screenshot is covered ...

So need to copy the screenshot out, to the screenshot finished, you can copy out, otherwise the next screenshot will be the previous screenshot covered.

3. Add Simplified Chinese Pinyin input method

In the second iOS interface: the iphone main interface:

Settings->general->keyboard->international keyboards-> Add New keyboard->chinese Simplified-> PinY In

Can add Chinese-> simplified (PinYin) Input method, namely the Simplified Chinese Pinyin Input method

Graphic:

After setting, enter the keyboard, you can click on the small earth, switch different input method.

You can switch to the Chinese simplified method, enter the Chinese language:

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.