개발/Flutter
플러터에서 CocoaPods 라이브러리 최신화하기
leedonggeun
2023. 12. 13. 10:05
플러터로 개발을 하다보면 firebase와 같은 패키지가 업데이트가 자주 됩니다.
이럴 땐 CocoaPods 라이브러리를 최신화해줘야합니다.
1. CocoaPods 삭제하기
# ios 디렉토리로 이동 후 Podfile.lock 삭제
cd {projectRootDir}/ios
rm -f Podfile.lock
# CocoaPods 의존성 삭제하기
pod deintegrate
# CocoaPods 캐시 삭제하기
pod cache clean --all
2. CocoaPods 설치하기
pod install 명령어를 입력하면, 아래와 같이 라이브러리가 다시 설치되는 것을 볼 수 있습니다.
# CocoaPods 라이브러리 설치
# --repo-update 옵션은 pod install 전에 pod repo update를 사전에 수행하도록 하는 명령어
pod install --repo-update
Analyzing dependencies
firebase_core: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.18.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (10.18.0)
Installing FirebaseCore (10.18.0)
Installing FirebaseCoreInternal (10.18.0)
Installing FirebaseInstallations (10.18.0)
Installing FirebaseMessaging (10.18.0)
Installing Flutter (1.0.0)
Installing GoogleDataTransport (9.2.5)