mikeperri / flutter_sequencer

A Flutter plugin for music sequencing.
Other
90 stars 38 forks source link

[iOS] App crashes on startup for iOS simulator on M1 macbook #47

Open rutgercap opened 5 months ago

rutgercap commented 5 months ago

Whenever I add the sequencer, my app crashes on startup. I don't get clear logging, since it never finishes the "[ ] Waiting for VM Service port to be available..." step.

The error I found at some point was: Error (Xcode): Building for 'iOS-simulator', but linking in object file (/Users/rutgercappendijk/.pub-cache/hosted/pub.dev/flutter_sequencer-0.4.4/i os/third_party/sfizz/build/libsfizz_fat.a[arm64]2) built for 'iOS'

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

After searching around this seems to be an issue with the switch to Apple sillicon. The simulator runs on x86, while iOS and MacOS run on arm64. Some dependencies from sfizz are now built for arm64 and some for x86, and then it is impossible to link them up.

I spent a lot of hours on trying to fix this. If anyone has any input, it is very welcome!

Flutter doctor: [✓] Flutter (Channel stable, 3.19.1, on macOS 14.3 23D56 darwin-arm64, locale en-NL) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.86.2) [✓] Connected device (3 available) ! Error: Browsing on the local area network for iPhone (84). Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources

• No issues found!