Xcode6 and XCODE5 get app names and internationalization differences

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.