Closed zeeshanz closed 4 years ago
@zeeshanz Thanks for noting this! I've fixed the docs and will check the compile error.
@zeeshanz I was able to compile and run from a fresh clone with the instructions in the readme.
Which package manager are you using? Could you share the error you are receiving when you build?
Thanks @ericjordanmossman for fixing the link.
I am using CocoaPods.
I just cloned it once again, compiled fine. I must have done something wrong the first time.
However trying to log in as a new user fails in the initializePermissions(user)
. I have figured out that I can make the user an Administrator by changing line 92 to let creds = SyncCredentials.nickname(textField.text!, isAdmin: true)
, login again with this admin user so that Realm is created, and then set it back to regular user, then the app works fine for subsequent users. However this doesn't reflect in the tutorial or the Readme file.
Ah, I see. I think I know what's happened.
The initializePermissions method requires a realm to have been created with the schema properties that are being modified.
If you're using realm studio then you can create a realm at the path /default
(or delete it then recreate) and upgrade it to a reference realm. This solved the issue for me immediately.
Though, of course I'm going to make this clear in the readME and other resources. I suspect this error flew under for a bit because the realm and schema will be created beforehand as part of the tutorial walkthrough.
I figured this out while doing my learning. But for a started its a very frustrating roadblock. The Android version of the same app worked fine though and I didn't have any problems there.
Thanks for the feedback. We'll make the appropriate changes.
@ericjordanmossman Was this fixed?
Built & ran from scratch. Seems to be resolved.
On this Docs page:
https://docs.realm.io/sync/getting-started-1/ios-quick-start/step-2-adding-query-based-sync
The gitHub link is broken.
I managed to find the sample app code, but it doesn't compile.