mikeperri / flutter_sequencer

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

Exported iOS app is unable to complete createTracks #22

Open NAKANISYNTH opened 2 years ago

NAKANISYNTH commented 2 years ago

My Situation

When I build with release mode, the app able to play the sound with sf2 files properly. But on the app exported for distribution, even though it is the exact same code, it seems to stop at createTracks and not play the sound. The app doesn't crash, so I don't think it's a problem with the file path or loading.

I don't know if this is related, but when I build from Mac, I get the following messages on console when createTracks is called.

[i-aa] IPCAUClient.cpp:129:ConnectToRegistrationServer: IPCAUClient: bundle display name is nil
DLSBankManager.cpp:99:LoadInstrument: BankEntry::LoadInstrument: Unable to find patch 0 bank 0x78/0
DLSBankManager.cpp:100:LoadInstrument: about to throw -10851: LoadInstrument: Failed to load patch from bank
GlobalState.cpp:486:LoadInstrumentFromDLSCollection: DLS/SF2 bank load failed

If you have any suggestions on how to handle this, please let me know. Thank you for developing such a cool package :)

Moyck commented 2 years ago

Any progress?

Moyck commented 2 years ago

I tried all day and finally solved this problem. When I hit Archive with Xcode to package, the plugin doesn't work properly. But when I try to package it into runner.app with

flutter build ios --release

and then convert it to ipa, everything works fine, I hope it can help you

LeventeAsztalos commented 2 years ago

@NAKANISYNTH @Moyck Did you find a solution to this issue? How did you convert the released build to ipa?

NAKANISYNTH commented 2 years ago

@jugamir This issue seems to have been solved in the latest version 0.4.4. https://pub.dev/packages/flutter_sequencer/changelog

Moyck commented 2 years ago

@jugamir The version I use is 0.4.4, but still have this problem. My solution is to use flutter build ios to generate Runner.app file, then use flutter build ipa to generate Runner.xcarchive. Open Runner.xcarchive/Products/Applications and replace Runner.app file

LeventeAsztalos commented 2 years ago

This solved it for me: https://github.com/mikeperri/flutter_sequencer/issues/10#issuecomment-827046191