easy_localization
easy_localization copied to clipboard
ERROR ON IOS - Exception has occurred. PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))
Basically, running the app on Android works fine, running the app on iOS physical or emulator returns the following error:
Exception has occurred.PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))
on the following:
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top],
);
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
await EasyLocalization.ensureInitialized();
firstTimeLocalSettings = await localSettings.getFirstTimeLocaleSettings();
MobileAds.instance.initialize().then((initializationStatus) {
initializationStatus.adapterStatuses.forEach((key, value) {
debugPrint('Adapter status for $key: ${value.description}');
});
});
runApp(EasyLocalization(
supportedLocales: const [Locale('en'), Locale('ar')],
path: 'assets/translations', // <-- change the path of the translation files
fallbackLocale: const Locale('en'),
useOnlyLangCode: true,
useFallbackTranslations: true,
saveLocale: true,
child: const MyApp()));
}```
would love to understand why it is working just fine on android and not iOS
+1