Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Binary rejected for using permission i don't need #142

Open
donadev opened this issue Nov 21, 2024 · 2 comments
Open

iOS Binary rejected for using permission i don't need #142

donadev opened this issue Nov 21, 2024 · 2 comments

Comments

@donadev
Copy link

donadev commented Nov 21, 2024

Issue

My iOS app using moko-permissions was rejected by App Store Connect because Info.plist keys for NSContactsUsageDescription and NSMotionUsageDescription were missing. This happened despite not using these features, as the library implicitly referenced them.

Problem

Unused permissions are included by default, leading to:

  • App store rejections.
  • Manual fixes like adding unnecessary Info.plist keys.

Proposed Solution

  1. Explicit Permission Registration
    Allow developers to register only the permissions they need:

    val permissionsManager = PermissionsManager.create {
        registerPermission(Permission.CAMERA)
        registerPermission(Permission.LOCATION)
    }
  2. Build-Time Validation
    Warn if required Info.plist keys are missing or if unregistered permissions are included.

  3. Documentation Update
    Guide users on registering permissions and preventing app store issues.

Benefits

  • Prevents unnecessary permissions in builds.
  • Avoids app store rejections.
  • Simplifies configuration and debugging.
@Alex009
Copy link
Member

Alex009 commented Nov 25, 2024

duplicate of #103

and you still can just write some mock description in Info.plist to pass auto-checks of appstore.

@donadev
Copy link
Author

donadev commented Nov 26, 2024

Thanks! If I understood correctly, the library will not trigger at runtime permission requests for these services I don't use, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants