How to display photo library permissions dialog in Cordova?

后端 未结 2 748
孤街浪徒
孤街浪徒 2021-01-15 18:09

Hi we are developing an IBM MobileFirst Platform-based Hybrid Application. In our application we are accessing user gallery (to upload photos). for this in iPhone we need to

2条回答
  •  甜味超标
    2021-01-15 18:21

    MobileFirst does not handle any permissions for you - it is not that kind of a framework. This really relates to the Cordova layer in your app, which access the photo library.

    You need to display a dialog box asking the user whether or not does s/he allow for the access to access the photo library. You can use WL.SimpleDialog for this purpose, for example.

    Read more here:

    • http://docs.phonegap.com/en/3.3.0/guide_appdev_privacy_index.md.html#Privacy%20Guide
    • Cordova Camera Plugin in IOS 9
    • perhaps to check if there is access given, create also a Cordova plug-in that will check for it using native code: Determine if the access to photo library is set or not - PHPhotoLibrary (iOS 8)

提交回复
热议问题