Getting Error on initializing FlutterDownloader package in iOS device

84 views Asked by At

My app runs perfectly on Android devices but when I run the app on an IOS device I get the below error and my app closes after crashing:
This is the exception I am getting when running an app on iOS device:

Exception: Unable to terminate com.nestohubbroker.nestoHubBroker on F3B27743-357C-423B-B351-40097BCC3246:
ProcessException: Process exited abnormally:

  Command: /usr/bin/arch -arm64e xcrun simctl terminate F3B27743-357C-423B-B351-40097BCC3246 com.nestohubbroker.nestoHubBroker
the Dart compiler exited unexpectedly.

Here is my main.dart file where I have initialize the flutter_downloader package

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_downloader/flutter_downloader.dart';

import 'environment.dart';
import 'nesto_hub_app.dart';
import 'utils/shared_pref.dart';

void main() async {
  /// initializing the framework
  WidgetsFlutterBinding.ensureInitialized();

  /// setting up the orientation of the app to portrait only
  await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

  /// initializing the environment file
  await dotenv.load(fileName: Environment.fileName);

  /// initializing flutter downloader package
  await FlutterDownloader.initialize();

  /// initializing the shared preference
  await SharedPref().initSharedPreferences();
  runApp(const NestoHubApp());
}

Screenshot of errorenter image description here

0

There are 0 answers