SyncManager.shared for Realm v10+ not accessible (iOS)

[I’m using Realm v10.5.0 with Xcode 11.7]

Trying to use a variety of properties (see below) with ‘SyncManager’ Singleton. The API reference states it is available (iOS-Swift-10.5.0-API-Reference-SyncManager-Singleton), but it is not. There is some info in the ChangeLog (to use ‘App’), but it does not work either.

Trying to handle these:
SyncManager.shared.logLevel
SyncManager.shared.errorHandler
SyncManager.shared.authorizationHeaderName
SyncManager.shared.customRequestHeaders

Some Others:
SyncManager.shared.userAgent
SyncManager.shared.appID

Known Not to Work:
SyncManager.shared.pinnedCertificatePaths

Heya,

The SyncManager is no longer a singleton– there is now a SyncManager per App.
For example:

let app = App(id: "my-app-id")
app.syncManager.logLevel = .debug

User agent and pinned certificate paths also don’t really make sense with the current implementation of MongoDB Realm.

Cheers.

1 Like

Ah - thank you Jason!

The docs are not updated.

Thanks for the heads up, we’ll update the docs soon.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.