You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pod setup does not work for Cocoapods 1.8.0 #41253
I was doing a fresh Flutter installation on a new Mac.
Following the instructions of Flutter doctor to install cocoapods with sudo gem install cocoapods, Cocoapods 1.8.0 was installed.
Then after running pod setup, nothing happened, and cocoapods was still not initialised.
The solution was to remove cocoapods with sudo gem uninstall cocoapods and then install Cocoapods 1.7.5 with sudo gem install cocoapods -v 1.7.5, then pod setup.
I know this is probably a Cocoapods issue, but the flutter doctor instructions need to change so new users can get Flutter to work without any trouble.
It looks like our initialization check is looking for the local repo, but 1.8.0 uses the CDN by default which doesn't require it, so it's likely that pod setup is no longer pulling it down.
We'll need to figure out how we want to handle this (assuming that is indeed what's going on). We should likely switch our Podspec template to use the CDN, but we'll need to see what is needed to handle projects with an existing Podspec (e.g., does Cocoapods now fetch it on demand when it encounters a Podspec using it?) and update the setup check accordingly, or we'll need to migrate existing Podspecs.
I'm also getting this issue with 1.8.1, I can also confirm installing cocoapods 1.7.5 fixes it. Make sure to uninstall previous versions or it won't work! :)
sudo gem uninstall cocoapods
If using brew, run this too: brew uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
flutter doctor -v
Maybe there should be a (temporary) note in the docs in the iOS setup while this is fixed.
Edit: version 1.8.1 is now working as expected so no need for this workaround, see #41491
Reacted by Pierre Saussure, Marcus Gallegos, Chakshu Gautam, Matthijs Mali, Peter Rallojay, Lucas Aschenbach, Alexander, Gabriel Ochsenhofer, Harun Bajrektarević, Resaldi Ramadhan Putra and 48 more
Reacted by Derek McAuley, Wu Peng, Cedric Tegenkamp and Amit Khetan
Reacted by Mohamed Mokhtar, Victor Aremu, Chris Risley, Erick Araújo, Sadaq Alex Anihouvi, uzmasayyed7, Pakinwet Saksamerprom, Pedro Bertucci, Victor Ramos, Andres Frank Alexis and 1 more
Reacted by xin2017, Victor Aremu, Chris Risley, Ankit Agarwal, Erick Araújo, Sadaq Alex Anihouvi, Victor Ramos and RAS-9
We'll need to figure out how we want to handle this (assuming that is indeed what's going on). We should likely switch our Podspec template to use the CDN, but we'll need to see what is needed to handle projects with an existing Podspec (e.g., does Cocoapods now fetch it on demand when it encounters a Podspec using it?) and update the setup check accordingly, or we'll need to migrate existing Podspecs.
It uses the CDN by default as of 1.8.0. What would need to be migrated in the Podfile (assuming you meant Podfile and not podspec)?
and assumed we had that in our Podfile. But I was just remembering seeing the commented-out CDN source line.
So does that mean all we need to do here is make 1.8 the minimum and remove the check that the local repo is checked out (and the corresponding instructions)?
So does that mean all we need to do here is make 1.8 the minimum and remove the check that the local repo is checked out (and the corresponding instructions)?
Check out #41491. I skipped the local check then the version is >= 1.8. I removed the pod setup instructions from the installer comment, but they will pod setup instructions if they run again with an installed, uninitialized version < 1.8.
I'm currently trying to install flutter on my macOS but I can't install the CocoaPods even with your advices and all things I could find on internet
As stated in #41253 (comment) you have to uninstall any previous version of cocoapods and install specific 1.7.5 version. You also ensure you didn't have any version installed through homebrew which could interfer with the gem one.
Folks, please avoid downgrading CocoaPods to work around a "flutter doctor" issue - CocoaPods 1.8+ usage of CDN is a fantastic feature and an outstanding performance optimization. Unless something is broken, try using the latest version (also, #41491 has the fix for Flutter).
Folks, please avoid downgrading CocoaPods to work around a "flutter doctor" issue - CocoaPods 1.8+ usage of CDN is a fantastic feature and an outstanding performance optimization. Unless something is broken, try using the latest version (also, #41491 has the fix for Flutter).
It's not just a flutter doctor issue, it's a flutter build/run issue. When the local repo isn't present pod installis skipped. 1eb1e22 is in v1.10.7, so once that hits stable the -v 1.7.5 instruction and note can be removed.
If people are feeling confident, another option is to run the devchannel for now, which has received the fix in #41491 mentioned by @davidair .
flutter channel dev
flutter upgrade
After I switch to dev branch, I got a lots of issues
so my suggestion is create fake folder under ~/.cocoapods/respos/master , it's fast and easy solution.
I'm also getting this issue with 1.8.1, I can also confirm installing cocoapods 1.7.5 fixes it. Make sure to uninstall previous versions or it won't work! :)
sudo gem uninstall cocoapods
If using brew, run this too: brew uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
flutter doctor -v
Maybe there should be a (temporary) note in the docs in the iOS setup while this is fixed.
Edit: version 1.8.1 is now working as expected so no need for this workaround, see #41491
Coming from linux, as per observation...
Do not use sudo to use flutter. latest version of cocoapods with CDN works fine. Thanks.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
stuartmorgan-g commentedon Sep 25, 2019
It looks like our initialization check is looking for the local repo, but 1.8.0 uses the CDN by default which doesn't require it, so it's likely that
pod setupis no longer pulling it down.We'll need to figure out how we want to handle this (assuming that is indeed what's going on). We should likely switch our Podspec template to use the CDN, but we'll need to see what is needed to handle projects with an existing Podspec (e.g., does Cocoapods now fetch it on demand when it encounters a Podspec using it?) and update the setup check accordingly, or we'll need to migrate existing Podspecs./cc @jmagman
blackholegalaxy commentedon Sep 27, 2019
Same here with 1.8.1.
pod setupdoes nothing. Rollbacking to 1.7.5 was a successful workaround.davidcavazos commentedon Sep 27, 2019
I'm also getting this issue with 1.8.1, I can also confirm installing cocoapods 1.7.5 fixes it. Make sure to uninstall previous versions or it won't work! :)
sudo gem uninstall cocoapodssudo gem install cocoapods -v 1.7.5pod setupflutter doctor -vMaybe there should be a (temporary) note in the docs in the iOS setup while this is fixed.
Edit: version 1.8.1 is now working as expected so no need for this workaround, see #41491
jmagman commentedon Sep 27, 2019
It uses the CDN by default as of 1.8.0. What would need to be migrated in the Podfile (assuming you meant Podfile and not podspec)?
jmagman commentedon Sep 27, 2019
flutter/website#3041
stuartmorgan-g commentedon Sep 27, 2019
Turns out nothing; I was thinking of the release notes mentioning changing the source:
and assumed we had that in our Podfile. But I was just remembering seeing the commented-out CDN source line.
So does that mean all we need to do here is make 1.8 the minimum and remove the check that the local repo is checked out (and the corresponding instructions)?
jmagman commentedon Sep 27, 2019
Check out #41491. I skipped the local check then the version is >= 1.8. I removed the pod setup instructions from the installer comment, but they will
pod setupinstructions if they run again with an installed, uninitialized version < 1.8.jeyj31 commentedon Sep 28, 2019
Hi everyone,
I'm currently trying to install flutter on my macOS but I can't install the CocoaPods even with your advices and all things I could find on internet
someone could please help me ?
attached, the screenshot of my terminal
blackholegalaxy commentedon Sep 28, 2019
As stated in #41253 (comment) you have to uninstall any previous version of cocoapods and install specific 1.7.5 version. You also ensure you didn't have any version installed through homebrew which could interfer with the gem one.
jeyj31 commentedon Sep 29, 2019
Ok and for uninstall home-brew there is the same command ?
blackholegalaxy commentedon Sep 29, 2019
brew uninstall cocoapodspaulgillingwater commentedon Sep 30, 2019
I had exactly the same problem and solved it as follows: (assuming you installed two versions of Cocoapod):
sudo gem uninstall cocoapods
Select gem to uninstall:
coldix commentedon Oct 5, 2019
Thanks Paul, I had the same problem, this fixed it :)

