Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

NSLocation required strings
Started by fer5 Jun 05 2019 10:04 AM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

fer5

[GLOBAL: userInfoPane.html]
fer5
  • Observer

  • 9 posts
  • Corona SDK

It appears that the Corona docs on this topic are out-of-date in three out of four places (latest daily build docs). Build.settings (and from there, info.plist) must contain strings for "NSLocationWhenInUseUsageDescription" and also "NSLocationAlwaysUsageDescription". 

 

There are at least two other NSLocation strings that may be required:
NSLocationAlwaysAndWhenInUseUsageDescription,

NSLocationUsageDescription.

 

There's some redundancy here, and the Apple documentation didn't make much sense to me. Has anyone tried submitting apps with limited subsets of these? Which ones are actually required?



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,684 posts
  • Enterprise

The two we have documented are the two currently needed by iOS 12 and earlier. iOS 13 is adding some new conditions, like asking for permission each time the app is in use will likely add a new key that will need to be included.

 

Rob



[TOPIC: post.html]
#3

fer5

[GLOBAL: userInfoPane.html]
fer5
  • Observer

  • 9 posts
  • Corona SDK

Just for reference, in the main documentation on location events (api/event/location/), the Android permission settings are present but there's no mention of the iOS NSLocation settings at all. In three other pages in the documentation, requestLocation.html, nearestAddress.html, getUserLocation.html, just one of the two settings, NSLocationWhenInUseUsageDescription, is mentioned as a required string. And in only one page in the documentation, newMapView.html, the two NSLocation settings which are currently required are listed:

plist =
        {
            NSLocationAlwaysUsageDescription = "This app would like to use location services.",
            NSLocationWhenInUseUsageDescription = "This app would like to use location services.",
        },


[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,684 posts
  • Enterprise

If you do a File->New Project, we should be inserting default strings for you.



[TOPIC: post.html]
#5

fer5

[GLOBAL: userInfoPane.html]
fer5
  • Observer

  • 9 posts
  • Corona SDK

Default strings like that in build.settings for location services (and other required strings for iOS/iPadOS) would certainly be nice, but I'm not seeing that behavior from File/New Project. That produces a minimal list of properties. Is there some more complete up-to-date template that's maintained somewhere? Thanks.




[topic_controls]
[/topic_controls]