iOS *-info.plist 说明

每个项目都有一个*-info.plist.   *表示project name。 用于配置项目


用文本编辑器打开,看到是一个xml文件,描述一个Dictionary:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleIdentifier</key>
	<string>com.stone.${PRODUCT_NAME:rfc1034identifier}</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
</dict>
</plist>
xml中的key 有些与xcode中显示的不一致, 会多个CF前缀,但单词大义相同。

Localization native development region ----CFBundleDevelopmentRegion    ------  如果App没有用户设置的区域语言,则使用配置的语言

Bundle display name   ----CFBundleDisplayName       ------     App显示的名称。${PRODUCT_NAME}表示与建立项目时取的名字一致

Executable file       ---CFBundleExecutable      -------  执行文件的名字。即ipa安装包的名字

Bundle identifier      ---CFBundleIdentifier      -------  唯一标识字符串,该字符串的格式类似com.yourcompany.yourapp,如果使用模拟器跑你的应用,这个字段没有用处,如果你需要把你的应用部署到设备上,你必须生成一个证书,而在生成证书的时候,在apple的网站上需要增加相应的app IDs.这里有一个字段Bundle identifier,如果这个Bundle identifier是一个完整字符串,那么文件中的这个字段必须和后者完全相同,如果app IDs中的字段含有通配符*,那么文件中的字符串必须符合后者的描述

Bundle version ----CFBundleVersion  ----   软件版本

Application uses Wi-Fi  --     --- 如果应用程序需要wi-fi才能工作,应该将此属性设置为true。这么做会提示用户,如果没有打开wi-fi的话,打开wi-fi。为了节省电力,iphone会在30分钟后自动关闭应用程序中的任何wi-fi。设置这一个属性可以防止这种情况的发生,并且保持连接处于活动状态


你可能感兴趣的:(ios)