Podfile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Uncomment this line to define a global platform for your project
  2. # platform :ios, '12.0'
  3. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  4. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  5. project 'Runner', {
  6. 'Debug' => :debug,
  7. 'Profile' => :release,
  8. 'Release' => :release,
  9. }
  10. def flutter_root
  11. generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  12. unless File.exist?(generated_xcode_build_settings_path)
  13. raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  14. end
  15. File.foreach(generated_xcode_build_settings_path) do |line|
  16. matches = line.match(/FLUTTER_ROOT\=(.*)/)
  17. return matches[1].strip if matches
  18. end
  19. raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
  20. end
  21. require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  22. flutter_ios_podfile_setup
  23. target 'Runner' do
  24. use_frameworks!
  25. use_modular_headers!
  26. # pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.0.1.podspec'
  27. # pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.0.1.podspec'
  28. pod 'ComPDFKit', :git => 'https://github.com/dinglingui/testLib.git', :tag => '2.0.1'
  29. pod 'ComPDFKit_Tools', :git => 'https://github.com/dinglingui/testLib.git', :tag => '2.0.1'
  30. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  31. target 'RunnerTests' do
  32. inherit! :search_paths
  33. end
  34. end
  35. post_install do |installer|
  36. installer.pods_project.targets.each do |target|
  37. flutter_additional_ios_build_settings(target)
  38. end
  39. end