Podfile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Uncomment this line to define a global platform for your project
  2. #source 'https://github.com/CocoaPods/Specs.git'
  3. #source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
  4. platform :ios, '9.0'
  5. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
  6. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  7. project 'Runner', {
  8. 'Debug' => :debug,
  9. 'Profile' => :release,
  10. 'Release' => :release,
  11. }
  12. def flutter_root
  13. generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  14. unless File.exist?(generated_xcode_build_settings_path)
  15. raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  16. end
  17. File.foreach(generated_xcode_build_settings_path) do |line|
  18. matches = line.match(/FLUTTER_ROOT\=(.*)/)
  19. return matches[1].strip if matches
  20. end
  21. raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
  22. end
  23. require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  24. flutter_ios_podfile_setup
  25. target 'Runner' do
  26. pod 'Tencent-MapSDK'
  27. use_modular_headers!
  28. # use_frameworks!
  29. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  30. end
  31. post_install do |installer|
  32. installer.pods_project.targets.each do |target|
  33. flutter_additional_ios_build_settings(target)
  34. end
  35. end
  36. #post_install do |installer|
  37. # installer.pods_project.targets.each do |target|
  38. # flutter_additional_ios_build_settings(target)
  39. # target.build_configurations.each do |config|
  40. # config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  41. # end
  42. # end
  43. #end