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

REMOTE_NOTIFICATION Permission Denied crashed: When user click on "Don't Allow" crashes on iOS #141

Open
WPSeven opened this issue Nov 16, 2024 · 1 comment

Comments

@WPSeven
Copy link

WPSeven commented Nov 16, 2024

moko.permissions.version = "0.18.1"
kotlin = "2.0.10"
compose= "1.6.11"
iOS = 18.1 / 18.0

When I denied notification permission on iOS, the app crashed. However, if the user allows it, the app works. I’m not sure what to look for, but it works perfectly on Android.

I’ve come across some logs that show “Uncaught Kotlin exception: kotlin.IllegalStateException: notifications permission failed,” and I’m not too familiar with iOS. Could you please suggest someone who might be able to help me out?

Screenshot 2024-11-16 at 2 16 29 PM Screenshot 2024-11-16 at 2 27 49 PM Screenshot 2024-11-16 at 2 35 59 PM
@ChristopheTremblay
Copy link

I noticed that the call to change the permission to denied actually went through. (The status of notifications is actually denied and not not determined). To work around this issue temporarily I caught the exception in my try catch with a general Exception.

try {
    permissionsController.providePermission(Permission.REMOTE_NOTIFICATION)
} catch (e: Exception) {
    ....
}

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