Getting an iPhone app's product name at runtime?

前端 未结 12 2093
醉梦人生
醉梦人生 2021-01-30 19:43

How can this be achieved? I would like to get the name so i can display it within an app, without having to change it in code each time i change a name, of course.

12条回答
  •  长情又很酷
    2021-01-30 20:05

    I had a problem when I localize my application name by using InfoPlist.strings, like

    CFBundleDisplayName = "My Localized App Name";
    

    I could not obtain localized application name if I use infoDictionary.

    In that case I used localizedInfoDirectory like below.

    NSDictionary *locinfo = [bundle localizedInfoDictionary];
    

提交回复
热议问题