swift - Realm crashing sometimes on initialization -
i received reports app-store realm crashes on initialization, without details. hope (from realm team?) can see problem.
here how create instance:
func loadrealm() -> realm { if let realm = self.realm { return realm } if let _ = nsclassfromstring("xctest"){ realm = try! realm(configuration: realm.configuration(fileurl: nil, inmemoryidentifier: "test", syncconfiguration: nil, encryptionkey: nil, readonly: false, schemaversion: currentschemaversion, migrationblock: nil, deleterealmifmigrationneeded: true, objecttypes: nil)) } else { realm = try! realm(configuration: realm.configuration(encryptionkey: nil, readonly: false, schemaversion: currentschemaversion, migrationblock: nil, deleterealmifmigrationneeded: true, objecttypes: nil)) } return realm! } it happpens in line executed when not test. error "swift_unexpectederror".
Comments
Post a Comment