Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jul 4, 2025

Closes WOOMOB-742

Description

This PR fixes the connection issue between the app and the watch upon fresh installs.

Cause

The activationDidCompleteWith delegate method in WatchDependenciesSynchronizer is not triggered upon launch after the iOS app is first installed, causing the syncing method to fail assuming the watch session is not active.

Solution

  • Replaces the isSessionActive property with the check for watchSession.activationState when syncing data on the iOS app.
  • Adds tracking for when syncing fails - this might be useful if we see more reports about the connection between the iOS app and the watch.
  • Adds a new label on the ConnectView on the watch for workaround when connection fails. This label is displayed only after the user taps "It's not working" button.

Testing steps

  • Delete the Woo app on your iPhone if it's already installed.
  • Download the prototype build in this PR.
  • After installation completes, confirm that the watch app is installed. Open the app on your watch.
  • Confirm that the app displays "Open Woo on your iPhone, log into your store, and hold your Watch nearby."
  • Tap "It's not working" and confirm that "If the error persists, relaunch the app." is displayed.
  • On the iOS app, log in to your test store.
  • When login completes, check the watch and confirm that the connected store is displayed.

Testing information

Tested and confirmed with iPhone 16 Pro iOS 18.3 & Watch SE watchOS 11.1.

Screenshots

Simulator.Screen.Recording.-.Apple.Watch.Series.10.42mm.-.2025-07-04.at.15.08.05.mp4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@dangermattic
Copy link
Collaborator

dangermattic commented Jul 4, 2025

1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@itsmeichigo itsmeichigo added the category: tracks Related to analytics, including Tracks Events. label Jul 4, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jul 4, 2025

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

App NameWooCommerce iOS Prototype
Build Numberpr15867-c79e386
Version22.7
Bundle IDcom.automattic.alpha.woocommerce
Commitc79e386
Installation URL47736jpo8b5e8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo changed the title Watch app: Mitigate connection issue upon fresh installs Watch app: Fix connection issue upon fresh installs Jul 4, 2025
@itsmeichigo itsmeichigo added type: bug A confirmed bug. and removed Enhancement labels Jul 4, 2025
@itsmeichigo itsmeichigo marked this pull request as ready for review July 4, 2025 08:49
@itsmeichigo itsmeichigo requested a review from RafaelKayumov July 4, 2025 08:50
@itsmeichigo
Copy link
Contributor Author

New event registered in 3010-gh-Automattic/tracks-events-registration

Copy link
Contributor

@toupper toupper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @itsmeichigo! The code looks good and tests well on my Watch SE (Gen 2). 🚢 :shipit:

@toupper toupper self-assigned this Jul 4, 2025
@itsmeichigo itsmeichigo merged commit 90d9ddf into trunk Jul 5, 2025
13 checks passed
@itsmeichigo itsmeichigo deleted the woomob-742-watch-app-stays-stuck-on-open-woo-in-your-phone-screen branch July 5, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events. feature: apple watch type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants