-- iOS (iPhone)
get app version from info.plist
어린왕자악꿍
2012. 10. 15. 13:11
앱화면에 앱의 버전을 표시할 때가 있다.
이럴 경우 xxxx-info.plist에 정의된 버전을 아래처럼 가져올 수 있다.
// version
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
NSString *version = [infoDict objectForKey:@"CFBundleVersion"];
OR
// version displayname
NSString *dispName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];