1. 打开xcode时显示启动页
“Window” -> “Welcome to Xcode”
勾选”Show this window when Xcode launches”。
2. 点击debug后App没启动
检查Scheme->Run->Executable中有没有选择app,如果是None那么就是不会启动App的。
3. 清理空间
3.1 删除DeriveData
Derived Data是一个文件夹,它默认情况下位于:~/Library/Developer/Xcode/DerivedData。它是Xcode存储各种中间构建结果、生成索引等的位置,这个文件夹通常会很大,清理后会回收不少空间。你可以在Xcode的preferences中设置Derived Data的位置。清理之后构建首次构建项目的时候可能会增加构建时间。但是这不影响正常使用。而且还可以回收更多自由的空间内存。
1 | rm -rf ~/Library/Developer/Xcode/DerivedData/* |
4. 脚本的选项
For install builds only
勾选后只有在release打包时才会执行,否则在debug或release时都会执行。
另一个解释,TODO: Xcode 12 adds a new option to skip build script execution in incremental builds if the inputs and outputs haven’t changed! (first image is Xcode 11, second 12)。Run script only when installing
勾选后只有在Product Archieve时执行