0

I have an iOS and macOS app which use the same data models. I have a realm object server set up on digital ocean.

I have followed the ToDo demo tutorials and everything works well. I can see where the iOS app finds the local object server in the setupRealm function, but I can't see how the mac app accesses the local server. Also, I can't see the configureRealm function in the mac app.

My objective is to get the realm configured on the remote object server from my mac app, the access it from the iOS app.

Although the demos and tutorials are very helpful, they contain so much of the code to setup the UI that the basic code that configures the realm and then accesses it, gets lost. For people like me who are just learning, it would be great to have bare bones configuration and setup code explained. For example: In the appDelegate configure the realm with this code... and in a logIn class create a setupRealm function like this...

Maybe it's already there and I just can't see it.

I realize this is probably tedious for you, but it would really help those of us who are learning. Thanks.

K. Law
  • 2,541
  • 3
  • 18
  • 27

1 Answers1

0

The configureDefaultRealm function is shared between the iOS and macOS apps. In general, setting up Realm should be roughly identical for iOS and macOS, so a lot of the functionality can be shared between your apps. The docs take a more of a walkthrough approach, so feel free to check those.

Nikola Irinchev
  • 1,911
  • 1
  • 13
  • 17
  • I have checked out the docs. While they give useful information and code snippets, the context is missing. Looking at the code in the Demo apps provides some context but here is so much app-specific code that the basics are obscured. – K. Law Jul 12 '17 at 13:47