Kakao login, google_sign_in_ios 라이브러리 사용
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In snapshot (Podfile.lock):
GTMSessionFetcher/Core (< 5.0, = 4.1.0, >= 3.4)
In Podfile:
google_sign_in_ios (from .symlinks/plugins/google_sign_in_ios/darwin) was resolved to 0.0.1, which depends on
GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
GTMSessionFetcher/Core (~> 3.3)
You have either:
* out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
* changed the constraints of dependency GTMSessionFetcher/Core inside your development pod google_sign_in_ios.
You should run pod update GTMSessionFetcher/Core to apply changes you've made.
이 오류는 GTMSessionFetcher/Core 의존성 버전 충돌로 인해 발생한 문제입니다. google_sign_in_ios와 firebase 라이브러리 간의 버전 불일치가 원인입니다.
이를 해결하려면 의존성 업데이트를 통해 충돌을 해결해야 합니다.
먼저 CocoaPods의 로컬 리포지토리를 업데이트하여 최신 버전을 받아오도록 합니다.
pod repo update
혹은 --repo-update 플래그를 사용하여 pod install을 실행해도 됩니다.
pod install --repo-update
이 명령어는 의존성 리포지토리를 업데이트하고, 필요한 의존성을 다시 해결합니다.
오류 메시지에서 제안하는 대로 GTMSessionFetcher/Core 의존성을 수동으로 업데이트할 수 있습니다.
pod update 명령어를 사용하여 해당 의존성을 최신 버전으로 업데이트합니다.
pod update GTMSessionFetcher/Core
GTMSessionFetcher/Core만 최신 버전으로 업데이트하고, 다른 의존성은 변경하지 않습니다.
Podfile에서 의존성 버전을 명시적으로 설정할 수도 있습니다.
GTMSessionFetcher의 버전을 4.1.0으로 설정하려면,
Podfile에 아래와 같이 추가할 수 있습니다.
pod 'GTMSessionFetcher', '~> 4.1.0'
그 후, pod install을 다시 실행합니다.
pod install
위의 방법으로 문제가 해결되지 않으면,
Flutter의 캐시를 정리하고 의존성을 다시 설치한 후 빌드를 시도합니다.
flutter clean
flutter pub get
flutter run
Xcode에서 의존성 문제가 해결되지 않으면,
Xcode의 Pods 프로젝트에서 수동으로 GTMSessionFetcher 라이브러리의 버전을 변경하거나 업데이트할 수도 있습니다.
그러나 이 방법은 수동으로 의존성 파일을 수정하는 작업이므로, 위의 방법들을 우선 시도하는 것이 좋습니다.
이러한 방법을 통해 GTMSessionFetcher/Core 의존성 충돌 문제를 해결할 수 있습니다.
% cd ios
% pod init
[!] Existing Podfile found in directory
% pod update GTMSessionFetcher/Core
Error: The plugin "cloud_firestore" requires a higher minimum iOS deployment version than your application is targeting.
To build, increase your application's deployment target to at least 13.0 as described at https://flutter.dev/to/ios-deploy
Error running pod install
Error launching application on iPhone 15.
이 오류는 cloud_firestore 플러그인이 현재 프로젝트의 iOS 최소 배포(target) 버전보다 높은 버전을 요구하기 때문에 발생합니다.
해결하려면 iOS 프로젝트의 최소 배포 버전을 13.0 이상으로 설정해야 합니다.
platform :ios, '13.0'
cd ios
pod install
Flutter 설정 변경하기
ios/Flutter/AppFrameworkInfo.plist 파일에서
MinimumOSVersion 값을 13.0 이상으로 설정
캐시 정리 후 다시 실행
flutter clean
flutter pub get
cd ios
pod install
cd ..
flutter run
아래 명령어를 실행하여 Pod 저장소를 최신 상태로 업데이트한 후 다시 설치해 보세요.
pod repo update
pod install --repo-update
위 방법으로 해결되지 않는다면 CocoaPods 캐시를 삭제하고 다시 설치하는 방법을 시도할 수 있습니다.
rm -rf ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod cache clean --all
pod repo update
pod install --repo-update
Flutter 및 Firebase 관련 패키지를 최신 버전으로 업데이트하고 다시 시도합니다.
flutter clean
flutter pub upgrade --major-versions
cd ios
pod install --repo-update
이 과정을 거친 후 flutter run을 실행하면 정상적으로 빌드됩니다 🚀
이 오류는 gRPC 관련 파일(absl/status/status.h)을 찾을 수 없기 때문에 발생합니다. 주로 CocoaPods 의존성이 깨졌거나 pod install이 제대로 적용되지 않은 경우에 나타납니다.
cd ios
rm -rf Pods Podfile.lock
pod install --repo-update
cd ..
flutter clean
flutter pub get
flutter run
위 방법으로 해결되지 않으면 CocoaPods 및 gRPC 관련 캐시를 강제로 삭제 후 재설치합니다.
rm -rf ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ios/Pods
rm -rf ios/.symlinks
rm -rf ios/Flutter/Flutter.framework
rm -rf ios/Flutter/Flutter.podspec
cd ios
pod deintegrate
pod setup
pod install --repo-update
cd ..
flutter clean
flutter pub get
flutter run
위 방법이 모두 실패하면, Xcode를 열어 직접 빌드해보세요.