Realm 연동하기
1. 터미널 프로젝트 경로로 이동
cd "프로젝트 경로"
2. CocoaPod 설치하기
sudo gem install cocoapods
3. Podfile 생성
pod init
4. Podfile 수정 (RealmSwift 추가) - nano 에디터 사용
sudo nano Podfile
4-1. Podfile에 pod 'RealmSwift'
내용 입력
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectManager' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'RealmSwift'
# Pods for ProjectManager
end
위와 같이 내용 추가 후 아래 명령어 차례대로 입력 (nano 에디터 명령어)
ctrl + o
(저장)ctrl + x
(나가기)
5. 추가한 모듈 설치 명령어 실행
pod install
'iOS > Swift' 카테고리의 다른 글
Swift) 옵저버 프로퍼티를 이용한 데이터 바인딩 (0) | 2022.10.18 |
---|---|
Swift) Delegate, Notification 둘 중 어느 것을 사용해야 할까 (0) | 2022.10.12 |
Swift) SwiftLint 적용 (0) | 2022.09.10 |
Swift) DatePicker (0) | 2022.09.10 |
Swift) TableView Swipe (0) | 2022.08.20 |