feat(android) Check server is reachable before starting background backup (#8989)

* Check that server is reachable before starting backup work

* Fix iOS not starting background service

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
devjn 2024-04-23 20:50:34 +03:00 committed by GitHub
parent 661540c886
commit 0435de50f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 113 additions and 31 deletions

View file

@ -171,9 +171,9 @@ class BackgroundServicePlugin: NSObject, FlutterPlugin {
return
}
// Requires 3 arguments in the array
guard args.count == 3 else {
print("Requires 3 arguments and received \(args.count)")
// Requires 3 or more arguments in the array
guard args.count >= 3 else {
print("Requires 3 or more arguments and received \(args.count)")
result(FlutterMethodNotImplemented)
return
}