Native Map loads intermittently

I’ve been trying to debug this for over a week and I’m at the point of considering removing the stupid map out of frustration.

Here’s the video showing the bug in action on an iPhone 6 plus: 

https://www.youtube.com/watch?v=ixZetjr_uUk

Basically, my native map sometimes loads, sometimes it doesn’t. This appears to be random and I haven’t found a cause yet. As you can see in the video, sometimes when I press on another on-screen control it shows, but sometimes not even that works.

Some of the things I tried to no avail:

  1. Destroying all hidden composer scenes after each scene is loaded.

  2. Removing *everything* (literally) from that scene and only leaving the map

  3. Loading that scene with hard coded data at the beginning (meaning without loading any other scenes before that)

  4. Overlapping (and not-overlapping) the map with other controls

  5. Loading the map in round number coordinates and non round number coordinates (eg. x = 10, x = 10.5, etc)

  6. Loading the map with a timer.performWithDelay

  7. Trace every scene event to make sure the scene was being loaded only once

Also, these two errors appear in the iPhone logs when the map is finally shown:

 Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first.

I had already reported this error to Corona on a previous occasion and they flagged it for a future fix but said that maps should display fine nonetheless.

The other error I’m getting as the maps appear (when they do) is:

<my app’s bundle ID here> is depending on legacy on-demand authorization, which is not supported for new apps

Has anybody ever come across this?

Hi @chillfok,

We’d probably need to see some code to begin diagnosing this. The main thing to remember about maps is that certain actions must be delayed a bit because the GPS software needs to “catch up” before it can do its action. So, if you are frequently swapping between maps, the behavior might seem a bit odd. But, I don’t know how you’re coding this all.

That being said, we probably can’t diagnose an entire routine, especially if you have Composer scenes running it all. If you can isolate this down to maybe one issue (and one code bit) at a time, we could start looking at the first one, then see where that takes us.

Brent

Hi @chillfok,

We’d probably need to see some code to begin diagnosing this. The main thing to remember about maps is that certain actions must be delayed a bit because the GPS software needs to “catch up” before it can do its action. So, if you are frequently swapping between maps, the behavior might seem a bit odd. But, I don’t know how you’re coding this all.

That being said, we probably can’t diagnose an entire routine, especially if you have Composer scenes running it all. If you can isolate this down to maybe one issue (and one code bit) at a time, we could start looking at the first one, then see where that takes us.

Brent