Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Geolocation, No Permission on iOS

I've been trying to get the geolocation package to work for the past 3 hours and decided to ask for some help, maybe you can see something I can't.

I've followed the directions, and can not get the app to get permission on any iOS device for the location service.

config.xml

https://gist.github.com/keoir/90ea3b75fefed70495409fd5692ac5c0

Package.json

https://gist.github.com/keoir/285c4c04671f70c2473783052936af0d

app.component.ts

https://gist.github.com/keoir/2d09d7cc6956b507a47a59701f0e1aa2

like image 444
keoir Avatar asked Jan 23 '26 09:01

keoir


1 Answers

@dhanesekar's solution was erased every time I ran ionic cordova build ios. To solve this, I added the following in config.xml:

<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
   <string>Get Position</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
   <string>Get position</string>
</edit-config>

And after : ionic cordova platform remove ios && ionic cordova platform add ios

like image 106
BSDev Avatar answered Jan 26 '26 00:01

BSDev