본문 바로가기
Mobile APP/Flutter

[Flutter] M1 pod install 'CocoaPods could not find compatible versions for pod "FBAudienceNetwork"' 해결

by 흐암졸령 2023. 1. 28.
반응형

문제 상황

flutter 를 3.7 으로 업데이트를 하고 ios 에서 빌드를 하려고 하니 pod install 에서 에러가 생겼다는 메세지가 나왔다. 그래서 ios 폴더에 들어가 직접 pod install / update 를 하니 다음과 같은 오류가 나왔다.

[!] CocoaPods could not find compatible versions for pod "FBAudienceNetwork":
  In snapshot (Podfile.lock):
    FBAudienceNetwork (= 6.9.0, ~> 6.9.0)

  In Podfile:
    facebook_app_events (from `.symlinks/plugins/facebook_app_events/ios`) was resolved to 0.0.1, which depends on
      FBAudienceNetwork (~> 6.12)


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 `FBAudienceNetwork` inside your development pod `facebook_app_events`.
   You should run `pod update FBAudienceNetwork` to apply changes you've made.

CocoaPods 에서 문제가 생겨서 ios/Podfile 을 수정하고 그랬었는데 근본적인 문제는 다른 곳에 있었다.

 

해결 방법

 flutter 3.7 버전으로 업데이트가 되면서 작동을 안 해서 pod install 혹은 pod update 를 한다는 것은 맞았다. 그러나 m1 에서는 커맨드를 다르게 해야한다. "arch -x86_64" 을 앞에 붙여서

arch -x86_64 pod update

라는 명령어를 해야 작동한다. 해당 명령어를 입력하면 오류 없이 다음과 같이 잘 작동한다.

 

Update all pods
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_remote_config: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
Downloading dependencies
Installing AppAuth (1.6.0)
Installing AppsFlyerFramework (6.9.1)
Installing BoringSSL-GRPC (0.0.24)
Installing FBAEMKit (15.1.0)
Installing FBAudienceNetwork (6.12.0)
Installing FBSDKCoreKit (15.1.0)
Installing FBSDKCoreKit_Basics (15.1.0)
Installing FMDB (2.7.5)
Installing Firebase (9.6.0)
Installing FirebaseABTesting (9.6.0)
Installing FirebaseAnalytics (9.6.0)
Installing FirebaseAppCheckInterop (9.6.0)
Installing FirebaseAuth (9.6.0)
Installing FirebaseAuthInterop (9.6.0)
Installing FirebaseCore (9.6.0)
Installing FirebaseCoreDiagnostics (9.6.0)
Installing FirebaseCoreExtension (9.6.0)
Installing FirebaseCoreInternal (9.6.0)
Installing FirebaseCrashlytics (9.6.0)
Installing FirebaseFirestore (9.6.0)
Installing FirebaseInstallations (9.6.0)
Installing FirebaseMessaging (9.6.0)
Installing FirebasePerformance (9.6.0)
Installing FirebaseRemoteConfig (9.6.0)
Installing FirebaseStorage (9.6.0)
Installing FirebaseStorageInternal (9.6.0)
Installing Flutter (1.0.0)
Installing GTMAppAuth (1.3.1)
Installing GTMSessionFetcher (2.3.0)
Installing GoogleAppMeasurement (9.6.0)
Installing GoogleDataTransport (9.2.1)
Installing GoogleSignIn (6.2.4)
Installing GoogleUtilities (7.11.0)
Installing Libuv-gRPC (0.0.10)
Installing PromisesObjC (2.1.1)
Installing ReachabilitySwift (5.0.0)
Installing abseil (1.20211102.0)
Installing appsflyer_sdk (6.8.0)
Installing cloud_firestore (3.5.1)
Installing connectivity_plus (0.0.1)
Installing device_info_plus (0.0.1)
Installing facebook_app_events (0.0.1)
Installing firebase_analytics (9.3.8)
Installing firebase_auth (3.11.2)
Installing firebase_core (1.24.0)
Installing firebase_crashlytics (2.9.0)
Installing firebase_messaging (13.1.0)
Installing firebase_performance (0.8.3-3)
Installing firebase_remote_config (2.0.20)
Installing firebase_storage (10.3.11)
Installing flutter_app_badger (1.3.0)
Installing flutter_local_notifications (0.0.1)
Installing flutter_native_timezone (0.0.1)
Installing flutter_secure_storage (6.0.0)
Installing gRPC-C++ (1.44.0)
Installing gRPC-Core (1.44.0)
Installing google_sign_in_ios (0.0.1)
Installing in_app_purchase_storekit (0.0.1)
Installing in_app_review (0.2.0)
Installing kakao_flutter_sdk_common (1.4.0)
Installing leveldb-library (1.22.1)
Installing nanopb (2.30909.0)
Installing package_info_plus (0.4.5)
Installing path_provider_foundation (0.0.1)
Installing shared_preferences_foundation (0.0.1)
Installing sign_in_with_apple (0.0.1)
Installing sqflite (0.0.2)
Installing url_launcher_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 28 dependencies from the Podfile and 68 total pods installed.

 

 

Reference

 

Flutter IOS 빌드 에러 Exception: Error running pod install

Launching lib/main.dart on simon의 iPad in debug mode... lib/main.dart Automatically signing iOS for device deployment using specified development team in Xcode project: 4B7YLKL5S2 CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets

dev-in-gym.tistory.com

 

CocoaPods Fails On Apple Silicon | Apple Developer Forums

ReInstall Cocoapods from Homebrew (https://formulae.brew.sh/formula/cocoapods#default) : brew install cocoapods You may need to reinstall Homebrew first /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" this is

developer.apple.com

 

반응형

댓글