How I Encounter This Issue
I cloned a project from GitHub and tried to run it on my laptop. When I was about to run the app on the iOS Simulator, I encountered the error message below.
Error Message
Launching lib/main.dart on iPhone 13 Pro in debug mode... CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Using `ARCHS` setting to build architectures of target `Pods-RunnerTests`: (``) Fetching external sources -> Fetching podspec for `Flutter` from `Flutter` -> Fetching podspec for `app_links` from `.symlinks/plugins/app_links/ios` -> Fetching podspec for `desktop_webview_auth` from `.symlinks/plugins/desktop_webview_auth/ios` -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios` firebase_auth: Using Firebase SDK version '11.10.0' defined in 'firebase_core' -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios` firebase_core: Using Firebase SDK version '11.10.0' defined in 'firebase_core' -> Fetching podspec for `firebase_dynamic_links` from `.symlinks/plugins/firebase_dynamic_links/ios` firebase_dynamic_links: Using Firebase SDK version '11.10.0' defined in 'firebase_core' -> Fetching podspec for `google_sign_in_ios` from `.symlinks/plugins/google_sign_in_ios/darwin` -> Fetching podspec for `path_provider_foundation` from `.symlinks/plugins/path_provider_foundation/darwin` -> Fetching podspec for `share_plus` from `.symlinks/plugins/share_plus/ios` -> Fetching podspec for `shared_preferences_foundation` from `.symlinks/plugins/shared_preferences_foundation/darwin` -> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios` Resolving dependencies of `Podfile` CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/0/3/5/Firebase/11.14.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update 2 CDN: trunk Relative path: Specs/0/3/5/Firebase/11.10.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_b_b_9.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/b/b/9/AppAuth/2.0.0/AppAuth.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_c_e_3.txt exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: Specs/c/e/3/GTMSessionFetcher/4.5.0/GTMSessionFetcher.podspec.json exists! Returning local because checking is only performed in repo update CDN: trunk Relative path: all_pods_versions_d_4_0.txt exists! Returning local because checking is only performed in repo update CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.0.0/GoogleSignIn.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.0.0/GoogleSignIn.podspec.json CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json CDN: trunk Relative path couldn't be downloaded: Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json Response: 404 CDN: trunk Relative path couldn't be downloaded: Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.0.0/GoogleSignIn.podspec.json Response: 404 CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json CDN: trunk Relative path couldn't be downloaded: Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json Response: 404 [!] No podspec exists at path `/Users/username/.cocoapods/repos/trunk/Specs/d/4/0/GoogleSignIn/8.1.0-vwg-eap-1.1.0/GoogleSignIn.podspec.json`. ... Error running pod install Error launching application on iPhone 13 Pro.
This usually happens when the CocoaPods cache is corrupted or the pod specifications are outdated.
Solution
Here are the steps that solved it for me.
Try them in order, and stop once your build works again.
- Clean CocoaPods cache and reinstall:
cd ios rm -rf Pods Podfile.lock pod cache clean --all pod repo update pod install
- If still failing, try deintegrating and reinstalling:
cd ios pod deintegrate pod install
- As a last resort, remove the entire CocoaPods cache:
rm -rf ~/.cocoapods/repos/trunk pod setup cd ios pod install