从Info.plist中获得信息

// 从Info.plist中获得信息(版本号)

[NSBundle mainBundle].infoDictionary[@"string"]

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

NSString *currentVersion = [infoDictionary objectForKey:@"CFBundleVersion"];


 //获取 plist 文件
 NSString *path=[[NSBundle mainBundle] pathForResource:@"citydict" ofType:@"plist"];
 NSMutableDictionary *cities = [NSMutableDictionary dictionaryWithContentsOfFile:path];



你可能感兴趣的:(从Info.plist中获得信息)