I'd like to use AWS AppSync for mobile development (Android/iOS) but I’m not sure about its offline capabilities.
According to the documentation the data will be accessible while being offline and synced automatically if the client gets online again. But I can't find any information about if the app client needs to connect to AWS first, before using AppSync to create and modify offline data.
I'm not familiar with the underlying technologies of AppSync (e.g. GraphQL) and I don't have access to the public preview version to test it myself.
I would like to enable privacy-sensitive users to use an app without connecting to AWS while still being able to use AppSync as an offline database. Only if a user later decides to use backup/sync data across devices he or she can opt-in to connect to AWS.
Will this use case be possible with AWS AppSync?
Without using any other local storage (like SharedPreferences, SQLite, Realm, etc.)
you can read https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-reactnative.html
AWS AppSync support offline mode and you can use data base for your app
It should be possible with Firestore, AWS AppSync or your own Backend solution. Any approach you use, you will control when you want to start saving/syncing things online.
You need to handle all this while designing this app. Suggested approach
Let's take example of simple ToDo app
I will let User add & save Todos in app
All this data will be persisted on disk(using SQLLITE, Preferences or File etc.)
Example implementation using Android Shared preference as local storage
Use Realm Database to manage all offline and online data and save if the application uninstall