I have a version of my app in the app store and I am now trying to get the lite mode accepted. The lite version with denied because the app's menu was called "Appname" instead of "Appname Lite" so it did not match the name in the app store.

I define my menu with a nib file which needs to be exactly the same for the full and lite versions, except the name of the app menu should be different in the lite version. It seems like a mistake to create a seperate .nib file in this case so how could I change the menu for the lite version without duplicating the nib?

有帮助吗?

解决方案

Set your app's bundle name in the Info.plist. You can see this for yourself in I have many names, which has a different name in each of the places where the application's name appears:

  • The Application menu item
  • The Application menu (submenu of the menu item)
  • The executable's filename
  • CFBundleName
  • CFBundleDisplayName

CFBundleName is the one that's used for the title of the Application menu item and its menu at run time.

… the name of the app menu should be different in the lite version.

Turn on the “Preprocess Info.plist file” build setting, set CFBundleName to a macro, and define that macro in each target's “Preprocessor Macros” build setting to the name that should appear on the Application menu.

Or, better yet: Have two InfoPlist.strings files (per language), each of which defines CFBundleName accordingly. (Bonus: You can then localize the word “Lite”—or “Pro” or whatever signifier(s) you're using—as needed.) Each one should be in its folder (since they have to have the same filename), and each target should have exactly one of the two files in its Copy Bundle Resources phase.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top