Hi Ian, thank you for your response. Currently, I am trying to build a simple test app on a FREE tier Atlas server using Realm and sync. I have created several documents inside the realm that contain: _id, _partition, name, and phonenumber as a test. I have an object class in swift that initializes those same variables. In addition to this, I have set up a view controller with a tableview with the intention of listing those documents in the realm, by means of the name property on each cell.
I’m aware of the fact that the initializer ultimately causing the crash is not required by realm and instead required by UIKit. It has been somewhat difficult to debug the app when the fatal error is thrown almost immediately and prior to any view appearing on the iOS simulator screen. If I comment out any variables ( partitionValue, realm, as well as well as the Results object variable), and then remove both initializers, the app does not crash. In fact, the app successfully connects to the realm as evidenced by the Realm logs and the Xcode console, which shows the following:
2020-09-18 07:27:54.537156-0400 App[1379:41058] Sync: Connection: Session: client_reset_config = false, Realm exists = true, async open = false, client reset = false
2020-09-18 07:27:54.623370-0400 App[1379:41058] Sync: Connection: Connected to endpoint 'x.x.x.x:443' (from 'x.x.x.x:50530')
2020-09-18 07:27:55.067969-0400 App[1379:41058] Sync: Connection: Disconnected
This tells me that the Atlas service, along with the Realm, including user authentication and Sync, are set up correctly. It is at this point where a tableview successfully appears with hard coded data for the two required tableview delegate methods. numberOfRowsInSection has a return value of 1, and cellForRowAt displays “Test” as the cell’s label.
There’s no easy way for me to debug anything beyond this. Due to the UIKit initializer crashing the app prior to the view controller’s view appearing on the screen, I am unable to determine what exactly is causing the crash. Perhaps the object Results variable is empty and it is causing the crash, though my level of expertise can’t ascertain that.
At this point, I’m going to re-read the tutorial on MongoDB Realm’s website for the umph time hoping to catch something I may be missing. It would be great if I could find a tutorial online for a similar app using storyboard and simple features, just a simple tableview app being populated by just a simple property, so that I can build upon that.