Why my Corona app shows up a dialog asking "Allow 'MyApp' access your location"?

When I use my app today in iPhone 5, suddenly a dialog pops up asking

Allow 'MyApp' access your location even when you are not using the app

I don’t think my app using any location service.

What kind of setting would make this happen?

How to disable it?

It’s really so weird & user unfriendly that my app is asking for users permission for location access.

I don’t do any location based service.

Can Corona help?

Can you please post your build.settings content? Is this on IOS 8 or older? Which build are you running? Thanks

Yesterday I received that same alert regarding an app that was installed on my phone (the app was “SpeedTest” and I don’t think it is a Corona app) and I found strange for the app to be tracking me on the background.

So, I went to my iphone settings (Settings->Privacy->Location Services) to disable it. For my surprise one of my Corona apps was there also as it was “always” using location and my app doesn’t use GPS at all.

So, I think this is one more new iOS8 thing that Corona staff should take a look. Maybe it is some API that is already activated on all Corona apps and so it triggers that “always” tracking.

I noticed on other apps (specially the ones that really use GPS as Food order apps) that they appear on my settings as using GPS only “While Using” the app. My Corona apps does not show that option of “While Using”. Only shows “Always” or “Never”.

Yes, I saw this in iOS 8 and the Corona build is 2432.

Here is the build.settings:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" }, }, iphone = { plist = { UIStatusBarHidden = true, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", }, } }, android = { versionCode = "1900", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.ads.iads"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["facebook"] = { publisherId = "com.coronalabs", }, ["plugin.chartboost"] = { publisherId = "com.gremlininteractive", }, }, }

We have already addressed this in daily builds (2439).  See:  http://coronalabs.com/blog/2014/09/24/ios-8-and-corona-sdk/

If you are using the GPS or Maps or anything that would require including the Location framework, the iOS 8 default is to ask for permission to use the GPS even when backgrounded.  If you want to not scare your users, you have to add an entry to your build.settings (see the blog post above) that asks the user for permission to use Location Services when your app is running.  This will allow iOS 8 to provide the user the option to choose Always, Never or when running.

if you are getting that message without anything including Location Services, then we probably need to look into things more.

Rob

(1) The link you provide is saying “there is similarly no issue as long as you build against iOS SDK “7.1″ (not “8.0 Beta”).”

My app was built with SDK 7.1, not 8.0. I said I saw the alert in iOS 8 but it doesn’t mean I built it with iOS SDK 8.0

so is this the same issue as your link indicates?

(2) I am not using any location services

so I don’t know why the alert about location service would come out?

Are you using an ad providers or any other plugins that might be doing location tracking?

As for the 7.1, it could be an iOS 8 thing anyway.  You might need to use iOS 8 and this key to avoid it.  Location Services should work though.

I’ve listed the plugins in the build.settings file. I think I just use the common plugins.

I am not using location service at all and I don’t care about it, however the pop-up alert for location service is very user unfriendly to the app users.

Are you saying if I add the key, there will be no more pop-up alert?

No, the key will popup if the app thinks it’s using location services.  I’m not familiar with Chartboost’s requirements. What happens if you try and build with out it to rule it out?

Rob

It’s really so weird & user unfriendly that my app is asking for users permission for location access.

I don’t do any location based service.

Can Corona help?

Can you please post your build.settings content? Is this on IOS 8 or older? Which build are you running? Thanks

Yesterday I received that same alert regarding an app that was installed on my phone (the app was “SpeedTest” and I don’t think it is a Corona app) and I found strange for the app to be tracking me on the background.

So, I went to my iphone settings (Settings->Privacy->Location Services) to disable it. For my surprise one of my Corona apps was there also as it was “always” using location and my app doesn’t use GPS at all.

So, I think this is one more new iOS8 thing that Corona staff should take a look. Maybe it is some API that is already activated on all Corona apps and so it triggers that “always” tracking.

I noticed on other apps (specially the ones that really use GPS as Food order apps) that they appear on my settings as using GPS only “While Using” the app. My Corona apps does not show that option of “While Using”. Only shows “Always” or “Never”.

Yes, I saw this in iOS 8 and the Corona build is 2432.

Here is the build.settings:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" }, }, iphone = { plist = { UIStatusBarHidden = true, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", }, } }, android = { versionCode = "1900", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.ads.iads"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["facebook"] = { publisherId = "com.coronalabs", }, ["plugin.chartboost"] = { publisherId = "com.gremlininteractive", }, }, }

We have already addressed this in daily builds (2439).  See:  http://coronalabs.com/blog/2014/09/24/ios-8-and-corona-sdk/

If you are using the GPS or Maps or anything that would require including the Location framework, the iOS 8 default is to ask for permission to use the GPS even when backgrounded.  If you want to not scare your users, you have to add an entry to your build.settings (see the blog post above) that asks the user for permission to use Location Services when your app is running.  This will allow iOS 8 to provide the user the option to choose Always, Never or when running.

if you are getting that message without anything including Location Services, then we probably need to look into things more.

Rob

(1) The link you provide is saying “there is similarly no issue as long as you build against iOS SDK “7.1″ (not “8.0 Beta”).”

My app was built with SDK 7.1, not 8.0. I said I saw the alert in iOS 8 but it doesn’t mean I built it with iOS SDK 8.0

so is this the same issue as your link indicates?

(2) I am not using any location services

so I don’t know why the alert about location service would come out?

Are you using an ad providers or any other plugins that might be doing location tracking?

As for the 7.1, it could be an iOS 8 thing anyway.  You might need to use iOS 8 and this key to avoid it.  Location Services should work though.

I’ve listed the plugins in the build.settings file. I think I just use the common plugins.

I am not using location service at all and I don’t care about it, however the pop-up alert for location service is very user unfriendly to the app users.

Are you saying if I add the key, there will be no more pop-up alert?

No, the key will popup if the app thinks it’s using location services.  I’m not familiar with Chartboost’s requirements. What happens if you try and build with out it to rule it out?

Rob