ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.
http://sabintsev.com/
MIT License
4.26k stars 407 forks source link

Update dialog can't appear bug #397

Closed keyboardseokmin closed 2 years ago

keyboardseokmin commented 2 years ago

Problem

  1. Check update as .onForeground (Siren.shared.wail(performCheck: .onForeground))
  2. If user swipe down the notification center screen to the bottom of screen (by swiping downward from the very top of the device's screen)
  3. And back to app can't appear update dialog

Reason

If swipe down the notification center screen to the bottom of screen iOS call observer like this

  1. starting to swipe down : willResignActiveNotification
  2. reached to bottom : didBecomeActiveNotification, willResignActiveNotification
ArtSabintsev commented 2 years ago

Thanks for the PR. Last request: can you show me a before and after video of this experience? Before your change and after you change.

Thank you!

keyboardseokmin commented 2 years ago

This video is before changing https://drive.google.com/file/d/1g6kmV98hqXazlfk68rO-7wBqw4_r3aWb/view?usp=sharing

This video is after changing https://drive.google.com/file/d/1_m3uA_12aJpfG1JFaH5k0CKLvV1NQzAE/view?usp=sharing

Update dialog working perpectly in both video when app go background and return foreground but few seconds later they operate different when swipe down a notification screen.

ArtSabintsev commented 2 years ago

Ok, great! Thank you for those videos. I'll review the code tonight and merge it in

ArtSabintsev commented 2 years ago

Alright, going to merge this in and address a compilation issue around async/await in the latest xcode.

Thanks for the work here!

keyboardseokmin commented 2 years ago

This is my first contribution of open source. I will never forget this, It was so fun!

Thanks to review my code, ArtSabintsev : )

ArtSabintsev commented 2 years ago

Hah, no prob, thanks for finding the bug and offering a fix!