iOS: native upload and download services (background URLSession)
Swift implementation of the upload_service/download_service channels: background PUT/GET against the account's WebDAV root, one summary local notification per batch, Downloads visible in the Files app. Pure helpers covered by RunnerTests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
d008185f98
commit
469e57cca7
@@ -7,10 +7,25 @@ import UIKit
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
TransferManager.shared.reconnect()
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
handleEventsForBackgroundURLSession identifier: String,
|
||||
completionHandler: @escaping () -> Void
|
||||
) {
|
||||
if identifier == TransferManager.sessionIdentifier {
|
||||
TransferManager.shared.backgroundCompletionHandler = completionHandler
|
||||
} else {
|
||||
super.application(
|
||||
application, handleEventsForBackgroundURLSession: identifier, completionHandler: completionHandler)
|
||||
}
|
||||
}
|
||||
|
||||
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||
NativeServices.register(messenger: engineBridge.applicationRegistrar.messenger())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user