Hello @cvp ,
I tried the code out in Pythonista and I was able to run my app and get the coordinates successfully...
When I placed it in the app template provided by @omz and tried the location module I was not able to use it. The error message I received was
Traceback (most recent call last): File "/var/mobile/Containers/Data/Application/11A60AF2-A1D5-4F30-981C-7A65792D1D3A/Library/Application Support/PythonistaScript/main.py", line 24, in currentlocation_tapped gpslongitude = currentlocation.get("longitude") AttributeError: 'NoneType' object has no attribute 'get'
Will the location module work once the app is published on the App Store? Will the user be able to allow the location in the settings at that point?
Currently, when I load the app onto my iPhone for testing, when I go to my settings to set the privacy options to allow geo-location for my app it shows it as 'Never' then when I click that and go back I am allowed to choose 'Always', not sure why that is happening or if that is the cause of the issue...
Not sure why the location module is working fine with the same code within Pythonista and behaves differently(throws errors) when loaded into xCode.
I needed to update the info.plist to include the various location usage keys and accompanying string.