获取icon、Version、应用名称

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

//appIcon

NSString *icon = [[infoPlist valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject];

//版本号

NSString *verson = [infoPlist valueForKey:@"CFBundleShortVersionString"];

//build

NSString *build = [infoPlist valueForKey:@"CFBundleVersion"];

//app名字

NSString *appName = [infoPlist valueForKey:@"CFBundleDisplayName"];

你可能感兴趣的:(获取icon、Version、应用名称)