Realm iOS Tutorial, 'Build iOS app from scratch'


I’ve followed the ‘Build iOS app from scratch’ tutorial on the realm website step by step and watched the video. Everything appears to be in order. Unfortunately the tutorial does not include the full source code for reference.

When I run the project it connects to the ROS and creates the realm without a problem. I can see this in the realm browser and through a web browser.

However, I get the following in the Xcode console and the app does not work.

realmTask[1000:40858] Sync: Connection[1]: Connected to endpoint ‘’
realmTask[1000:40858] Sync: Connection[1]: Writing failed: End of input
realmTask[1000:40858] Sync: Connection[1]: Connection closed due to error

The app does not crash, the error repeats over and over, and the app won’t do anything.

Here is my setup code.

func setupRealm() {
// Log in existing user with username and password
let username = "abcdefg"  
let password = "1234"  

SyncUser.logIn(with: .usernamePassword(username: username, password: password, register: false), server: URL(string: "")!) { user, error in
    guard let user = user else {
        fatalError(String(describing: error))

    DispatchQueue.main.async {
        // Open Realm
        let configuration = Realm.Configuration(
            syncConfiguration: SyncConfiguration(user: user, realmURL: URL(string: "realm://")!)
        self.realm = try! Realm(configuration: configuration)

        // Show initial tasks
        func updateList() {
            if self.items.realm == nil, let list = self.realm.objects(TaskList.self).first {
                self.items = list.items

        // Notify us when Realm changes
        self.notificationToken = self.realm.observe { _,_ in

deinit {


Just wondering why no one replied :frowning:


ROS no longer supported.


Well, ROS is still referred to in the (laggy) documentation Realm Platform but its currently Realm Cloud for readers future reference if you are looking for a online real-time database.