Under Review

Inconsistent onStopSync Behavior Across Devices

According to the documentation, SyncDelegate.onStopSync() is only called “when an active sync is being cancelled by the user.”

This is also how it behaves in the simulator.

However, when testing on an Epix Pro Gen 2, I observed that onStopSync() is also invoked when Communication.notifySyncComplete() is called with a non-null parameter, meaning an error message.

On the Edge 850, onStopSync() is even triggered after a successful completion, once the user confirms the success screen.

This behavior should be consistent across the simulator, physical devices, and the documentation.

At the moment, the app has to account for at least these three different scenarios. In my case, there is a task that must run after the sync has completed, exactly once. As a result, I currently have to trigger it from multiple places and add additional state tracking to ensure it is executed once and only once, in order to handle the differing behaviors across devices.