NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
NSString *appVersion = [infoDict objectForKey:@"CFBundleShortVersionString"]; // example: 1.0.0
NSString *buildNumber = [infoDict objectForKey:@"CFBundleVersion"]; // example: 42
Related Contents:
- Refer to build number or version number in code
- In Objective-C, how do I test the object type?
- How to check if an NSDictionary or NSMutableDictionary contains a key?
- Assign a variable inside a Block to a variable outside a Block
- What is the significance of #pragma marks? Why do we need #pragma marks?
- Objective-C: Extract filename from path string
- How to stop unwanted UIButton animation on title change?
- iOS – Build fails with CocoaPods cannot find header files
- What are the details of “Objective-C Literals” mentioned in the Xcode 4.4 release notes?
- Is it possible to refresh a single UITableViewCell in a UITableView?
- Method Syntax in Objective-C
- What is the best way to create constants in Objective-C
- Generate a random alphanumeric string in Cocoa
- How to pass object with NSNotificationCenter
- Objective-C formatting string for boolean?
- Save An Image To Application Documents Folder From UIView On IOS
- “Auto Layout still required after executing -layoutSubviews” with UITableViewCell subclass
- Get parts of a NSURL in objective-c
- libxml/tree.h no such file or directory
- Converting UIColor to CGColor in swift
- Remove characters from NSString?
- Create objective-c class instance by name?
- Format string, integer with leading zeros
- View-based NSTableView with rows that have dynamic heights
- Class extension vs class category
- Using a constant NSString as the key for NSUserDefaults
- How to use Objective-C CocoaPods in a Swift Project
- Objective-C – float checking for nan
- What’s the difference between a method and a selector?
- How to identify previous view controller in navigation stack
- Getting the visible rect of an UIScrollView’s content
- Command-line tool for converting PLIST to JSON?
- Why do nil / NULL blocks cause bus errors when run?
- ‘+entityForName: nil is not a legal NSManagedObjectContext parameter – Core Data
- C Language: what does the .mm extension stand for?
- Generate a UUID string with ARC enabled
- Xcode 6 and Embedded Frameworks only supported in iOS8
- How is release handled for @synthesized retain properties?
- How do I do a Fade/No transition between view controllers
- BOOL to NSString
- Why can’t we use a dispatch_sync on the current queue?
- Number of occurrences of a substring in an NSString?
- How can I call a method in Objective-C?
- Rounded Corners only on Top of a UIView
- Detecting UITableView scrolling
- Can I overload an operator in Objective-C?
- How can you implement this multiline string literal macro in Swift?
- UITabBar not showing selected item images in ios 7
- In Cocoa do you prefer NSInteger or int, and why?
- What’s the difference between XCTAssert and XCTAssertTrue?