davidair commentedon Oct 7, 2019
Folks, please avoid downgrading CocoaPods to work around a "flutter doctor" issue - CocoaPods 1.8+ usage of CDN is a fantastic feature and an outstanding performance optimization. Unless something is broken, try using the latest version (also, #41491 has the fix for Flutter).
jmagman commentedon Oct 7, 2019
It's not just a
flutter doctorissue, it's aflutter build/runissue. When the local repo isn't presentpod installis skipped. 1eb1e22 is in v1.10.7, so once that hits stable the-v 1.7.5instruction and note can be removed.blackholegalaxy commentedon Oct 7, 2019
Since the MR to fix that on 1.8+ detection, maybe it could be useful to include that as hotfix in current/next stable.
Switch to Cocoapods 1.7.5
hsss1924 commentedon Oct 10, 2019
thanks,,,i fixed it
jmagman commentedon Oct 11, 2019
We're evaluating hotfixing this to stable.
kwight commentedon Oct 13, 2019
If people are feeling confident, another option is to run the
devchannel for now, which has received the fix in #41491 mentioned by @davidair .samchang8826 commentedon Oct 13, 2019
After I switch to dev branch, I got a lots of issues
so my suggestion is create fake folder under ~/.cocoapods/respos/master , it's fast and easy solution.
jmagman commentedon Oct 17, 2019
This fix is now in stable as v1.9.1+hotfix.5.
cs145442 commentedon May 25, 2021
Coming from linux, as per observation...
Do not use sudo to use flutter. latest version of cocoapods with CDN works fine. Thanks.
github-actions commentedon Aug 1, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.