contentful / vault

Easy persistence of Contentful data for Android over SQLite.
https://contentful.github.io/vault/
Apache License 2.0
85 stars 19 forks source link

Environments #151

Closed anthony-seventhbeam closed 5 years ago

anthony-seventhbeam commented 5 years ago

Trying to sync and am getting an IllegalStateException, "Cannot call 'sync' on non master environments!". We've configured web, ios, for staging and I'm tying to set up the android client. How do support staging? The preview api isn't supported (due to the sync api inability to sync preview items), and vault doesn't support staging environments. It there a way around this without duplicating everything?

mariobodemann commented 5 years ago

Hello,

Indeed there is a way: the newest version (#v3.2.1) does include the newest CDA SDK, which supports environments.

You'd need to create a CDAClient using the environment and provide it to the SyncConfig once you call vault.sync(syncConfig);.

This way you are able to sync on a different environment.

mariobodemann commented 5 years ago

< closing this issue due to inactivity >