Syncconfiguration Deprecated, What Is the Proper Use of Syncuser.Configuration()

Realm SyncConfiguration.Builder deprecated

You need to log in first to have a valid SyncUser.

    SyncUser user = SyncUser.logIn(SyncCredentials.usernamePassword(username, password, true), Constants.AUTH_URL);

SyncConfiguration config = user.createConfiguration(Constants.USER_REALM).build();

So I'm guessing the following would work:

SyncUser syncUser = SyncUser.current();
if (syncUser == null) {
SyncCredentials myCredentials = SyncCredentials.usernamePassword("userid", "pass", false);
syncUser = SyncUser.logIn(myCredentials, AUTH_URL);
}
SyncConfiguration configuration = syncUser.createConfiguration(REALM_BASE_URL + "/~/myDB").build();

Note that this defaults to using partial synchronization, so if you want to retain previous behavior, you might have to call .fullSynchronization().build().

What method should I use instead of a deprecated 'resumeAnimation(forKey:)'?

You can retrieve an SCNAnimationPlayer using animationPlayer(forKey:) and then set its paused property to true.



Related Topics



Leave a reply



Submit