fix: watchOS support - disable network monitoring, add client timeout #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Table of Contents
Description of changes:
Network Path Monitoring will return
unsatisified
on watchOS devices since it is considered low-level networking and cannot be used.This PR avoids using network path monitoring for watchOS so that it will try to attempt to connect if subscribe API is called. This is a critical piece of logic that is required for the enabled subscriptions use case.
For example, when using DataStore on watchOS, and subscriptions are enabled, we want the logic to at least attempt to connect.
The connection may fail if special circumstances are not met, thus, we implement a client timeout to disconnect and signal back the caller that the subscription is disconnected.
When all are aligned: watchOS special circumstances is met, DataStore subscriptions enabled, subscribe API is called, then the connection should be established and the client timeout will do nothing once it fires.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.