@nativescript-community/perms
Advanced tools
Comparing version 2.2.22 to 2.2.23
@@ -86,3 +86,3 @@ import { Device, Trace, Utils } from '@nativescript/core'; | ||
}(NSObject)); | ||
function request(type) { | ||
async function request(type) { | ||
const status = getStatusForType(type); | ||
@@ -92,3 +92,3 @@ if (Trace.isEnabled()) { | ||
} | ||
if (status[0] === Status.Undetermined || status[0] === Status.Denied) { | ||
if (status[0] === Status.Undetermined || status[0] === Status.Denied || (type === 'always' && !status[1])) { | ||
return new Promise((resolve, reject) => { | ||
@@ -114,8 +114,6 @@ if (!locationManager) { | ||
locationManager.delegate = null; | ||
locationManager = null; | ||
// locationManager = null; | ||
} | ||
const rStatus = getStatusFromCLAuthorizationStatus(status, type); | ||
resolve(rStatus); | ||
// } else { | ||
// reject('kCLAuthorizationStatusNotDetermined'); | ||
} | ||
@@ -144,3 +142,3 @@ } | ||
locationManager.delegate = null; | ||
locationManager = null; | ||
// locationManager = null; | ||
} | ||
@@ -151,7 +149,3 @@ } | ||
else { | ||
// if (CLLocationManager.authorizationStatus() === CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedWhenInUse && type === 'always') { | ||
// return Promise.resolve(Status.Denied); | ||
// } else { | ||
return Promise.resolve(status); | ||
// } | ||
return status; | ||
} | ||
@@ -158,0 +152,0 @@ } |
{ | ||
"name": "@nativescript-community/perms", | ||
"version": "2.2.22", | ||
"version": "2.2.23", | ||
"description": "An unified permissions API for NativeScript on iOS and Android.", | ||
@@ -42,3 +42,3 @@ "main": "./index", | ||
"readmeFilename": "README.md", | ||
"gitHead": "22fc5909d069d4fb7bc788f7cbf48081ca5c7d20" | ||
"gitHead": "0f62c3eb5d4ad36933e5d7a2780679629b1f367f" | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
1
119778
2305
1362