Info.plist基础编写教程

2 篇文章 0 订阅
2 篇文章 0 订阅
本文介绍了在iOS项目开发中Info.plist文件的必要性及其结构,包括关键字段如软件名称、版本、图标等的设置示例。
摘要由CSDN通过智能技术生成

        在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>

基础编写完成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值