如何配置我的目标以在 Xcode 中使用特定的 Info.plist?

jch*_*ard 5 macos xcode target ios

我有一个 Xcode 项目,有很多很多目标(iPhone、iPad、OS X)。

我需要为每个目标使用不同的 Info.plist 文件。

对于 iOS,我没有遇到任何问题,一切都很好。但是对于 OS X,我收到以下消息:

No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting
Run Code Online (Sandbox Code Playgroud)

在我输入的 OS X 目标构建设置中:

Info.plist File: /MyApp/Resources/Info-osx.plist
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?有什么我忘记指定了吗?

谢谢。

jch*_*ard 2

您是否在 OS X 目标的 info.plist 中设置了 NSPrincipalClass?NSPrincipalClass 是用于启动 OS X 应用程序的主类。

由 rckoenes 在最后评论中

这就是解决方案。