본문 바로가기
IOS (Swift, Objective-c)

[IOS] Realm Browser 설치 및 사용. Obj-C, Swift (오류 시 대안)

by bryan.oh 2022. 8. 16.
반응형

Realm Browser

 

아래 AppStore 에서 다운로드 합니다.

https://apps.apple.com/kr/app/realm-browser/id1007457278?mt=12 

 

‎Realm Browser

‎Realm Browser is a viewer and editor for .realm data store files. It allows developers implementing Realm in their apps to easily view and debug the contents of the .realm files their apps have created. Features: - View all of the objects in a .realm fi

apps.apple.com

 

 

"열기"를 누르면

요런 다이알로그가 나오는데요.

일단 Realm Browser 는 여기까지 해두고,

 

Simulator 의 데이터 확인하기

// Objective-C
NSLog(@"path= %@", RLMRealmConfiguration.defaultConfiguration.fileURL);
// Swift
print("path= \(Realm.Configuration.defaultConfiguration.fileURL!)");

로그를 찍으면 대략 아래와 같이 realm 경로가 나옵니다.

이 파일을 Realm Browser 에서 열면 됩니다.

 

Device 의 데이터 확인하기

xcode 에서 상단의 Window -> Devices and Simulators 로 갑니다.

 

Device -> [내 App 선택] -> 더보기 -> Download Container... 클릭

폴더 위치를 지정하고 저장을 누르면, 파일이 저장됩니다.

 

Finder 에서 다운로드 된 파일은 {packageName...xcappdata} 와 같은 형식입니다.

Finder 에서 파일을 찾고, 우클릭 -> "패키지 내용 보기" 를 선택합니다.

AppData/Documents/default.realm 파일을 더블클릭해서 Realm Browser 에서 볼수 있도록 합니다.

 

만약 폰에서 데이터가 변경되었다면, Download Container 부터 다시 해야합니다 

 

- 끝 - 

 

혹시

아래와 같은 오류가 발생한 경우에 Realm Studio 를 설치합니다.

자세한 방법은 아래에..

https://hello-bryan.tistory.com/436

 

[IOS] Realm Studio 설치하기

Realm Studio 설치하기 아래 링크에서 버전을 확인하고 다운로드 받습니다. https://github.com/realm/realm-studio/releases Releases · realm/realm-studio Realm Studio. Contribute to realm/realm-studio..

hello-bryan.tistory.com

 

728x90
반응형

댓글