Flutter Plugin with xcframework only works with device not in ios simulator (depending on Flutter version)

I have created a flutter plugin. By running the example app in Flutter I get this error:

Error: Swift Compiler Error (Xcode): No such module ‘AusweisApp2’

podspec file:

Pod::Spec.new do |s|       
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.dependency 'Flutter'
  s.platform = :ios, '11.0'
  s.vendored_frameworks = 'Frameworks/AusweisApp2.xcframework'
  s.xcconfig = { 'OTHER_LDFLAGS' => '-framework AusweisApp2' }

  # Flutter.framework does not contain a i386 slice.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
  s.swift_version = '5.0'
end

The App works on device but not on ios simulators. You can download the xcframework here https://github.com/Governikus/AusweisApp2-SDK-iOS

In Flutter 2.2.1 it works
In Flutter 2.5.3 it works not
in Flutter 2.8.0 it works
in Flutter 2.8.1 it works not
in Flutter 2.10.3 it works not

1 thought on “Flutter Plugin with xcframework only works with device not in ios simulator (depending on Flutter version)

Comments are closed.