直接從info.plist字典里面讀取配置信息
簡單暴力
[[NSBundle mainBundle].infoDictionary objectForKey:@"對應的key"];
也可
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"Info" ofType:@"plist"];
NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithContentsOfFile:bundlePath];
常用系統配置信息的key如下
kCFBundleInfoDictionaryVersionKey ---版本號
kCFBundleIdentifierKey---- 應用bundle ID
kCFBundleVersionKey----應用版本號
kCFBundleNameKey---應用名字