如何动态获取ios工程的Bundle version版本号,bundleID,appName
1个回答
2017-05-17
展开全部
获取 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];
}
+(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];
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询