I am writing an iOS SDK using the Objective-C programming language. I would like to know if there is a field in Xcode where I can set the version number for the SDK
Is there a way from objective-C to install the version and build the number , as we do for iOS applications (EX: Version: 2.5.1 Build: 2.5.1.12)?
I also need a way to detect this version number, so I can set the API to be something like
- (NSString *)getSDKVersion {
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *majorVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSString *minorVersion = [infoDictionary objectForKey:@"CFBundleVersion"];
return [NSString stringWithFormat:@"SDK Version %@ (%@)", majorVersion, minorVersion];
}
-(NSString*)getSDKBuildVersion;
Returns the SDK version and build number.
Usage: Xcode - 7.0 (Beta 3 Version)
Thanks in advance.
source
share