728x90
반응형
상황
- M1에서 플루터로 개발된 앱을 iOS로 빌드하는데, cocoaPods 관련 오류가 발생했다.
#iOS 빌드
@Macmini flutter-app % flutter build ipa --release --obfuscate --split-debug-info build/app/outputs/symbols
[!] CocoaPods could not find compatible versions for pod "Firebase/Messaging":
In snapshot (Podfile.lock):
Firebase/Messaging (= 9.3.0)
In Podfile:
firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) was resolved to 14.2.1, which depends on
Firebase/Messaging (= 10.3.0)
You have either:
* changed the constraints of dependency `Firebase/Messaging` inside your development pod `firebase_messaging`.
You should run `pod update Firebase/Messaging` to apply changes you've made.
처리방법
case 1. gem, pod 설치
- M1에서 터미널열고 아래와 같이 gem, pod를 인스톨해준다.
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
- gem, pod 설치로 오류가 해결이 안되면 case 2로..
case 2. Podfile.lock 파일 삭제
- Podfile.lock 파일을 지우라는데 진짜 한참 찾았는데, xcode에서 Pods 밑에 Podfile에서 마우스 오른쪽 버튼을 눌러 Show in Finder을 선택해준다.
- 짜란..Podfile.lock 파일이 있다..삭제해주자.
확인
- 이번 오류는 Podfile.lock 파일을 삭제하고 나서야 실행이 됐다.
- Pod install 할때도 오류가 났었는데 Podfile.lock 파일을 삭제하고 나니 Pod install도 잘된다.
@Macmini ios % arch -x86_64 pod install --repo-update
Updating local specs repositories
Analyzing dependencies
firebase_core: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (10.3.0)
Installing FirebaseCore (10.3.0)
Installing FirebaseCoreInternal (10.4.0)
Installing FirebaseInstallations (10.4.0)
Installing FirebaseMessaging (10.3.0)
Installing Flutter (1.0.0)
Installing GoogleDataTransport (9.2.1)
Installing GoogleUtilities (7.11.0)
Installing MTBBarcodeScanner (5.0.11)
Installing PromisesObjC (2.1.1)
Installing ReachabilitySwift (5.0.0)
Installing app_settings (3.0.0+1)
Installing connectivity_plus (0.0.1)
Installing device_info_plus (0.0.1)
Installing firebase_core (2.4.1)
Installing firebase_messaging (14.2.1)
Installing flutter_local_notifications (0.0.1)
Installing local_auth_ios (0.0.1)
Installing nanopb (2.30909.0)
Installing permission_handler_apple (9.0.4)
Installing qr_code_scanner (0.2.0)
Installing shared_preferences_foundation (0.0.1)
Installing webview_flutter_wkwebview (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 12 dependencies from the Podfile and 23 total pods installed.
- iOS 빌드 도 잘된다.
@Macmini flutter-app % flutter build ipa --release --obfuscate --split-debug-info build/app/outputs/symbols
💪 Building with sound null safety 💪
Archiving ...
Automatically signing iOS for device deployment using specified development team in Xcode project: CXJHUYBD
Running pod install... 1,466ms
Running Xcode build...
└─Compiling, linking and signing... 8.5s
Xcode archive done. 117.8s
Built /Users/yourusername/StudioProjects/flutter-app/build/ios/archive/Runner.xcarchive.
Building App Store IPA... ⣻
728x90
반응형