You need to have Xcode version 8 installed. Other versions of Xcode cannot be used.

Building the RealmTasks iOS Application

RealmTasks for iOS

You need to have Xcode version 8 installed. Other versions of Xcode cannot be used.

Inside the same folder from which you launched the macOS version of the RealmTasks app, there are the files needed to build and run an iOS version. We are going to build and run this application on the iOS simulator that is part of Xcode.

Open RealmTasks.xcworkspace, which is right near the RealmTasks app you launched in the Getting Started section.

Build the App

Once Xcode launches, you can simply press the build/run arrow in the Xcode toolbar. This will build and run the “RealmTasks iOS” app in the iOS simulator.

Note: If you get any errors, for example, “Module ‘Cartography’ not found”, you have probably opened the Xcode project file instead of the workspace file; simply close the Xcode window and make sure you open RealmTasks.xcworkspace file.

Login to the App

Once the app launches, you can log in to the app using the same username and password you created when your launched RealmTasks for macOS. Instantly after you log in, the iOS app on the simulator will synchronize itself with the Realm Object Server and all of the tasks you entered in the macOS version will show up in the iOS version.

You can enter new tasks using the mouse by clicking on the iOS simulator and slowly dragging downward until a new Task list entry appears. Any entries you create will be instantly synchronized by the Realm Object Server and appear on the macOS version and vice-versa. Swiping left or right on items in the Task List in the iOS app will delete or mark items as “done.” Here too, these changes will be immediately reflected in the other version of the application.

Observing Realm Changes in the Realm Browser

As you are adding/editing/deleting items in the macOS or iOS versions of the app, you can also see these changes reflected in realtime in the Realm Browser as well. These changes reflect the state of the shared Realm itself, and you can dig deeper looking into the various schema that make up the RealmTasks data as well. Try adding/editing tasks in the browser and see what happens on both of the clients!

What’s Next?

Ready to build your own app from scratch? Follow our tutorial to create a brand new app with Realm Object Server:

Build a sample app