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.
Xcode6 the way to get the app name differs from the XCODE5