1. Under XCODE5, get the program name (app name) in the following way:
NSString *proname = [[[NSBundle Mainbundle] infodictionary] Objectforkey:@ "cfbundledisplayname"];
NSLog (@ "Dicname = = =%@", [[NSBundle Mainbundle] infodictionary]);
After printing you can see:
Cfbundledisplayname = Testofbutton;
Cfbundlename = Testofbutton;
2. Under Xcode6, get the program name (app name) in the following way:
NSString *proname = [[[NSBundle Mainbundle] infodictionary] Objectforkey:@ "cfbundlename"]; NSLog (@ "dicname = = =%@", [[NSBundle Mainbundle] infodictionary]);
After printing you can see:
Cfbundlename = Testofbutton;
Without this key value: Cfbundledisplayname = Testofbutton;
The cfbundledisplayname of the Xcode6 program can add this key in info.plist .
3. Speaking of Info.plist, in the Xcode6, there is no info.string file, only the Info.plist file, so if you do internationalization can create a new info.string, to make up for Xcode6 the lack of info.string. And if you want to change the app name here,cfbundledisplayname to add double quotes. Then, the remaining internationalization of the operation and online introduction of the method is similar. If there is any change, I will update it in succession.
Original address: http://www.th7.cn/Program/IOS/201409/285479.shtml
Xcode6 and XCODE5 get app names and internationalization differences