Own server + Realm products



Hi, I have released the iOS app(Swift) using Realm Database a year ago and currently trying to add a subscription (auto-renewal) to my app. The implement on the client-side is almost done but developing receipt validation on the server-side still remains. *FYI: I have never created/used a server for this app so it works locally so far.

The question is that in case I create/use an API with my own server(maybe RubyOnRails or server-side swift) for that receipt validation, should I use Realm Cloud or other Realm products? The server-side get a User object(defined by realm database) from the client-side for a receipt validation logic.

I was thinking about using Realm Cloud for the backup feature in a future update. But introducing own server to my app means Realm Cloud is not needed? (because of database duplication). Or Realm Products can be used for a database on the server-side(e.g. RubyOnRails or server-side swift) and sync with a client-side realm database? There is the way to work best with Realm products and my own server in this case?

Any advice and suggestions will be greatly appreciated.


Receipt validation and backups are two entirely different things. It is a lot of effort to build a good backup solution, I know as I have tried and failed to do so myself. Realm Cloud will get you backups/cloud sync with essentially no effort. I’d use Realm Cloud for backups for sure.

For the receipt validation of course you need your own server.


Thanks for the answer!

Like you said, receipt validation and backups, they’re different things. But for the sake of validating a receipt safety, I figured out I need to create a database and store user_id and transaction_id etc into it.

So I thought if I use Realm Object Server/Database via Realm Cloud and also create own database in a server-side, it will cause a problem like an unnecessary duplicated database. (e.g. two same user tables, one from Realm Object Server, another from own server-side database. )

To prevent this, I was wondering that directly reading Realm Object Server data using Graph QL from self-created server-API. https://docs.realm.io/platform/graphql-web-access. I might be over-thinking this problem though : (


There is absolutely no reason you shouldn’t use Realm Cloud just because you validate your receipts using your own API. For validating receipts you will need your own server. How you decide to store your subscription data is up to you. I’d store them in a separate realm and only allow you server to write to that realm.

I think you will have to get familiar with Realm Cloud to be able to decide on your architecture. So my suggestion would be to just to try it out and evaluate.


Thanks for your quick reply! It helped me a lot to decide what to do for my architecture.
I’m gonna try and be used to it :realm: