Podfile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. target.build_configurations.each do |config|
  49. # You can remove unused permissions here
  50. # for more information: https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
  51. # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
  52. config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
  53. '$(inherited)',
  54. ## dart: PermissionGroup.calendar
  55. ## 'PERMISSION_EVENTS=1',
  56. ## dart: PermissionGroup.calendarFullAccess
  57. ## 'PERMISSION_EVENTS_FULL_ACCESS=1',
  58. ## dart: PermissionGroup.reminders
  59. ## 'PERMISSION_REMINDERS=1',
  60. ## dart: PermissionGroup.contacts
  61. ## 'PERMISSION_CONTACTS=1',
  62. ## dart: PermissionGroup.camera
  63. ## 'PERMISSION_CAMERA=1',
  64. ## dart: PermissionGroup.microphone
  65. ## 'PERMISSION_MICROPHONE=1',
  66. ## dart: PermissionGroup.speech
  67. ## 'PERMISSION_SPEECH_RECOGNIZER=1',
  68. ## dart: PermissionGroup.photos
  69. 'PERMISSION_PHOTOS=1',
  70. ## The 'PERMISSION_LOCATION' macro enables the `locationWhenInUse` and `locationAlways` permission. If
  71. ## the application only requires `locationWhenInUse`, only specify the `PERMISSION_LOCATION_WHENINUSE`
  72. ## macro.
  73. ##
  74. ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
  75. ## 'PERMISSION_LOCATION=1',
  76. ## 'PERMISSION_LOCATION_WHENINUSE=0',
  77. ## dart: PermissionGroup.notification
  78. ## 'PERMISSION_NOTIFICATIONS=1',
  79. ## dart: PermissionGroup.mediaLibrary
  80. ## 'PERMISSION_MEDIA_LIBRARY=1',
  81. ## dart: PermissionGroup.sensors
  82. ## 'PERMISSION_SENSORS=1',
  83. ## dart: PermissionGroup.bluetooth
  84. ## 'PERMISSION_BLUETOOTH=1',
  85. ## dart: PermissionGroup.appTrackingTransparency
  86. 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
  87. ## dart: PermissionGroup.criticalAlerts
  88. ## 'PERMISSION_CRITICAL_ALERTS=1',
  89. ## dart: PermissionGroup.criticalAlerts
  90. ## 'PERMISSION_ASSISTANT=1',
  91. ]
  92. end
  93. end
  94. installer.generated_projects.each do |project|
  95. project.targets.each do |target|
  96. target.build_configurations.each do |config|
  97. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
  98. end
  99. end
  100. end
  101. end