在xcode 中 构建 macOS app 是,出现这个提示:
The CFBundleVersion of an app extension ('1') must match that of its containing parent app ('4.30.1').
image.png
原因
在主应用中,要设置 2个版本号,如图
版本号设置
Version 是应用商店的版本,也就是 market version
Build 是项目版本,也可以理解为构建版本呢
在 extension 中,没有这个选项key填写,就要到 Build Settings 页签下找
image.png
编译提示的是拓展主程序这两个版本不一致
解决
在 Build Settings 页签下,Versioning 区,把主target 和扩展target中的版本号填写一直就解决了