6
4

2 回答 2

3

见文档

在您config.xml作为<platform name="ios">添加的子节点中:

<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
    <string>need to photo library access to get pictures from there</string>
</edit-config>
于 2018-01-27T02:21:24.187 回答
2

在需要此插件的PLUGIN.XML文件中的PLATFORM标记下使用config-file而不是edit-config :

<platform name="ios">
    <preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
    <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
         <string>Need camera access to take pictures</string>
    </config-file>
    <preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
    <config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
         <string>Need to photo library access to get pictures from there</string>
    </config-file>
</platform>
于 2018-01-26T08:00:33.820 回答