获取错误"在其Info.plist中没有CFBundleName键,其长度为非零字符串"

时间:2017-11-07 12:23:09

标签: ios swift plist

我正在使用xcode 8.3和swift 3.1

我在运行像

这样的项目时遇到错误
  

在Info.plist中没有CFBundleName键,其长度为非零字符串值

我没有对plist做任何改变。

enter image description here

1 个答案:

答案 0 :(得分:0)

我自己就遇到了这个问题,尽管错误指出问题出在CFBundleName上,但也可以通过在主应用程序目标中添加CFBundleDisplayName和字符串值来解决作为扩展目标。

参见下文:

MainApp/Info.plist
<key>CFBundleDisplayName</key>
<string>My App</string>

AppExtension/Info.plist
<key>CFBundleDisplayName</key>
<string>My App</string>