lyledean1 / flutter_whisper.cpp

Flutter App That Can Transcribe Audio Offline/On Device with Whisper C++ Bindings via Rust
MIT License
102 stars 10 forks source link

Unable to run on real ios device or build ios --release #15

Closed hyqshr closed 10 months ago

hyqshr commented 10 months ago

It run successfully on ios simulator, but can not run on my ios device (Iphone 14 Pro) or run flutter build ios --release tested on Xcode 15.0, Flutter 3.13.4, ios 17

image

Running Xcode build...
Xcode build done. 8.2s Failed to build iOS app Error (Xcode): could not compile cfg-if (lib) due to 2 previous errors

Error (Xcode): cannot find attribute derive in this scope

Error (Xcode): could not compile libc (lib) due to 200 previous errors

Encountered error while building for device.

hyqshr commented 10 months ago

Solved after correctly config flutter run bridge

iOS setup iOS requires some additional Rust targets for cross-compilation:

64 bit targets (real device & simulator):

rustup target add aarch64-apple-ios x86_64-apple-ios

New simulator target for Xcode 12 and later

rustup target add aarch64-apple-ios-sim

lyledean1 commented 10 months ago

Nice to hear that you solved this @hyqshr . I think these are covered in the set up for Flutter Rust Bridge but I'll add a link to the setup in the Readme