Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/jsActions/nanoflow-actions-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- We've fixed location permission issue on iOS.

### Changed

- We've updated the minimum Mendix version to 10.21.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import Geolocation, { GeolocationError } from "@react-native-community/geolocation";
import Geolocation from "@react-native-community/geolocation";

import type { GeolocationServiceStatic, AuthorizationResult } from "../../typings/Geolocation";

Expand Down Expand Up @@ -119,14 +119,16 @@ export async function RequestLocationPermission(): Promise<boolean> {
)
);
} else if (geolocationModule) {
geolocationModule.requestAuthorization(
() => {
return Promise.resolve(true);
},
(err: GeolocationError) => {
return Promise.reject(err);
}
);
return new Promise(resolve => {
geolocationModule.requestAuthorization(
() => {
resolve(true);
},
() => {
resolve(false);
}
);
});
}

return false;
Expand Down