flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

Location while in use only.

Open aliakkawi opened this issue 4 years ago • 1 comments

In my app i need Location while in use only permission. Apple rejected my build because i need provide Location Always description in the info.plist. I cannot set 'PERMISSION_LOCATION=0', in my Podfile because it disable ask for all Location permission types. How can i solve this issue. Thanks

aliakkawi avatar May 09 '20 19:05 aliakkawi

@aliakkawi at the moment we don't make any distinction between the requestLocationAlways and requestLocationWhileInUse function. So the only option for now would be to add required item to the Info.plist even if you don't actually use it in your App.

I think it should be possible to split the PERMISSION_LOCATION macro into two different macros called PERMISSION_LOCATION_WHEN_IN_USE and PERMISSION_LOCATION_ALWAYS and only include the above functions when the matching macro is defined. This shouldn't be to difficult but some precision is required since the code uses some if-statements to determine which permissions to request based on the keys in the Info.plist file.

mvanbeusekom avatar May 18 '20 14:05 mvanbeusekom