발생
새로 앱을 실행시키거나 모델 업데이트 시 Realm version 에러가 발생했다.
이유
에러 발생 이유로는 schema version 설정 전에 Object에 접근해서 빌드 시 에러가 발생되었다.
해결
앱 실행 후 처음 접근 전에 Realm을 configuration을 하면 해결 되었다.
저는 RealmDB객체를 init에서 선언해주어 생성과 동시에 configuratuion 해주었다.
let config = Realm.Configuration(
schemaVersion: 1,
migrationBlock: { migration, oldSchemaVersion in
if (oldSchemaVersion < 1) {
}
})
Realm.Configuration.defaultConfiguration = config
'iOS > 트러블 슈팅' 카테고리의 다른 글
Error: "Swinject: Resolution failed. Expected registration" (0) | 2023.08.17 |
---|---|
"One or more media items failed..." 오류 (0) | 2023.07.31 |
코드베이스 UI 사전 준비 (0) | 2023.04.20 |
TableView, CollectionView Cell클릭 흔적 없애는 방법 (0) | 2023.04.18 |
Custom Font 적용 에러 (0) | 2023.04.07 |