I have installed the plugin using the command:
$ tns plugin add @master.technology/permissions
And used it as follow:
permissions
.requestPermission(
permissions.PERMISSIONS.CAMERA,
"why not the permission"
)
.then(() => {
console.log("Woo Hoo, I have the power!");
})
.catch(() => {
console.log("Uh oh, no permissions - plan B time!");
});
To the info.plist I have added the following key:
<key>NSCameraUsageDescription</key>
<string>Required for make images of documents that need to be uploaded</string>
When the code is executed, both functions are not executed, I only get the following block logged to the console:
I have installed the plugin using the command:
$ tns plugin add @master.technology/permissions
And used it as follow:To the info.plist I have added the following key:
When the code is executed, both functions are not executed, I only get the following block logged to the console:
I am using: