How to add Geolocation configuration in the configuration.xml file using the capacitor?

Hí, I’m using the geolocation plugin (Geolocation | W3C Geolocator Application API Plugin). I need to add a configuration for IOS in the configuration.xml file. But I am using the Capacitor and not the Cordova. How do I add the configuration on the Capacitor?

You should use the Capacitor one: Capacitor - build cross platform apps with the web

Also the Config that you mean, can be done in the Capacitor iOS Project directly by editing your Info.plist File

1 Like

What configuration you need to add? the cordova-plugin-geolocation doesn’t have any preferences.

If you mean the edit-config ones, that’s for writing in the Info.plist, in Capacitor you can just add those values from Xcode, most of them are already there on the default app template.

1 Like

For anyone wondering (like me a few minutes ago) which values you have to add exactly, here is an example code: Ionic iOS Geolocation - Stack Overflow.