Skip to content

Commit

Permalink
fix(ios): call callback on Geolocation#requestTemporaryFullAccuracyAu…
Browse files Browse the repository at this point in the history
…thorization if missing purpose
  • Loading branch information
sgtcoolguy committed Feb 22, 2021
1 parent a4015cd commit 2155d0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iphone/Classes/GeolocationModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,10 @@ - (void)requestTemporaryFullAccuracyAuthorization:(NSString *)purposeKey withCal
NSDictionary *descriptionDict = [[NSBundle mainBundle] objectForInfoDictionaryKey:kTiGeolocationTemporaryUsageDescriptionDictionary];
if (!descriptionDict || ![descriptionDict valueForKey:purposeKey]) {
DebugLog(@"[WARN] Add %@ key with purpose key %@ in info.plist", kTiGeolocationTemporaryUsageDescriptionDictionary, purposeKey);
NSString *msg = [NSString stringWithFormat:@"Add %@ key with purpose key %@ in info.plist", kTiGeolocationTemporaryUsageDescriptionDictionary, purposeKey];
NSMutableDictionary *propertiesDict = [TiUtils dictionaryWithCode:1 message:msg];
[callback callWithArguments:@[ propertiesDict ]];
return;
}
[[self locationPermissionManager] requestTemporaryFullAccuracyAuthorizationWithPurposeKey:purposeKey
completion:^(NSError *_Nullable error) {
Expand Down

0 comments on commit 2155d0a

Please sign in to comment.