2

In the settings > my app > location, user can choose between

 - never
 - While using the App
 - Always

but i would like to have only :

 - never
 - Always

i know that other app did like this, so how to remove the While using the App options ?

zeus
  • 12,173
  • 9
  • 63
  • 184
  • 1
    I hope this can't be done. I never allow apps to access my location in the background. – rmaddy Jul 18 '17 at 17:17
  • 2
    This functionality, to remove `While using` is only available for iOS 10. In the current iOS 11 beta you cannot remove this option – Ollie Jul 18 '17 at 17:33
  • @Ollie : do you have some official doc about this ? – zeus Jul 18 '17 at 20:25
  • 3
    They discussed it in the 'What's New in Location Technologies' WWDC video this year: https://developer.apple.com/videos/play/wwdc2017/713/. You can jump to the specific part by searching the transcript for "So for iOS 11 we're asking all developers with Always requesting apps to additionally support the WhenInUse authorization mode." – Ollie Jul 18 '17 at 20:44

1 Answers1

2

You can achieve this by adding ONLY the NSLocationAlwaysUsageDescription in your Info.plist

enter image description here

GIJOW
  • 2,307
  • 1
  • 17
  • 37
  • thanks i will take a look, seam my framework don't permit to include only the NSLocationAlwaysUsageDescription – zeus Jul 18 '17 at 20:27
  • i can't verify it :( my framework don't permit it sad :( but before to go more deeply i will check what ollie say, that in ios 11 this not work anymore – zeus Jul 18 '17 at 20:47
  • Maybe it was just replaced by `NSLocationAlwaysAndWhenInUseUsageDescription`. But I will check here too – GIJOW Jul 18 '17 at 20:54
  • raaah another key :( but i don't think they will add a new key – zeus Jul 18 '17 at 20:56
  • digging yet, as it affects us in the head. But https://stackoverflow.com/questions/44424092/location-services-not-working-in-ios-11 – GIJOW Jul 18 '17 at 20:58
  • 1
    https://stackoverflow.com/questions/44424092/location-services-not-working-in-ios-11 ... so better to always add the 2 key :) – zeus Jul 18 '17 at 20:58
  • same remark at the same time ;) force is awaken ahah :) – zeus Jul 18 '17 at 21:00
  • lol... I said, this subject is dark. Always something to bother. However, it is not on docs yet... https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html – GIJOW Jul 18 '17 at 21:03
  • Now its not possible , apple restrict to show always access can be show with while in use – Ravi Ojha Mar 29 '18 at 13:12