Friday, November 6, 2026
HomeiOS Developmentflutter - flutter_downloader does not present notification of downloading in iOS

flutter – flutter_downloader does not present notification of downloading in iOS

[ad_1]

I take advantage of flutter_downloader in app to permit downloading pdf recordsdata .
It’s working nicely in Android,however in IOS,the notification of beginning downloading the file does not seem though the file downloaded within the system.

I adopted all directions like described from Allow background mode,Add sqlite library,Configure AppDelegate

code:

                                       last standing = await Permission.storage.request();
                                        if (standing.isGranted) {

                                          // Listing _path  = await getExternalStorageDirectory();
                                          //  String _localPath = _path.absolute.path + Platform.pathSeparator + 'ESPRS_Docs';

                                          var savedDir;
                                          if (Platform.isIOS) {
                                            savedDir = await getApplicationDocumentsDirectory();
                                          } else {
                                            savedDir = Listing('/storage/emulated/0/Obtain');
                                            // Put file in world obtain folder, if for an unknown cause it did not exist, we fallback
                                            // ignore: avoid_slow_async_io
                                            if (!await savedDir.exists()) savedDir = await getExternalStorageDirectory();
                                          }

                                          String random_no =randomAlphaNumeric(6) ;
                                          var split_name=p_title.replaceAll(" ","-");

                                           await FlutterDownloader.enqueue(
                                            url: p_link,
                                            savedDir: savedDir.path,
                                            fileName: "${split_name}-${random_no}.pdf",
                                            showNotification: true,
                                            saveInPublicStorage: true,
                                            openFileFromNotification: true,
                                            headers: {"auth": "Downloader"},

                                          );


                                        }else {
                                          print("Permission deined");
                                        };

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments