1. Let me introduce to you some files of our project:
1. This is the basic file of the project:
Some categories:
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,
It is created with the name of the project,
Write some help:
take a look:
take a look:
info.plist: file
xcode6, before, let’s take a look, its name was:
Project name - info.plist:
3. Okay, that’s all. That’s it. Okay, next, let’s take a look at the commonly used keys in it:
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:
No: Bundle display name, no, right?
Bundle name: But not this one,
Click the plus sign:
Click the plus sign: Then, here, among all the keys, find a Bundle display name:
Add a: Bundle display name:
Then, for example: we set one:
By default, when our program is started, what is the final effect displayed on the simulator:
01-Ordering system:
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"
command + Shift + H:
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:
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:
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:
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:
command + C、
Go back to the note, command + V:
Then, this is: application version number,
3. Then, there is another one, which is our: Bundle identifier:
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:
Did you see it? It’s the same as this one.
com.itheima-9,
Or you change it:
Change it:
com.itheima.999
Take a look at info.plist: Does it contain:
Bundle identifier:
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:
Is there no duplication?
Bundle Identifier: unique identifier
What does this mean in our iOS?
This means that each of your applications can only have one:
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.
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:
Here, its default value is $Product-Bundle-Identifier
Then what can you write:
You can modify it yourself:
Not dead:
Change to: com.itheima.09
4.Main storyboard file base name:Main
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.