Primary key property 'name' does not exist on object 'RealmSwiftPermissionRole'

前端 未结 4 1107
一个人的身影
一个人的身影 2021-01-31 08:20

I\'m using RealmSwift as a database in my swift project. Today, after opening my project in Xcode-beta version 11, my app crash with this error:

Terminati

4条回答
  •  难免孤独
    2021-01-31 08:57

    There's an issue with iOS 13 and Xcode 11 which may cause this problem. All String properties of Realm classes with a default String value set are disregarded somehow. You can fix this by updating to the latest version (currently 3.20.0) and then on Xcode: Product -> Clean Build Folder.

    If you're using cocoa-pods:

    Open your project's Podfile, and replace RealmSwift line with:

    pod 'RealmSwift', '~> 4.4.1'
    

    Then, open terminal on the project's folder and:

    pod repo update
    pod install
    

    Hope that helps.

提交回复
热议问题