NathanaelA / nativescript-permissions

Wraps up the entire Android 6 permissions system in a easy to use plugin.
MIT License
46 stars 22 forks source link

Behavior on IOS #50

Open abdallahkadour opened 2 years ago

abdallahkadour commented 2 years ago

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:

CONSOLE LOG: Getting ios.CAMERA
(UIKitCore) [com.apple.UIKit:PointerLockState] preferredPointerLockStatus updated: scene: <UIWindowScene: 0x7f853f02bd50; sceneIdentifier: "sceneID:org.nativescript.VOISMGOV-default">; viewController: <UIViewControllerImpl: 0x7f853f573ff0>; preferredPointerLockStatus: _UIPointerLockStatusUnlocked

I am using:

"typescript": "~4.3.5"
"@nativescript/angular": "^12.2.0",
tns: 8.1.5