Podfile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. pod 'Alamofire'
  28. pod 'SwiftyJSON'
  29. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  30. target 'RunnerTests' do
  31. inherit! :search_paths
  32. end
  33. end
  34. # 键盘扩展 target
  35. target 'AiKeyboard' do
  36. use_frameworks!
  37. # 键盘扩展的 pod 依赖
  38. pod 'SnapKit', '~> 5.0.0'
  39. pod 'JXSegmentedView'
  40. pod 'lottie-ios'
  41. pod 'Moya'
  42. pod 'Moya-ObjectMapper'
  43. pod 'Toast-Swift'
  44. pod 'Kingfisher'
  45. pod 'MarqueeLabel'
  46. pod 'GravityEngineSDK'
  47. end
  48. post_install do |installer|
  49. installer.pods_project.targets.each do |target|
  50. flutter_additional_ios_build_settings(target)
  51. target.build_configurations.each do |config|
  52. # You can remove unused permissions here
  53. # for more information: https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
  54. # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
  55. config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
  56. '$(inherited)',
  57. ## dart: PermissionGroup.calendar
  58. ## 'PERMISSION_EVENTS=1',
  59. ## dart: PermissionGroup.calendarFullAccess
  60. ## 'PERMISSION_EVENTS_FULL_ACCESS=1',
  61. ## dart: PermissionGroup.reminders
  62. ## 'PERMISSION_REMINDERS=1',
  63. ## dart: PermissionGroup.contacts
  64. ## 'PERMISSION_CONTACTS=1',
  65. ## dart: PermissionGroup.camera
  66. ## 'PERMISSION_CAMERA=1',
  67. ## dart: PermissionGroup.microphone
  68. ## 'PERMISSION_MICROPHONE=1',
  69. ## dart: PermissionGroup.speech
  70. ## 'PERMISSION_SPEECH_RECOGNIZER=1',
  71. ## dart: PermissionGroup.photos
  72. 'PERMISSION_PHOTOS=1',
  73. ## The 'PERMISSION_LOCATION' macro enables the `locationWhenInUse` and `locationAlways` permission. If
  74. ## the application only requires `locationWhenInUse`, only specify the `PERMISSION_LOCATION_WHENINUSE`
  75. ## macro.
  76. ##
  77. ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
  78. ## 'PERMISSION_LOCATION=1',
  79. ## 'PERMISSION_LOCATION_WHENINUSE=0',
  80. ## dart: PermissionGroup.notification
  81. ## 'PERMISSION_NOTIFICATIONS=1',
  82. ## dart: PermissionGroup.mediaLibrary
  83. ## 'PERMISSION_MEDIA_LIBRARY=1',
  84. ## dart: PermissionGroup.sensors
  85. ## 'PERMISSION_SENSORS=1',
  86. ## dart: PermissionGroup.bluetooth
  87. ## 'PERMISSION_BLUETOOTH=1',
  88. ## dart: PermissionGroup.appTrackingTransparency
  89. 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
  90. ## dart: PermissionGroup.criticalAlerts
  91. ## 'PERMISSION_CRITICAL_ALERTS=1',
  92. ## dart: PermissionGroup.criticalAlerts
  93. ## 'PERMISSION_ASSISTANT=1',
  94. ]
  95. end
  96. end
  97. installer.generated_projects.each do |project|
  98. project.targets.each do |target|
  99. target.build_configurations.each do |config|
  100. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
  101. end
  102. end
  103. end
  104. installer.generated_projects.each do |project|
  105. project.targets.each do |target|
  106. target.build_configurations.each do |config|
  107. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
  108. end
  109. end
  110. end
  111. end