My flutter app crash on IOS simulator with none error message when calling LanguageIdentifier.identifyLanguage(textual content). The app works high-quality on Android.
Pubspec.yaml line is google_mlkit_language_id: ^0.5.0.
Code is:
remaining _languageIdentifier = LanguageIdentifier(confidenceThreshold: 0.5);
...
Future<String?> _identifyLanguage(String textual content) async {
//if (textual content == '') return;
String? language;
attempt {
language = await _languageIdentifier.identifyLanguage(textual content);
} catch (e) {
print('error: ${e.toString()}');
}
return language;
}
I additionally added the road to the pod file:
goal 'Runner' do
use_frameworks!
use_modular_headers!
pod 'GoogleMLKit/LanguageID'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
finish
Any recommendations on tips on how to repair and tips on how to debug when IOS abruptly crash with none message?
I’m working on mac mini m2 with Android studio and xcode.