获取info.plist相关信息方法

在info.plist 中右键  show raw keys/values (显示原始的键值对)

取各个值的方式如下:

  

+(NSString*)getVersion
{
    NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];
    return version;
}

+(NSString*)getVersionName
{
    NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    return version;
}

你可能感兴趣的:(获取info.plist相关信息方法)