简体   繁体   中英

Flutter iOS Xcode build was failing

My flutter app was working fine for android and for iOS the build was failing.

My pod file code was

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
  end
 end
end

在此处输入图像描述

You can try to change your podfile code to

 post_install do |installer|
   installer.pods_project.targets.each do |target| 
     flutter_additional_ios_build_settings(target)
   end
 end

If my first solution doesn't work, you can follow these steps:

  1. Backup ios/Runner folder.

  2. Delete the ios folder.

  3. Create another project with same name as yours.

  4. Paste your Runner backup in the ios folder to your new project.

  5. Run pod install in your ios directory.

  6. Run flutter clean the flutter run .

Hope it works.d

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM