iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🤔

[Flutter] Fixing an issue where the app fails to launch on iOS 16 after updating to Xcode 15 and iOS 17

に公開

Overview

To make a Flutter app compatible with iOS 17, I updated Flutter itself and upgraded Xcode from 14 to 15. As the title suggests, while it worked on iOS 17, I encountered a phenomenon where the app would no longer launch on iOS 16.

Versions
Flutter 3.13.9
Xcode 15.0.1

EXC_BAD_ACCESS occurs at startup
Log excerpt

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

Conclusion

I was able to resolve the issue by adding the following to the Podfile, referencing this person's comment. Thank you.
Since version updates often cause various issues, I've written this article to share the problem I encountered.
https://github.com/fluttercommunity/plus_plugins/issues/1955#issuecomment-1742387418

Podfile modifications

post_install do |installer|
 installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
        if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0 # Added
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' # Added
        end # Added
     end
 end
end

It seems to be an issue related to the fact that support for versions below iOS 12 was removed in Xcode 15.

This is likely the cause of the problem.

References

Discussion