Advertisement
Guest User

Untitled

a guest
Aug 18th, 2024
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. platform :ios, '15.2'
  2.  
  3. ENV['COCOAPODS_DISABLE_STATS'] = 'true'
  4.  
  5. project 'Runner', {
  6. 'Debug' => :debug,
  7. 'Profile' => :release,
  8. 'Release' => :release,
  9. }
  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.  
  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.  
  24. require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
  25.  
  26. flutter_ios_podfile_setup
  27.  
  28. target 'Runner' do
  29. use_frameworks!
  30. use_modular_headers!
  31.  
  32. flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  33.  
  34. target 'RunnerTests' do
  35. inherit! :search_paths
  36. end
  37. end
  38.  
  39. post_install do |installer|
  40. installer.pods_project.targets.each do |target|
  41. target.build_configurations.each do |config|
  42. config.build_settings['EXCLUDED_ARCHS'] = 'arm64'
  43. config.build_settings['SWIFT_VERSION'] = '5.9'
  44. config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.2'
  45. end
  46. flutter_additional_ios_build_settings(target)
  47. end
  48. end
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement