离子应用程序未显示在信息plist文件中的各种权限,尽管它们位于config.xml中

时间:2018-12-18 01:19:14

标签: ios cordova ionic2

我的<platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> <icon height="57" src="resources/ios/icon/icon.png" width="57" /> <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /> <icon height="40" src="resources/ios/icon/icon-40.png" width="40" /> <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /> <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /> <icon height="50" src="resources/ios/icon/icon-50.png" width="50" /> <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /> <icon height="60" src="resources/ios/icon/icon-60.png" width="60" /> <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /> <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /> <icon height="72" src="resources/ios/icon/icon-72.png" width="72" /> <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /> <icon height="76" src="resources/ios/icon/icon-76.png" width="76" /> <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /> <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /> <icon height="29" src="resources/ios/icon/icon-small.png" width="29" /> <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /> <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /> <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /> <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /> <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /> <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /> <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /> <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /> <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /> <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /> <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /> <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> <config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist"> <string>This app requires access to your photos so you may upload them as meals or feed posts.</string> </config-file> <config-file parent="NSCameraUsageDescription" target="*-Info.plist"> <string>This app requires access to your camera so you may upload photos as meals or feed posts.</string> </config-file> <config-file parent="NSPhotoLibraryAddUsageDescription" target="*-Info.plist"> <string>This app requires access to your photos so you may upload them as meals or feed posts.</string> </config-file> <config-file parent="NSLocationAlwaysAndWhenInUseUsageDescription" target="*-Info.plist"> <string>This app requires access to your location so that you can post where you are on the feed.</string> </config-file> <config-file parent="NSLocationWhenInUseUsageDescription" target="*-Info.plist"> <string>This app requires access to your location so that you can post where you are on the feed.</string> </config-file> </platform> 文件中包含以下代码:

config.xml

我拥有过去一直使用的各种配置文件键值对...但是由于某些原因,当我构建iOS时,这就是我的plist文件的样子:

Imgur

它仅显示照片库的条目,其中没有其他项目。难道我做错了什么?我在网上查找的所有内容似乎都说完全符合我在DATEDIFF中所做的事情。

1 个答案:

答案 0 :(得分:0)

您应该使用config-file而不是edit-file,它可以使用merge属性并允许您指定多个键

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>Explanation</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
    <string>Explanation</string>
</edit-config>