Podfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Uncomment this line to define a global platform for your project
  2. # platform :ios, '12.0'
  3. source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
  4. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  5. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  6. project 'Runner', {
  7. 'Debug' => :debug,
  8. 'Profile' => :release,
  9. 'Release' => :release,
  10. }
  11. def flutter_root
  12. generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  13. unless File.exist?(generated_xcode_build_settings_path)
  14. raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  15. end
  16. File.foreach(generated_xcode_build_settings_path) do |line|
  17. matches = line.match(/FLUTTER_ROOT\=(.*)/)
  18. return matches[1].strip if matches
  19. end
  20. raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
  21. end
  22. require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  23. flutter_ios_podfile_setup
  24. target 'Runner' do
  25. use_frameworks!
  26. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  27. target 'RunnerTests' do
  28. inherit! :search_paths
  29. end
  30. end
  31. # 键盘扩展 target
  32. target 'AiKeyboard' do
  33. use_frameworks!
  34. # 键盘扩展的 pod 依赖
  35. pod 'SnapKit', '~> 5.0.0'
  36. pod 'JXSegmentedView'
  37. pod 'lottie-ios'
  38. pod 'Moya'
  39. pod 'Moya-ObjectMapper'
  40. pod 'Toast-Swift'
  41. pod 'Kingfisher'
  42. pod 'MarqueeLabel'
  43. end
  44. post_install do |installer|
  45. installer.pods_project.targets.each do |target|
  46. flutter_additional_ios_build_settings(target)
  47. end
  48. end