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

SwiftEntrykit not working if UNUserNotificationCenter access is denied #355

Open
saqibdb opened this issue Sep 16, 2021 · 3 comments
Open

Comments

@saqibdb
Copy link

saqibdb commented Sep 16, 2021

Describe the bug
A weird is bug is coming up on specific iphone models (only). If the UNUserNotificationCenter settings permission is denied by the user, then swiftentrykit just stops working. This is not happening on all iphones and ios versions.
My understanding was swiftentrykit should not be dependant on the UNUserNotificationCenter as these both things are different.
Currently it is happening on iphone 11 pro which is running ios version 14.4.1

To Reproduce
Steps to reproduce the behavior:

  1. Code UNUserNotificationCenter permission asking function
  2. Deny the notification permissions on the alert
  3. Show any Swiftentrykit popup when the UNUserNotificationCenter's settings is denied
  4. Swiftentrykit popup will not get shown

Expected behavior
Swiftentrykit popup should be shown on any UNUserNotificationCenter's settings as they should not be linked.

Screenshots
image

iPhone (please complete the following information):

  • Device: iphone 11 pro
  • iOS Version: 14.4.1
  • Xcode Version Version 12.5 (12E262)
  • cocoapods-1.10.2
  • 'SwiftEntryKit', '1.2.7'

Additional context
This is only happening on iphone 11 pro, but not happening on iphone 6s

@huzaifa29
Copy link

huzaifa29 commented Sep 27, 2021

Hi Saqib. This issue is reproducing also when we denied the Photos Permission iOS Default Dialog Alert. I found a work around, if we add a little delay of 0.5 seconds its working, but definitely its not a good solution. I hope SwiftEntrykit resolve this issue in the next update:

DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
//Call your alert here
}

@JLLJHD
Copy link

JLLJHD commented Dec 20, 2022

解决了吗

@WilliamChengJM
Copy link

I got the same error,Do you resolve it?

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

4 participants