I have installing gem on a Macbook Pro running Big Sur and M1 chip. I have followed the instructions given, added these two lines on top of my Podfile
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
then I am running the 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
Any idea what excatly is the problem here?
Open a terminal in your Xcode project folder and run the commands below:
gem cleanupbrew uninstall cocoapodssudo gem uninstall cocoapodssudo gem install cocoapods -v 1.10.0 -n /usr/local/binsudo gem install cocoapods-user-defined-build-typespod install --repo-updateNOTE! If you using react-native before pod install --repo-update delete your node_modules folder and install again using npm
add gem 'cocoapods-user-defined-build-types' to your gemfile and run bundle install
this should work if the other solutions didn't
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With