{
BuildMachineOSBuild = 16B2657; //mac 版本
CFBundleDevelopmentRegion = en; //本地化設置,默認為en
CFBundleExecutable = UpdateTip; //安裝包名稱
CFBundleIdentifier = “com.hcb.UpdateTip”; //bundle id
CFBundleInfoDictionaryVersion = “6.0”; //info.plist格式化版本號
CFBundleName = UpdateTip; //程序名稱
CFBundleNumericVersion = 16809984; //bundle版本
CFBundlePackageType = APPL; //包類型
CFBundleShortVersionString = “1.0”; //版本號
CFBundleSupportedPlatforms = (
iPhoneSimulator
); //支持的平臺
CFBundleVersion = 1; //版本號
DTCompiler = “com.apple.compilers.llvm.clang.1_0”;
DTPlatformBuild = “”; //運行平臺
DTPlatformName = iphonesimulator; //當前運行平臺名稱
DTPlatformVersion = “10.2”; //平臺版本
DTSDKBuild = 14C89; //模擬器系統版本
DTSDKName = “iphonesimulator10.2”; //模擬器系統名稱
DTXcode = 0821; //xcode
DTXcodeBuild = 8C1002; //xcode版本
LSRequiresIPhoneOS = 1; //是否只運行在iphone中
MinimumOSVersion = “8.0”;//支持最低系統版本
UIDeviceFamily = (
1
);
UILaunchStoryboardName = LaunchScreen;
UIMainStoryboardFile = Main; //MainStoryboard文件
UIRequiredDeviceCapabilities = (
armv7
); //針對哪些指令集進行編譯
UISupportedInterfaceOrientations = (
UIInterfaceOrientationPortrait,
UIInterfaceOrientationLandscapeLeft,
UIInterfaceOrientationLandscapeRight
); //支持屏幕旋轉方向
}
使用說明
//1.獲取app的info.plist詳細信息
//build 版本號
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
//version 版本號
NSString *version2 = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
//應用標識:Bundle identifier
NSString *bundleId = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
//Bundle name
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
//應用展示的名字
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
//2.應用程序語言本地化
//app本地化宏
#define XLocalizedString(key, comment) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。