I am pod installing. This type error showing.
[!] No podspec found for geolocator_web
in .symlinks/plugins/geolocator_web/ios
I am not uses of geolocator_web or geolocator.
flutter ios pod installing error showing.
How to fix it?
For me I solved this by doing these steps:
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
flutter pub get
pod install
It's usually the podfile that causes these kinds of error
If any of you are struggling with this error and none of the following methods works:
flutter clean
& flutter pub get
(arch -x86_64) pod repo update
& (arch -x86_64) pod install
Clean Build Folder
in XCode flutter create ios
try this:
flutter clean
& flutter pub get
pod install
I was always getting this "no podspec found for xxx~~" error where xxx can be any plugin, and figured out that some plugins never get their podspec file copied into ios/.symlinks/pluginx/xxx/ios folder right after pod install
.
After deleting /.pub-cache, I could confirm that all podspec files were in place.
flutter pub cache repair
command seems like it does the same thing, but I didn't try this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.