调用sharedSchema就崩溃,官方目前最新版本没修复,目前手动解决方案:配置的时候添加objectTypes
let config = Realm.Configuration(fileURL: URL(string: fileURL), schemaVersion: schemaVersion,migrationBlock: { (migration, oldSchemaVersion) in
if oldSchemaVersion < 1 {
//TODO
}
if migrationBlock != nil {
migrationBlock!(migration, oldSchemaVersion)
}
}, objectTypes: [GoodsItermModel_db.self])