Crash on iOS 12
Hi,
When trying to run my app on iOS 12 it crashes with the following message: dyld: Library not loaded: /System/Library/Frameworks/AVFAudio.framework/AVFAudio Referenced from: /Users/hennie/Library/Developer/CoreSimulator/Devices/E29CF1A8-DF5D-4202-8758-649CEB6077CB/data/Containers/Bundle/Application/BA9BDD13-3C82-4C97-BF4A-E9A4AD758415/Runner.app/Frameworks/audio_session.framework/audio_session Reason: image not found
Does this also happen on the official example in this repository?
Yes it does crash @ryanheise
How about on an actual device? I want to rule out perhaps an issue with your development environment.
Currently experiencing it on production on all ios devices
Fatal Exception: FlutterError
PlatformException(2003329396, The operation couldn’t be completed. (OSStatus error 2003329396.), null, null). Error thrown null.
flutter doctor?
Our use case
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
initAudiManager();
});
}
void initAudiManager() {
try {
AudioSession.instance.then((audioSession) async {
// This line configures the app's audio session, indicating to the OS the
// type of audio we intend to play. Using the "speech" recipe rather than
// "music" since we are playing a podcast.
audioSession.devicesChangedEventStream.listen((event) {
Logger().i('Devices added: ${event.devicesAdded}');
Logger().i('Devices removed: ${event.devicesRemoved}');
});
await audioSession.configure(const AudioSessionConfiguration.music());
});
} catch (e) {
// fail silently
Logger().e(e);
}
}
That is not necessary, because you said the official example already reproduces the bug. I have the official example, I can just use that without using your code.
Still, I need your flutter doctor output because when I run the official example, I don't see the problems you are seeing.
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale en-KE)
• Flutter version 3.0.4 at /Users/..../Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 85684f9300 (6 weeks ago), 2022-06-30 13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/..../Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /Users/...../Android/sdk
• Java binary at: /Users/...../Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Corretto-11.0.15.9.1 (build 11.0.15+9-LTS)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] IntelliJ IDEA Community Edition (version 2022.1.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 69.0.4
• Dart plugin version 221.6008.17
[✓] VS Code (version 1.69.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0
[✓] Connected device (3 available)
• iPhone (mobile) • 0c933f990e1f489c392e99c34f82c96643095f64 • ios • iOS 15.6 19G71
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.79
! Error: iPhone is busy: Fetching debug symbols for iPhone. Xcode will continue when iPhone is finished. (code -10)
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Thanks, I'll check later whether my versions match yours.