[PickerView case 12-info_plist-PCH file introduces Objective-C language]

1. Let me introduce to you some files of our project:

notify

1. This is the basic file of the project:

notify

Some categories:

notify

Some pictures:

And loading pictures,

The most important thing is this: info.plist: file

info.plist:

2. Then, you need to know a little bit about its history:

When we use it now, we all start from xcode6.4.

In other words, start directly with xcode7,

In this xcode6, before, this info.plist file,

That's not how it's named,

notify

It is created with the name of the project,

Write some help:

notify

take a look:

notify

take a look:

notify

info.plist: file

xcode6, before, let’s take a look, its name was:

Project name - info.plist:

notify

3. Okay, that’s all. That’s it. Okay, next, let’s take a look at the commonly used keys in it:

notify

1) Bundle display name: Set the application name:

First of all, it’s this, the first one: Bundle display name:

Set application name,

Now, it doesn’t have:

notify

No: Bundle display name, no, right?

Bundle name: But not this one,

Click the plus sign:

notify

Click the plus sign: Then, here, among all the keys, find a Bundle display name:

notify

Add a: Bundle display name:

notify

Then, for example: we set one:

notify

By default, when our program is started, what is the final effect displayed on the simulator:

01-Ordering system:

notify

Then, if you add this Key, now, command + R, run:

Now, we haven't written anything, we just added a Key to the info.plist file: Bundle display name: Change it to "Dark Horse"

notify

command + Shift + H:

notify

Do you see it,

Is it a dark horse?

In the past, if you didn’t change it, the name of your project would be whatever it was.

Now, if you set it, it's set,

2. There is another one: Bundle versions string.short:

notify

It is also more important. This is the version when our application is released.

version number

You upload this application to the App Store. What's inside?

You need one, define a version, right?

This is your version number.

Then some people may have questions:

notify

This Bundle version: 1

What is this,

Bundle version:

This is the name of the project you use to manage it within the company. When managing this project, you use,

For example, we uploaded and released version 1.0,

However, if you use it and find a bug,

Do you need to modify it?

You may, but now, after 1.0 is gone, will you develop 2.0?

However, 2.0 has not been released, and 1.0 has bugs.

So among you, do you want to fix this bug?

Then can you name it 1.0.1?

Then you can name it here:

notify

This naming scheme is managed internally,

After you finish modifying it, can you change the version number again?

Pass it on again

But 2.0 is not affected.

Let’s understand this.

Check this: Bundle version string.short:

notify

command + C、

Go back to the note, command + V:

notify

Then, this is: application version number,

3. Then, there is another one, which is our: Bundle identifier:

notify

Bundle identifier:

You may not be able to see this thing here. Let’s take a look and see if it’s included in the project:

Click on the project and see if:

notify

Did you see it? It’s the same as this one.

com.itheima-9,

Or you change it:

notify

Change it:

notify

com.itheima.999

notify

Take a look at info.plist: Does it contain:

notify

Bundle identifier:

notify

No, it doesn't matter,

But, it's still the same,

Well, let me tell you about this Bundle Identifier:

is the unique identifier of our application,

What counts as the only one?

Under what circumstances is it considered unique:

notify

Is there no duplication?

Bundle Identifier: unique identifier

notify

What does this mean in our iOS?

This means that each of your applications can only have one:

notify

There can only be one Bundle Identifier

Moreover, it cannot be repeated,

If you have two applications, you say, I use the same Bundle Identifier,

Sorry, I can only keep one application.

Whoever installs it first will get rid of it if he installs it later.

Understand, the same principle applies to our application upgrades.

notify

The same principle applies to application upgrades: then, as long as your Bundle Identifier remains unchanged, the user can overwrite the original one as long as they update the application.

This is the Bundle Identifier:

notify

Here, its default value is $Product-Bundle-Identifier

Then what can you write:

notify

You can modify it yourself:

notify

Not dead:

notify

Change to: com.itheima.09

notify

4.Main storyboard file base name:Main

notify

Main storyboard file base name,

What does this mean?

There is a Main written at the back,

Therefore, this is loaded by default when our application is started.

storyboard, file,

Is this Main.storyboard?

Find this controller in it,

loaded,

so what,

Guess you like

Origin blog.csdn.net/madoca/article/details/133301824