I have experienced the same issue on my first try with Realm.io. The reason for the error was that I have named my target Realm
and that caused namespace clashing. The issue was resolved after I have changed my project and target name into something else, as explained on this issue.
My suggestion is to check for similar namespace clashes.