[SOLVED] Geo Location on iOS mobile

@George What is the latest regarding Cordova plugins?

Or to be more specific, I have Google maps using geolocation working in a mobile app, through a browser. Accuracy is not exact, but I would not expect it to be.

I have the same app loading in ios and just seeing the map, without my location being found. I’m making the assumption I need the cordova plugin, but not sure if this is already included with Wappler or I need to add…and if so how do I go about managing plugins?

Thanks much!

–Ken

Actually all web dev technologies like gps positioning and also file upload/photos, should work fine without the need of Cordova plugins.

Usually you need just permissions.

Cordova plugins are more needed when you need to access local native data like local files, or databases and do more native integrations like push msg and others.

Actually PWA apps cover even many especially of those with integrations with web technology.

As we progress towards more visual tooling for workflows (multiple actions) also for the client side (apps), just as what we now have for the server side with server connect, you will see more and more components and workflows for the client side/apps

That will include local database connectors and indeed more Cordova plugins defending on the requests and needs of the users.

So lots of exciting stuff to do :smile:

1 Like

Okay, that helps understand this.

re: Permissions. The Google api key is unrestricted for this test, so are you saying Cordova has a set of permissions? Where do I manage that?

Actually the gps positioning on mobile is much dependent on the so called high accuracy.
You can enable it in Wappler:

image

For more info check:

http://www.andygup.net/how-accurate-is-html5-geolocation-really-part-2-mobile-web/

Hmmm…still no love.

High Accuracy enabled, rebuilt, then emulate on actual iPhone.

No long/lat coming back from geo.

Should I be expecting a popup to grant permission? I’m not seeing one.

Should I be expecting to have to set something in iOS Settings? Can’t find one.

Sorry George, this one is stumping me. It works in browser, but can’t find the magic for iOS yet.

Well have you allowed location tracking in the iOS settings for safari?

Or the iOS app that you have installed?

1 Like

Ahh, I see…has to be done in XCode. Got it working.

For others, in XCode browse to the Resources in your app.

In that folder you should find a .plist file.

Click to open, and add a new entry as shown here:

Then add one of the permissions – for example:

Privacy - Location When In Use Usage Description

Set this to type String and in the Value field enter the notice you will display to users explaining why you are requesting this permission.

Rebuild, done.

5 Likes