Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: watchOS support - disable network monitoring, add client timeout #141

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

lawmicha
Copy link
Contributor

@lawmicha lawmicha commented Nov 23, 2023

Issue #, if available:

Table of Contents

  1. fix(DataStore): Store larger than 32-bit values in Int64 over Int #3367
  2. feat(DataStore): DisableSubscriptions flag for watchOS #3368
  3. fix: watchOS support - disable network monitoring, add client timeout #141 (You are here)

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.

@lawmicha lawmicha merged commit 92e4297 into main Dec 1, 2023
2 checks passed
@lawmicha lawmicha deleted the lawmicha.watchos-timeout branch December 1, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants