woocommerce-ios icon indicating copy to clipboard operation
woocommerce-ios copied to clipboard

Replace in-app notifications with iOS push notifications using `UNUserNotificationCenterDelegate`

Open jaclync opened this issue 3 years ago • 3 comments
trafficstars

Discussion: p1642386318003700/1642385728.003600-slack-CGPNUU63E Related: p91TBi-9A0-p2

While we added a CTA to view an in-app notification when the app is in the foreground https://github.com/woocommerce/woocommerce-ios/issues/5330, we decided to replace the in-app notifications with iOS push notifications in https://github.com/woocommerce/woocommerce-ios/issues/5330#issuecomment-1014121256.

To implement iOS push notifications while the app is in the foreground, we need to use UNUserNotificationCenterDelegate which replaces the application(_:didReceiveRemoteNotification:) in the app delegate when the app is in the foreground. This is quite a big change and requires extensive testing since notifications are a critical feature in the app. Let's make sure to test:

  • [ ] Register for push notifications for the first time (like by reinstalling the app)
  • [ ] The app was using application(_:didReceiveRemoteNotification:) before, and updated to use UNUserNotificationCenterDelegate
  • [ ] Disable push notifications and re-enable in iOS settings
  • [ ] Make sure the app icon badge shows 1 when a push notification arrives
  • [ ] Tapping on a push notification while the app is in the foreground
  • [ ] Tapping on a push notification while the app is in the background
  • [ ] Tapping on a push notification while the app is closed

jaclync avatar Jan 27 '22 08:01 jaclync

Fails
:no_entry_sign: Please add a feature label to this issue. e.g. 'feature: stats'

Generated by :no_entry_sign: dangerJS

peril-woocommerce[bot] avatar Jan 27 '22 08:01 peril-woocommerce[bot]

Fails
:no_entry_sign: Please add a feature label to this issue. e.g. 'feature: stats'

Generated by :no_entry_sign: dangerJS

peril-woocommerce[bot] avatar Jan 27 '22 08:01 peril-woocommerce[bot]

Fails
:no_entry_sign: Please add a feature label to this issue. e.g. 'feature: stats'

Generated by :no_entry_sign: dangerJS

peril-woocommerce[bot] avatar Jan 27 '22 08:01 peril-woocommerce[bot]