Building a Mobile Chat App Using Realm – Integrating with Realm

I’ve just completed an article on how to integrate Realm and Realm Sync into an iOS chat app. It was timed to coincide with the GA of MongoDB Realm Sync.
Realm is used for both persisting data on the iOS device and synchronizing the data between instances of the mobile app.
The app is currently iOS-only (using SwiftUI), but we plan on building an Android version soon. One of the nice things about Realm Sync is that there’s no extra work needed to map between operating systems and languages when syncing data between iOS and Android.
That data is also synced to MongoDB Atlas and so can be accessed from web or other kinds of apps too.
The data stored and synced covers everything in the app:
  • User profile
  • User presence
  • Lists of chatrooms and members
  • The messages themselves
You can download all of the code from the GitHub repo.
Checkout Building a Mobile Chat App Using Realm – Integrating Realm into Your App for all of the details.
Also, if you want to learn more about how the app was built and ask some questions then I’ll be speaking at a virtual meetup on 17th Feb.




Leave a Reply