Flutter_cached_network_image: CocoaPods could not find compatible versions for pod "sqflite"

Created on 25 Dec 2020  ·  1Comment  ·  Source: Baseflow/flutter_cached_network_image

🐛 Bug Report

After installing flutter_cached_network_image my project stopped running and upon flutter run I see below error:

[!] CocoaPods could not find compatible versions for pod "sqflite": In Podfile: sqflite (from.symlinks/plugins/sqflite/ios`)

Specs satisfying the sqflite (from.symlinks/plugins/sqflite/ios) dependency were found, but they required a higher minimum deployment target.`

I tried all the methods given here: https://stackoverflow.com/questions/56086585/flutter-error-on-pod-install-cocoapods-could-not-find-compatible-versions-for-p

Expected behavior

Should have run without any issues.

Reproduction steps

Using this package with below flutter version:

Flutter 1.22.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1aafb3a8b9 (6 weeks ago) • 2020-11-13 09:59:28 -0800
Engine • revision 2c956a31c0
Tools • Dart 2.10.4

Configuration

Version: 1.x

Platform:

  • [ ] :iphone: iOS --> Yes, using iOS emulator on Mac Big Sur
  • [ ] :robot: Android

Most helpful comment

Add ios/Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
use_frameworks!
use_modular_headers!

def parse_KV_file(file,seperator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=seperator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname,:path=>podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  # Flutter Pods
  use_frameworks!
  use_modular_headers!
  generated_xcode_build_settings = parse_KV_file("./Flutter/Generated.xcconfig")
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter build or flutter run is executed once first."
  end
  generated_xcode_build_settings.map{ |p|
    if p[:name]=='FLUTTER_FRAMEWORK_DIR'
      pod 'Flutter', :path => p[:path]
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file("../.flutter-plugins")
  plugin_pods.map{ |p|
    pod p[:name], :path => File.expand_path("ios",p[:path])
  }
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

>All comments

Add ios/Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
use_frameworks!
use_modular_headers!

def parse_KV_file(file,seperator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=seperator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname,:path=>podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  # Flutter Pods
  use_frameworks!
  use_modular_headers!
  generated_xcode_build_settings = parse_KV_file("./Flutter/Generated.xcconfig")
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter build or flutter run is executed once first."
  end
  generated_xcode_build_settings.map{ |p|
    if p[:name]=='FLUTTER_FRAMEWORK_DIR'
      pod 'Flutter', :path => p[:path]
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file("../.flutter-plugins")
  plugin_pods.map{ |p|
    pod p[:name], :path => File.expand_path("ios",p[:path])
  }
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
Was this page helpful?
0 / 5 - 0 ratings

Related issues

port3000 picture port3000  ·  5Comments

ened picture ened  ·  4Comments

yossefEl picture yossefEl  ·  4Comments

ivk1800 picture ivk1800  ·  7Comments

gregko picture gregko  ·  6Comments