{
BuildMachineOSBuild = 16B2657; //mac 版本
CFBundleDevelopmentRegion = en; //本地化設(shè)置溉苛,默認(rèn)為en
CFBundleExecutable = UpdateTip; //安裝包名稱
CFBundleIdentifier = “com.hcb.UpdateTip”; //bundle id
CFBundleInfoDictionaryVersion = “6.0”; //info.plist格式化版本號(hào)
CFBundleName = UpdateTip; //程序名稱
CFBundleNumericVersion = 16809984; //bundle版本
CFBundlePackageType = APPL; //包類型
CFBundleShortVersionString = “1.0”; //版本號(hào)
CFBundleSupportedPlatforms = (
iPhoneSimulator
); //支持的平臺(tái)
CFBundleVersion = 1; //版本號(hào)
DTCompiler = “com.apple.compilers.llvm.clang.1_0”;
DTPlatformBuild = “”; //運(yùn)行平臺(tái)
DTPlatformName = iphonesimulator; //當(dāng)前運(yùn)行平臺(tái)名稱
DTPlatformVersion = “10.2”; //平臺(tái)版本
DTSDKBuild = 14C89; //模擬器系統(tǒng)版本
DTSDKName = “iphonesimulator10.2”; //模擬器系統(tǒng)名稱
DTXcode = 0821; //xcode
DTXcodeBuild = 8C1002; //xcode版本
LSRequiresIPhoneOS = 1; //是否只運(yùn)行在iphone中
MinimumOSVersion = “8.0”;//支持最低系統(tǒng)版本
UIDeviceFamily = (
1
);
UILaunchStoryboardName = LaunchScreen;
UIMainStoryboardFile = Main; //MainStoryboard文件
UIRequiredDeviceCapabilities = (
armv7
); //針對(duì)哪些指令集進(jìn)行編譯
UISupportedInterfaceOrientations = (
UIInterfaceOrientationPortrait,
UIInterfaceOrientationLandscapeLeft,
UIInterfaceOrientationLandscapeRight
); //支持屏幕旋轉(zhuǎn)方向
}
使用說明
//1.獲取app的info.plist詳細(xì)信息
//build 版本號(hào)
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
//version 版本號(hào)
NSString *version2 = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
//應(yīng)用標(biāo)識(shí):Bundle identifier
NSString *bundleId = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
//Bundle name
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
//應(yīng)用展示的名字
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
//2.應(yīng)用程序語(yǔ)言本地化
//app本地化宏
#define XLocalizedString(key, comment) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者