Realm 사용하기

설치

  • Podfile에 pod 'RealmSwift' 추가
// PodFile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'LetsBake' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
        pod 'RealmSwift'
  # Pods for LetsBake
end
  • pod install 명령어로 설치

사용

Error

라이브러리 설치 후 커밋+푸시 처리 했더니 파일 용량 관련 에러가 났다. (https://github.com/realm/realm-swift/issues/7157)

git lfs로 해결 하는 것을 추천하고 있어서 설치하고 문제가 되는 파일을 lfs 관리 목록에 추가해도 계속 안됐는데 알고보니 이전에 커밋한 것들이 남아있으면 계속 안되는 거였음…

해당 문제 발생 이전으로 커밋을 되돌린 이후에 다시 시도하니 성공했다.