Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter_inappwebview with iOS 16

Tags:

ios

flutter

Launching lib/main.dart on iPhone 14 Pro Max in debug mode... Running pod install... Running Xcode build... Xcode build done. 13,0s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **

Xcode's output: ↳ Writing result bundle at path: /var/folders/1w/tncq7cqs7wdblnbp_f35d_s00000gp/T/flutter_tools.SQyxcZ/flutter_ios_build_temp_dirC9UeU4/temporary_xcresult_bundle

/Users/usuario/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/Types/UserScript.swift:13:6: error: stored properties cannot be marked potentially unavailable with '@available'
    @available(iOS 14.0, *)
     ^
error: the following command failed with exit code 1 but produced no further output
CompileSwift normal x86_64 /Users/usuario/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/Types/UserScript.swift (in target 'flutter_inappwebview' from project 'Pods')
/Users/usuario/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/Types/UserScript.swift:13:6: error: stored properties cannot be marked potentially unavailable with '@available'
    @available(iOS 14.0, *)
     ^
note: Building targets in dependency order
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')

Result bundle written to path:
    /var/folders/1w/tncq7cqs7wdblnbp_f35d_s00000gp/T/flutter_tools.SQyxcZ/flutter_ios_build_temp_dirC9UeU4/temporary_xcresult_bundle

Swift Compiler Error (Xcode): Stored properties cannot be marked potentially unavailable with '@available' /Users/usuario/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/ios/Classes/Types/UserScript.swift:12:5

Version: flutter_inappwebview: ^5.4.3+7

like image 987
Armando Couto Avatar asked Sep 11 '25 14:09

Armando Couto


1 Answers

Before the package is fixed in the repository you can override it with a fixed version from GitHub. To do it edit your pubspec.yaml:

...

dependency_overrides:
  ...
  flutter_inappwebview:
    git: https://github.com/CodeEagle/flutter_inappwebview
  ...
like image 90
Alexandr Priezzhev Avatar answered Sep 14 '25 03:09

Alexandr Priezzhev