Hello @lo0olo0o2412_N_A,
I acknowledge the age of the question and I hope you were able to find a solution to this.
but I did not get in how to implement both of them at the same time or use temp database
For others, trying to implement similar functionality, the recommended approach is to define synced (using SyncConfiguration) and local realm (using Configuration) separately using respective APIs.
The detailed information can be found in the following posts
- Open synced local database when completely offline - #4 by Sujeevan_Kuganesan
- Local Realm open after synchronized on realm cloud - #22 by nirinchev
I read also how to “Convert a Local Realm to a Synced Realm
This is in reference to Realm Cloud Legacy which has approached EOL on Nov 1, 2021.
For MongoDB Realm, please refer Add Sync to a local-only App section in the MongoDB Realm docs