Skip to content

Conversation

joshheald
Copy link
Contributor

Description

🛑 Do not merge!

This adds some test code to explore what we can do with background tasks.

This build will schedule a BGAppRefreshTask for incremental sync, and a BGProcessingTask for a full sync.

The incremental sync fetches up to 3 pages of products for the current store, and will happen no more than every 5 minutes, probably less.

The full sync fetches an 80MB JSON file from a specific test file. This will happen no more than every 30 minutes, probably much less.

Both pretend to save these, and log information about the background time provided. We also log lots of details about scheduling syncs, and provide buttons to change what's scheduled in the Experimental features menu.

Steps to reproduce

  • Launch the app
  • Stop the app in Xcode – background tasks don't work while debugging
  • Go to Menu > Settings > Experimental Features.
  • Optionally force or cancel any background tasks – there should be some scheduled from launch though.
  • Tap the button to log the current state
  • Go to Help & Support > Application Log > Current and scroll down to see the state
  • Background the app and leave it a while. Check back on the logs later to see what's happened with sync.

@joshheald joshheald added status: do not merge Dependent on another PR, ready for review but not ready for merge. feature: POS labels Aug 13, 2025
@dangermattic
Copy link
Collaborator

1 Error
🚫 Please ensure the PR has the category: tracks label.
1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
2 Messages
📖

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.
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

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 Numberpr16008-5431dfc
Version23.0
Bundle IDcom.automattic.alpha.woocommerce
Commit5431dfc
Installation URL7shp7db19rnp0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: POS status: do not merge Dependent on another PR, ready for review but not ready for merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants