flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Crash on startup after update to XCode 16 (iOS 18)

Open mxkdev opened this issue 1 year ago • 2 comments

I upgraded to XCode 16 (iOS18.0) and I am getting the following crash when running the app on a device other than IOS 18.0. I have double checked that it's the problematic package, so removing the use of FSS makes the app run. The crash occurs before any Flutter main code is executed. It is enough to have the package imported. Cleaning, deintegrating, etc. did not help unfortunately.

dyld[714]: Symbol not found: _$sSS10FoundationE4data5using20allowLossyConversionAA4DataVSgSSAAE8EncodingV_SbtF Referenced from: <CE61E755-2CA0-3F5C-A8B6-B3E498CCFC0C> /private/var/containers/Bundle/Application/5DDEE4C7-511A-4C41-9885-05ADC7228007/Runner.app/Frameworks/flutter_secure_storage.framework/flutter_secure_storage (built for iOS 18.0 which is newer than running OS) Expected in: <D27A6EC5-943C-3B0E-8D15-8840FD2914F0> /System/Library/Frameworks/Foundation.framework/Foundation

flutter_secure_storage: ^9.2.2

It also happened on 8.0.0 so maybe just something with the build process? I did the CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; fix for Firebase but nothing else. I am targeting iOS 12.0.

mxkdev avatar Sep 23 '24 13:09 mxkdev

Facing Same Issue. Were you able to solve?

jbrathod1312 avatar Oct 10 '24 16:10 jbrathod1312

Fixed the bug by overriding the minimum Iphone Deployment Target for flutter_secure_storage in Podfile

post_install do |installer|
  # Global settings
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
  end
  
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    
    # Set custom iOS target for flutter_secure_storage and flutter_email_sender
    target.build_configurations.each do |config|
      if target.name == 'flutter_secure_storage'
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' # Custom iOS target for flutter_secure_storage
       else Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
      end
    end
  end
end

jbrathod1312 avatar Oct 13 '24 06:10 jbrathod1312

This problem is probably fixed with version v10.0.0-beta.1. If you still encounter it with this version, please let me know.

juliansteenbakker avatar Jan 06 '25 15:01 juliansteenbakker

I am having the same issue. I tried 10.0.0 beta 4. Still not working.

TNelen avatar Jun 22 '25 19:06 TNelen