在ios项目开发中,Info.plist文件的编写是必要的,它与AndroidManifest.xml有很多相似之处,例如表明软件的名称,版本,图标等用处……
好了,回归正题,该如何编写Info.plist文件呢?首先,在软件工程里,新建一个命名为‘’Info‘’的plist文件,开始随示例编写。
示例如下
<?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>chn</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>exw</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>iTunesArtwork</string>
//设置APP图标
<key>CFBundleTypeName</key>
//设置APP名称
<string>null</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>dvd</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>CFBundleExecutable</key>
//APP附名称
<string>null</string>
<key>CFBundleIconFile</key>
<string>App</string>
<key>CFBundleIdentifier</key>
//APP包名
<string>com</string>
<key>CFBundleInfoDictionaryVersion</key>
//APP版本号
<string>0</string>
<key>CFBundleName</key>
//APP中文名称
<string>未知</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
//APP附版本号
<string>0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
//APP兼容设备
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
//APP版本
<string>0</string>
<key>LSApplicationCategoryType</key>
<string>category.news</string>
<key>LSMinimumSystemVersion</key>
//APP简版本
<string>0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
//开发者商标
<string>©</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
基础编写完成