get app version from info.plist

-- iOS (iPhone) 2012. 10. 15. 13:11
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
앱화면에 앱의 버전을 표시할 때가 있다.
이럴 경우 xxxx-info.plist에 정의된 버전을 아래처럼 가져올 수 있다.

// version
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
NSString *version = [infoDict objectForKey:@"CFBundleVersion"];

OR 

// version displayname
NSString *dispName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];

'-- iOS (iPhone)' 카테고리의 다른 글

make hyperlink  (0) 2012.10.15
objective-c combine string  (0) 2012.10.15
iphone string 관리  (0) 2012.10.15
How To Create A Simple iPhone App on iOS 5 Tutorial  (0) 2012.10.12
TextView에 Clear Button 추가하기  (0) 2012.10.11
posted by 어린왕자악꿍