React-native-permissions: Compatibility iOS 11

Created on 28 Sep 2017  路  6Comments  路  Source: zoontek/react-native-permissions

Hello!

We're trying to pick a module with which we can implement the new permission flows:
https://mackuba.eu/2017/07/13/changes-to-location-tracking-in-ios-11/.

We have updated our Info.plist but we're not able to get the correct permission dialog using react-native-permissions. When we try to ask for 'always' permission it's denied immediately without showing the new pop up coming with iOS 11 where the user has the option to choose between - While using the app, Always and Never.

What changes do we need to make in order to get it running ? Maybe we can figure this out together and crate a PR 馃

Most helpful comment

It works if you use the Permissions.request('location', 'always') at first. You just have to add the NSLocationAlwaysAndWhenInUseUsageDescription in your plist for iOS11.

All 6 comments

@altras - thanks for bringing this up. I'm not actively developing with RN right now (lolz) and I'm not running iOS 11 on any device. I'm going to have to rely on the community for this one.

It works if you use the Permissions.request('location', 'always') at first. You just have to add the NSLocationAlwaysAndWhenInUseUsageDescription in your plist for iOS11.

If I am correct, I don't think there is a problem with this package.

@MoOx Correct! See @nicedexter answer to fix your permission flow

@nicedexter and @andidev thanks for that! I've been trying to figure out why the permission screen wasn't showing for an hr. The change really seems redundant.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

note89 picture note89  路  35Comments

rohitgoyal picture rohitgoyal  路  20Comments

mtt87 picture mtt87  路  28Comments

ozturkilgim picture ozturkilgim  路  31Comments

iegik picture iegik  路  19Comments