Skip to main content

Xcode13的Info.plist不见了?

· 预计阅读1分钟

Header 创建新的SwiftUI项目,发现Info.plist不见了?

哦~~~,原来是Xcode13引起的。

查看Xcode13 Release Note,可以看到

Projects created from several templates no longer require configuration files such as entitlements and Info.plist files. Configure common fields in the target’s Info tab, and build settings in the project editor. These files are added to the project when additional fields are used. (68254857)

原来新的模板不在创建Info.plist了,Info.plist的功能转移到Target->Info下了。

image-20211124115621173

在Info中修改相关设置。如果你添加了一个自定义Key,那么系统会帮你创建一个Info.plist来包含你的自定义key-value。

你也可以自己直接新建。

image-20211124115550252

非SwiftUI项目中还是存在Info.plist,但是大部分内容还是都移动到了Target->Info中。Info.plist只保留了部分Key-Value。

image-20211124115901894