views:

24

answers:

1

when I tried to run the program, it showed this message:

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

But there's actually an Info.plist in my Resources group.

I already added InfoPlist.strings file into Copy Bundle Resources

Is there anything I set wrong? I tried it for so long.. Please help Q Q

It's like below:

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

Info.plist is different from InfoPlist.strings. Info.plist has a bunch of metadata about your bundle; InfoPlist.strings stores localization information about the Info.plist file.

To give specific examples, Info.plist has the version number of your bundle and (for applications) a human-readable copyright notice. If you decide to ship your app in another language, InfoPlist.strings would have the translation of the human-readable copyright notice in that language.

Alex Martini
ya, but adding info.plist would cause: Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'TestSharing-Info.plist'. and it still can't exec. Q Q
Frost
Maybe you've messed something up in the build phases? Try just making a new Xcode project of the appropriate type and copying your source code into it. If you don't have an Info.plist in the resulting bundle, it will not work period.Sometimes Xcode calls the Info.plist by another name pre-build. Like if your project is called Foo, it might be Foo-Info.plist in the directory with your source code, but it becomes just Info.plist when Xcode copies it into the bundle.
Alex Martini