Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Sep 9, 2025

Closes WOOMOB-1187

Description

This PR adds the capability to clear sites flagged as unsupported for network switching to direct requests after 14 days. This is to ensure that sites can take advantage of the switch if app passwords are enabled again.

Changes include:

  • Changed the type of applicationPasswordUnsupportedList to dictionary of type [String: Date] to store site IDs along with the flagged date. String is required as dictionaries stored in UserDefaults need to be compliant to property list type with keys being strings.
  • Added a helper method to check if a site is flagged and clear the the flag if the flag has expired (created more than 14 days ago).
  • Updated tests.

Testing steps

Follow the TC7 test steps from here pe5sF9-4Am-p2.

Testing information

Tested and confirmed TC7 with the alpha build on my iPhone.

Screenshots

N/A


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

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 9, 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 Numberpr16107-8e8839a
Version23.2
Bundle IDcom.automattic.alpha.woocommerce
Commit8e8839a
Installation URL644f03oatftbo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review September 9, 2025 05:56
@itsmeichigo itsmeichigo added the type: task An internally driven task. label Sep 9, 2025
@itsmeichigo itsmeichigo added this to the 23.3 milestone Sep 9, 2025
@itsmeichigo itsmeichigo changed the title Application password experiment: Clear flagged sites after 7 days Application password experiment: Clear flagged sites after 14 days Sep 9, 2025
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

LGTM. Left just 1 nit

return false
}

let timeElapsed = Date().timeIntervalSince1970 - flagDate.timeIntervalSince1970
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: There is a method to obtain difference between dates

let timeElapsed = Date().timeIntervalSince(flagDate)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Updated in 8e8839a.

@itsmeichigo itsmeichigo merged commit 6444d99 into trunk Sep 10, 2025
14 checks passed
@itsmeichigo itsmeichigo deleted the woomob-1187-update-site-status-periodically branch September 10, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants