icerockdev / moko-permissions

Runtime permissions controls for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
396 stars 41 forks source link

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

Open donadev opened 1 week ago

donadev commented 1 week ago

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:

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

Alex009 commented 5 days ago

duplicate of #103

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

donadev commented 4 days ago

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