【问题标题】:shell tool target can't find info.plistshell 工具目标找不到 info.plist
【发布时间】:2010-08-16 21:57:49
【问题描述】:

当我尝试运行该程序时,它显示了以下消息:

 No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

但实际上我的Resources 组中有一个 Info.plist。

我已经将InfoPlist.strings 文件添加到Copy Bundle Resources

有什么我设置错了吗?试了这么久..请大家帮忙QQ

如下:

Node
-Compile Sources
  main.m
  NodeAppDelegate.m
-Link Binary with Libraries
  Cocoa.framework
-Copy Bundle Resources
  InfoPlist.strings
    - English

【问题讨论】:

  • 你确定它是一个shell工具吗?他们通常没有任何资源或 Info.plist,只是一个裸可执行文件。
  • 我创建了一个“coco-a 应用程序”,但我添加了一个 shell 工具目标来构建。

标签: cocoa xcode xcodebuild


【解决方案1】:

Info.plistInfoPlist.strings 不同。 Info.plist 有一堆关于你的包的元数据; InfoPlist.strings 存储有关 Info.plist 文件的本地化信息。

举个具体的例子,Info.plist 有你的包的版本号和(对于应用程序)一个人类可读的版权声明。如果您决定以另一种语言发布您的应用,InfoPlist.strings 将获得该语言的可读版权声明的翻译。

【讨论】:

  • 是的,但添加 info.plist 会导致:警告:复制捆绑资源构建阶段包含此目标的 Info.plist 文件“TestSharing-Info.plist”。它仍然无法执行。问问
  • 也许您在构建阶段搞砸了?尝试创建一个适当类型的新 Xcode 项目并将源代码复制到其中。如果生成的捆绑包中没有 Info.plist,它将无法正常工作。有时 Xcode 通过另一个名称预构建调用 Info.plist。就像如果您的项目名为 Foo,它可能是包含源代码的目录中的 Foo-Info.plist,但当 Xcode 将其复制到包中时,它变成了只是 Info.plist。
猜你喜欢
  • 1970-01-01
  • 2012-11-16
  • 1970-01-01
  • 1970-01-01
  • 2015-08-23
  • 2022-01-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多