Xcode6和Xcode5获取app名字

1.在Xcode5下,获取程序名字(app name)的方法为:

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

NSString *bundleName = [infoDictionary objectForKey:@"CFBundleName"];

或者

 NSString *proName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];

  
2.在Xcode6下,获取程序名字(app name)的方法为:

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

NSString *bundleName = [infoDictionary objectForKey:@"CFBundleName"];

或者

NSString *proName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];

上一篇:[Polymer] Introduction


下一篇:PHP 设计模式阅读清单