mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

STITCH-2213 Swift SDK: Create the "Sync" interface #109

Closed jsflax closed 5 years ago

jsflax commented 5 years ago

This adds the connective glue between CoreSync, Sync, CoreRemoteMongoClient, the DataSynchronizer, and the StitchAppClient.

App clients are now constructed with a NetworkMonitor (which defaults to the new DarwinNetworkMonitor class). StitchAppClientInfo will receive that network monitor, as well the StitchAppClientImpl, which now conforms to AuthMonitor. This is passed upstream to the RemoteMongoClientFactory, which passes it back downstream to the newly added CoreRemoteMongoClientFactory, creating a new sync local MongoDB client. Later CoreRemoteMongoCollection's will construct the DataSynchronizer with these fields. DS is encapsulated by CoreSync, which is used as a proxy by the newly added Sync class.

A NamedThrowingServiceClientFactory has been added for the new case of a named ServiceClient that also throws.

jsflax commented 5 years ago

@adamchel PTAL. There's one question for you as well.