newMapView on iOS8 (gets my location but still gives error message)

Good morning/day.

I have an app that uses the native map and gets our location and always worked fine until I tested in the new iOS8… It didn’t worked, an error popup appeared that said something like “Error: It wasn’t possible to obtain your location…”, so i searched and on the corona docs i saw that for iOS8 we need to add a line in the build.settings file (

I did that (added “NSLocationWhenInUseUsageDescription”) and also installed the newest Corona (ver 2511).

Now, when I open the app and the map scene for the first time, it asks me if i allow the app to get my location, I clicked yes but then it stills shows that same popup with the location error (even though I can see that the map, beneath that error popup, does show my location without a problem).

It seems that, both popups open around the same time, first the error one and then the one that asks my permission (on top of the error one), and I don’t understand why that happens.

Am I doing something wrong? No one else has this happening?

By the way, that only happens the first time I open the app (after installing on a iOS8 device), which is to be expected I suppose since is then that I have to give the permission.

Thanks in advance.

Good morning/day.

Sorry for double post, but I have some urgency on this matter. I find it hard to believe that no one else encounters this problem, but I cant find anything else like this on the forums either so I guess thats the case, so maybe I am doing something wrong but cant find what.

Is there maybe some “workaround” to “kill” that first popup? Because the Map does work (gets my location) if I click yes.

Any help would be much appreciated.

Thanks

Hi Zau,

Is the very first thing you do is open the map? Meaning, when the app launches, is the very first task to show the map?

In any case, I haven’t tested this behavior yet. Does the permission request occur when you open the app? Or only when you request the map, even if that happens later in the app?

Brent

Hi,

No, its not the first thing. The app has a splash screen and then it goes to a HOME/MENU scene, and only after that (when I choose the MAP button) it goes for the MAP scene. Also, it only opens the permission popup when I go to the MAP scene, not in the beginning (as well as the error popup which is the first to appear). 

Like I said before, this only happens the very first time I open the app after installation.

Thanks for the answer.

Hi Zau,

Just out of curiosity, can you try our sample project which uses maps and see if the same behavior occurs? The project is located in your local Corona application directory:

CoronaSDK > SampleCode > Interface > MapView

Thanks,

Brent

Good morning/day.

Sorry for double post, but I have some urgency on this matter. I find it hard to believe that no one else encounters this problem, but I cant find anything else like this on the forums either so I guess thats the case, so maybe I am doing something wrong but cant find what.

Is there maybe some “workaround” to “kill” that first popup? Because the Map does work (gets my location) if I click yes.

Any help would be much appreciated.

Thanks

Hi Zau,

Is the very first thing you do is open the map? Meaning, when the app launches, is the very first task to show the map?

In any case, I haven’t tested this behavior yet. Does the permission request occur when you open the app? Or only when you request the map, even if that happens later in the app?

Brent

Hi,

No, its not the first thing. The app has a splash screen and then it goes to a HOME/MENU scene, and only after that (when I choose the MAP button) it goes for the MAP scene. Also, it only opens the permission popup when I go to the MAP scene, not in the beginning (as well as the error popup which is the first to appear). 

Like I said before, this only happens the very first time I open the app after installation.

Thanks for the answer.

Hi Zau,

Just out of curiosity, can you try our sample project which uses maps and see if the same behavior occurs? The project is located in your local Corona application directory:

CoronaSDK > SampleCode > Interface > MapView

Thanks,

Brent