easy_localization icon indicating copy to clipboard operation
easy_localization copied to clipboard

ERROR ON IOS - Exception has occurred. PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))

Open tiltmaster opened this issue 1 year ago • 1 comments

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

tiltmaster avatar Dec 09 '23 17:12 tiltmaster

+1

pishguy avatar Jan 19 '24 15:01 pishguy