Podfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. platform:ios, '13.0'
  25. target 'Runner' do
  26. use_frameworks!
  27. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  28. target 'RunnerTests' do
  29. inherit! :search_paths
  30. end
  31. end
  32. # 键盘扩展 target
  33. target 'AiKeyboard' do
  34. use_frameworks!
  35. # 键盘扩展的 pod 依赖
  36. pod 'SnapKit', '~> 5.0.0'
  37. pod 'JXSegmentedView'
  38. pod 'lottie-ios'
  39. pod 'Moya'
  40. pod 'Moya-ObjectMapper'
  41. pod 'Toast-Swift'
  42. pod 'Kingfisher'
  43. pod 'MarqueeLabel'
  44. end
  45. post_install do |installer|
  46. installer.pods_project.targets.each do |target|
  47. flutter_additional_ios_build_settings(target)
  48. end
  49. installer.generated_projects.each do |project|
  50. project.targets.each do |target|
  51. target.build_configurations.each do |config|
  52. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
  53. end
  54. end
  55. end
  56. end