Invalid `Podfile` file: undefined method `enable_user_defined_build_types!'
amitprk13 opened this issue ยท 11 comments
I have installing gem on a Macbook Pro running Big Sur and M1 chip. I have followed the instructions given, added these two line on top of my Podfile
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
then I am running command
sudo gem install 'cocoapods-user-defined-build-types'
and gem is getting installed see below -
Successfully installed cocoapods-user-defined-build-types-0.0.7
Parsing documentation for cocoapods-user-defined-build-types-0.0.7
Done installing documentation for cocoapods-user-defined-build-types after 0 seconds
1 gem installed
Now, as soon as I run pod install , I get this error -
[!] Invalid Podfile
file: undefined method `enable_user_defined_build_types!' for #<Pod::Podfile:0x0000000145251098 @defined_in_file=#<Pathname
I am facing the same issue
@yeasitech I have tried everything downgrading from 1.10.1 to 1.8.3 and between 1.9.0 but nothing works.
same issure:
pod install
Error:
[!] Invalid Podfile
file: undefined method `enable_user_defined_build_types!'
I solved this issue by installing specific version of cocoapods with gem.
Open a terminal in your Xcode project folder and run the commands below:
gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update
NOTE! If you using react-native before pod install --repo-update
delete your node_modules
folder and install again using npm
React
requires CocoaPods version >= 1.10.1
, which is not satisfied by your current version, 1.10.0
.
I have installing gem on a Macbook Pro running Big Sur and M1 chip. I have followed the instructions given, added these two line on top of my Podfile
plugin 'cocoapods-user-defined-build-types' enable_user_defined_build_types!
then I am running command
sudo gem install 'cocoapods-user-defined-build-types'
and gem is getting installed see below -
Successfully installed cocoapods-user-defined-build-types-0.0.7 Parsing documentation for cocoapods-user-defined-build-types-0.0.7 Done installing documentation for cocoapods-user-defined-build-types after 0 seconds 1 gem installed
Now, as soon as I run pod install , I get this error -
[!] Invalid
Podfile
file: undefined method `enable_user_defined_build_types!' for #<Pod::Podfile:0x0000000145251098 @defined_in_file=#<Pathname
after install the gem, and open new tab, I can pod install without the error in the new tab
I solved this issue by installing specific version of cocoapods with gem.
Open a terminal in your Xcode project folder and run the commands below:
gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update
NOTE! If you using react-native before
pod install --repo-update
delete yournode_modules
folder and install again usingnpm
Works like a charm. Tried with cocoapods 1.11.0
I solved this issue by installing specific version of cocoapods with gem.
Open a terminal in your Xcode project folder and run the commands below:
gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update
NOTE! If you using react-native before
pod install --repo-update
delete yournode_modules
folder and install again usingnpm
This doesn't work for me :( Tried with cocoapods 1.10.0, 1.11.0, 1.11.3
Macbook Pro Intel
You might have used a Capital 'P' while initiating the 'RealmSwift' command in the podfile. I had same issue, it got solved by fixing this mistake.
100% Guaranteed Answer:
gem install cocoapods-user-defined-build-types
I owe you a million $ if it doesn't work.
This solution works for me: #2 (comment)