Four scheme actions
- Run will run my app in the debugger.
- Test will run my tests.
- Profile will run my app in instruments so I can measure its performance.
- Analyze will run Xcode’s static analyzer and help catch problems I might otherwise have missed
- Archive action will build my app for release.This command will become enabled in this menu once I select a device as my run destination.
查看不同设备屏幕的Storyboard scene
Method classify
使用TODO or MARK 使方法归类。直接输入可自动弹出搜索框
import Foundation
// TODO: Call Hero
let myHero = "Mother"
func callHero(){
print (myHero)
}
// MARK: Call Father
func callMather(){
print (myHero)
}
PO Command in console
Search shortcut key
shift + command + O
Option or Command + click
查看某方法或对象的详情
Project & Target
Project
A project is a document that you use to organize your code an resources in Xcode.
project settings
deployment target is the minimum OS version that your app can run on and support.
Target
targets which actually build those files into products like your app
A target contains the instructions to build one thing like an app or a framework.
Build phases
The thing that your target produces is called its product. The set of steps that your target takes to build its product are called build phases.
Build Setting for project & target
Build settings which configure how your targets build their products, schemes which configure how you perform actions, such as Run, with your targets.
Both projects and targets have Build settings, and targets inherit the value set at the project level but can override them with a target-specific value.
A Build setting contains a name and a value of some aspect that controls some aspect of the build process.
For example, there are Build settings for specifying which architectures you want to build, whether your code is optimized, what your product is named, and even how you deal with warnings.
Now, Build settings can also vary by what’s called a build configuration, and by default, a project has a debug and a release configuration. For example, when you’re building for debug, you probably don’t want your code to be optimized, but when you’re building for release, you do want your code to be optimized.
Target’s build phases
A target’s build phases do things like cause dependencies to build first, compile the source files in that target, and link the target against libraries and frameworks.
You can also add what’s called a run script build phase to configure other aspects of the build that you’d like.
Capabilities
Capabilities, which allows you to easily turn on specific features.
For example, for iOS, there are capabilities for enabling in-app purchases and Apple Maps integration
Workspaces
Two projects that share the same framework and you like to work on them together.
In this situation, you can create an Xcode workspace that references your projects. So when you open your workspace in Xcode,
it’ll contain all of the contents of the projects that you’ve referenced, which makes it easy to edit and navigate across them
as related code.
有待进一步学习的地方
Review & Commit
Edit Scheme
Test
Debug