woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
257 stars 108 forks source link

Fix notifications issues #12633

Closed joshheald closed 2 weeks ago

joshheald commented 2 weeks ago

Closes: #

Description

In #12443, in-app notifications (when the app is in the foreground) were inadvertently broken, and so was navigation/handling of background notifications.

This was because we removed the delegate link to the UNUserNotificationCenter, so the delegate methods AppDelegate.userNotificationCenter(_:didReceive:) and AppDelegate.userNotificationCenter(_:willPresent:) were never called, and so not forwarded to the pushNotesManager.

This commit restores the delegate configuration.

Testing instructions

  1. launch the app
  2. select a store connected via jetpack, and leave the app open
  3. on another device, make a purchase for anything
  4. The app should show a notice saying you've got a new order, with a view button...

Repeat the test with the app in the background. Tapping the notification should open the order.


dangermattic commented 2 weeks ago
1 Warning
:warning: This PR is assigned to the milestone 18.4. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by :no_entry_sign: Danger

wpmobilebot commented 2 weeks ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr12633-0a604d2
Version18.4
Bundle IDcom.automattic.alpha.woocommerce
Commit0a604d2b60f491b04a63d3c797c50a065db95ec1
App Center BuildWooCommerce - Prototype Builds #8928

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.