Skip to content

[Proposal] iOS: deprecate "requestAuthorization" method in favor of "react-native-permissions" #224

Open
@Agontuk

Description

@Agontuk

Problem

  • requestAuthorization method handles both whenInUse & always permission request. Since both logic resides in the code, you have to include both NSLocationWhenInUseUsageDescription & NSLocationAlwaysAndWhenInUseUsageDescription in info.plist file, even if you want to use only whenInUse permission. Otherwise app store will reject your app submission, you can find the specific error here iOS App Store Build Missing Purpose String #198
  • There's currently no method available to check current permission status before requesting it.

Benefits of using react-native-permissions

  • RNP handles whenInUse & always permission logic separately, you've to include the one you want in your Podfile.
  • It already exposes a method to check current permission status
  • It already has methods available for precise location introduced in iOS 14.
  • It has unified API for all permissions, both for android & iOS.

Relevant issues

#185
#198
#214

These features can be implemented in this library, but it feels like reinventing the wheels when there's already a good solution available. Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions