I am facing an issue with pod file as below while instlling POD in Xcode project
Invalid `Podfile` file: undefined method `exists?' for File:Class
I did try to update POD version with brew upgrade cocoapods
and also followed below link
https://dev.to/retyui/fix-a-pod-install-error-undefined-method-exist-for-fileclass-react-native-24ke
But still no fix.
Please guide me what am I doing wrong here.
below is my POD file
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
flutter_application_path = '../bmi_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'MixedNativeApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
install_all_flutter_pods(flutter_application_path)
# Pods for MixedNativeApp
target 'MixedNativeAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MixedNativeAppUITests' do
# Pods for testing
end
end
2
Answers
Here is my solution for above problem (Posting if it could be helpful for devs in same situation)
brew remove cocoapods
Same problem on 2.8.0 stable with cocoapods 1.11.3. To resolve this switch cocoapods to 1.11.2 sudo gem install cocoapods -v 1.11.2. Remember to remove 1.11.3 version first.