geweald / flutter_onfido

Flutter Onfido Plugin
MIT License
8 stars 20 forks source link

Could not build the application for the simulator. #4

Closed jpsantosbh closed 3 years ago

jpsantosbh commented 3 years ago

I'm trying to run the application in the simulator launching it from the Android Visual Studio.

Running pod install...
Running Xcode build...
Xcode build done.                                            2.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    warning: [CP] Unable to find matching .xcframework slice in '/Users/joaopaulosantos/Development/civic/onfido_test_app/ios/Pods/Onfido/Onfido.xcframework Onfido framework ios-i386_x86_64-simulator ios-arm64_armv7' for the current build architectures (arm64 x86_64 i386).
    /Users/joaopaulosantos/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_onfido-0.2.0/ios/Classes/OnfidoSdk.swift:2:8: error: no such module 'Onfido'
    import Onfido
           ^
    /Users/joaopaulosantos/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_onfido-0.2.0/ios/Classes/OnfidoSdk.swift:2:8: error: no such module 'Onfido'
    import Onfido
           ^
    /Users/joaopaulosantos/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_onfido-0.2.0/ios/Classes/OnfidoSdk.swift:2:8: error: no such module 'Onfido'
    import Onfido
           ^
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    note: Removed stale file '/Users/joaopaulosantos/Library/Developer/Xcode/DerivedData/Runner-efufydbfixpattaksvahqtdetfgr/Build/Products/Debug-iphonesimulator/Runner.app'

    note: Removed stale file '/Users/joaopaulosantos/Library/Developer/Xcode/DerivedData/Runner-efufydbfixpattaksvahqtdetfgr/Build/Products/Debug-iphonesimulator/Pods_Runner.framework'

    note: Removed stale file '/Users/joaopaulosantos/Library/Developer/Xcode/DerivedData/Runner-efufydbfixpattaksvahqtdetfgr/Build/Products/Debug-iphonesimulator/flutter_onfido/flutter_onfido.framework'

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.

My Flutter doctor output:


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.56.0)
[✓] Connected device (2 available)

• No issues found!```  
geweald commented 3 years ago

Hi @jpsantosbh have you resolved the issue? I cannot reproduce it. Have you tried to upgrade flutter, clear Pods folder, run pod repo update or pod update, run flutter clean?

fryette commented 3 years ago

Seems it happens with new XCode emulators which requires new Onfido version @geweald could you please confirm that on your latest XCode version everything is fine? Is it possible to update Onfido to the latest version? Update But at the same time example project building without any problem

fryette commented 3 years ago

To resolve the issue need to add to your podfile


    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
geweald commented 3 years ago

Hi @jpsantosbh @fryette thanks, can you guys try the latest 0.2.1? :)

fryette commented 3 years ago

Seems the latest version works Thanks!