fluttercommunity / fluttercommunity/flutter_downloader

Not work after upgrade to IOS 17 and Xcode 15

Open
#899 12 comments 1 reaction 1 assignee Claimed by @salmaahhmed View on GitHub
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

**it was works problly with IOS and Android , but after update MY Xcode to 15.0 and my IOS to 17.0 it not work.
I test it after update work with android but iOS not after upgrade .**

**This steps :**

🔻**add this in application function in AppDelegate.swift file:**
`FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)`

🔻**add this function in AppDelegate.swift file:**
`private func registerPlugins(registry: FlutterPluginRegistry) {`
` if (!registry.hasPlugin("FlutterDownloaderPlugin")) {`
` FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin")!)`
` }`
`}`

🔻**In Runner in Target add labsqlite3.0.tbd under Frameworks,Libraries,and Embedded Content**

🔻**in main() function :**
`WidgetsFlutterBinding.ensureInitialized();`
`await FlutterDownloader.initialize(
debug:
false, // optional: set to false to disable printing logs to console (default: true)`
` ignoreSsl:
true // option: set to false to disable working with http links (default: false)
);`

🔻**this Callback Function:**
`FlutterDownloader.registerCallback(downloadCallback);`
`@pragma('vm:entry-point')`
` static void downloadCallback(`
` String id, int status, int progress) {`
` print('progress $progress');`
` if (progress == 100) Constants.FILE_INSTALLED = true;`
` SendPort? send = IsolateNameServer.lookupPortByName('downloader_send_port');`
` send!.send([id, status, progress]);`
` }`

🔻**downloader enqueue function :**
`await FlutterDownloader.enqueue(`
` url: url,`
` savedDir: '${appDocDirectory.path}',`
` fileName:`
` '${url.substring(url.lastIndexOf('/'))}',`
` openFileFromNotification:`
` true, // click on notification to open downloaded file (for Android)`
` showNotification: false,`
` allowCellular: true,`
` );`

**I hope reach speed solution from you , Thanks**🙏

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.