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

前端 未结 4 1100
一个人的身影
一个人的身影 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:59

    Developers of Realm have started working on Xcode 11 compatibility. From that page...

    Using Realm with Xcode betas requires building from source, and typically will require using dev branches rather than releases.

    Carthage

    github "realm/realm-cocoa" "tg/xcode-11-b1"

    DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer carthage bootstrap -no-use-binaries

    CocoaPods

    pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'tg/xcode-11-b1', submodules: true

    pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'tg/xcode-11-b1', submodules: true

    Explicitly including the Realm pod as a dependency is required as otherwise it'll try to use the latest release of the obj-c part.

    Note that last sentence. You must include the Realm pod as a dependency or it'll use the non-beta version and it won't work.

提交回复
热议问题