Closed mockturtl closed 4 years ago
i have the same problem
Have the same issue
@mockturtl this is expected behaviour and only occurs when your "Info.plist" doesn't include the correct permissions.
In this case you are actively requesting "locationAlways" permissions while the permissions in your "Info.plist" only contain the NSLocationWhenInUseUsageDescription
key.
You have two solutions here:
Hope this helped solve your issue.
@mvanbeusekom Thank you for the reply and the workaround. I did discover both your suggestions through trial and error, and they solved it, but it was a little frustrating.
In this case you are actively requesting "locationAlways" permissions
That's confusing, to me. I call the API with the default value for the optional parameter, LocationPermissionLevel.location
. To me, that means I am actively not requesting a different value.
enum LocationPermissionLevel {
location, // is this Android only? What does it mean in Android 10?
locationWhenInUse,
locationAlways,
}
Please reconsider documenting this behavior, or the intended usage -- judging by the upvotes, it could be a little more clear.
@athornz
🐛 Bug Report
When requesting location permission on iOS, the user selects "only when in use." The plugin returns "denied."
Expected behavior
"Granted," or maybe "restricted." (Have I misunderstood the semantics here? If it's a matter of what the default
PermissionLevel.location
means on Android vs iOS, please document the difference!)Reproduction steps
From a Flutter iOS app, call requestPermissions(). Choose "When in use" from the prompt. See "denied" logged as the return value.
https://github.com/BaseflowIT/flutter-permission-plugins/blob/develop/packages/location_permissions/ios/Classes/LocationPermissionsPlugin.m#L195
https://github.com/BaseflowIT/flutter-permission-plugins/blob/develop/packages/location_permissions/ios/Classes/LocationPermissionsPlugin.m#L108
Configuration
Version: 2.0.2
Platform: