// - app 的 Bundle versions string, short
[[NSBundlemainBundle]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]]
// - app 的 build
NSString *key =@"CFBundleVersion";
NSString *currentVersion = [NSBundlemainBundle].infoDictionary[key];
App默认是有开启了多任务功能,而多任务功能是需要App支持所有方向,如果我们App是有需要支持多任务,则需要开启App对各个方向(上、下、左、右)的支持;如果App不需要开启多任务,则只需要将如下示意图的 requires full screen 勾选
Hidden starus bar 用来启动app的时候隐藏状态栏!
NSLog(@"%@", [NSBundle mainBundle].infoDictionary);
打印结果如下 :
2016-07-05 18:08:17.757 DYCode[9224:216214] {
BuildMachineOSBuild = 15E65;
CFBundleDevelopmentRegion = en;
CFBundleExecutable = DYCode;
CFBundleIdentifier = "com.QG.DYCode";
CFBundleInfoDictionaryVersion = "6.0";
CFBundleInfoPlistURL = "Info.plist -- file:///Users/lichaoqun/Library/Developer/CoreSimulator/Devices/0DDD96CE-6C7F-4730-8B8A-F7D20BAAE87D/data/Containers/Bundle/Application/EDC6CF98-434C-4820-89E6-8B921F5289B5/DYCode.app/";
CFBundleName = DYCode;
CFBundleNumericVersion = 16809984;
CFBundlePackageType = APPL;
CFBundleShortVersionString = "1.0";
CFBundleSignature = "????";
CFBundleSupportedPlatforms = (
iPhoneSimulator
);
CFBundleVersion = 1;
DTCompiler = "com.apple.compilers.llvm.clang.1_0";
DTPlatformBuild = "";
DTPlatformName = iphonesimulator;
DTPlatformVersion = "9.3";
DTSDKBuild = 13E230;
DTSDKName = "iphonesimulator9.3";
DTXcode = 0731;
DTXcodeBuild = 7D1014;
LSRequiresIPhoneOS = 1;
MinimumOSVersion = "8.2";
NSAppTransportSecurity = {
NSAllowsArbitraryLoads = 1;
};
UIDeviceFamily = (
1,
2
);
UILaunchStoryboardName = LaunchScreen;
UIMainStoryboardFile = Main;
UIRequiredDeviceCapabilities = (
armv7
);
UISupportedInterfaceOrientations = (
UIInterfaceOrientationPortrait,
UIInterfaceOrientationLandscapeLeft,
UIInterfaceOrientationLandscapeRight
);
}