如何动态获取ios工程的Bundle version版本号,bundleID,appName

获取 bundle version版本号

+(NSString*) getLocalAppVersion

{

    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];

}

 获取BundleID

+(NSString*) getBundleID

{

    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];

}

 获取app的名字

+(NSString*) getAppName

{

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

    NSMutableString *mutableAppName = [NSMutableString stringWithString:appName];

}

posted on 2016-04-14 14:46  大圣ios博客  阅读(25102)  评论(0编辑  收藏  举报