企业包plist

由于旧的打包平台自动生成的plist文件中的bundle-identifier值为空值,并且assets中没有含有display-image以及full-size-image的dict,所以不能成功的安装到设备上.

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>items</key>
	<array>
		<dict>
			<key>assets</key>
			<array>
				<dict>
					<key>kind</key>
					<string>software-package</string>
					<key>url</key>
					<string>https://app/example.ipa</string>
				</dict>
				<dict>
					<key>kind</key>
					<string>display-image</string>
					<key>needs-shine</key>
					<true/>
					<key>url</key>
					<string>https://icon/example57.png</string>
				</dict>
				<dict>
					<key>kind</key>
					<string>full-size-image</string>
					<key>needs-shine</key>
					<true/>
					<key>url</key>
					<string>https://icon/example512.png</string>
				</dict>
			</array>
			<key>metadata</key>
			<dict>
				<key>bundle-identifier</key>
				<string>com.example.id</string>
				<key>bundle-version</key>
				<string>1.0.0</string>
				<key>kind</key>
				<string>software</string>
				<key>title</key>
				<string>AppNameExample</string>
			</dict>
		</dict>
	</array>
</dict>
</plist>

因为是纯脚本操作,所以碰到了一个坑.那就是往bundle-identifier的下一行<string></string>中间插入需要的值.然而,找到对应的行之后想使用sed -i来操作发现原字符串不能为空…然后使用了Apple自带的/usr/libexec/PlistBuddy工具去操作plist.最后传了上去.

plist文件的地址.

这里又有一个坑.plist文件的地址必须为https的.不然就无法进行安装,请求了网址之后会告诉你无法安装应用程序,因为"xxx"的证书无效.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值