fluttercommunity / fluttercommunity/flutter_uploader

Background upload in ios using version 3

Open
#165 1 comment 0 reactions 0 assignees View on GitHub
android ios
Dominant language
Dart
Stars
218
Forks
172
PR merge metrics
No merged PRs in 30d

Description

The uploader works great while the app is in the foreground, but the uploads fail as soon as the app enters the background on iOS.

Here's some additional behavior I noticed:
Local notifications fire even if the app is in the background
The server sees the request being aborted by the client (app)
I save the files I attempt to upload in a sqflite db, and retry them from the background thread once they fail (rebuild the whole request), but this fails as well immediately.
The background handler is registered with the uploader from the main thread and does fire events even when backgrounded
`BGTaskSchedulerPermittedIdentifiers` and `UIBackgroundModes` are set to everything I could think of:
```


BGTaskSchedulerPermittedIdentifiers

com.your.app.identifier
com.premierpups.nurturekms
flutter_uploader
chillisoure.flutter_uploader
$(PRODUCT_BUNDLE_IDENTIFIER)
$(PRODUCT_BUNDLE_IDENTIFIER).flutter_uploader
chillisource.flutter_uploader.upload.background

CFBundlePackageType
APPL
FUMaximumConnectionsPerHost
1
FUMaximumUploadOperation
1
LSApplicationQueriesSchemes

https

LSRequiresIPhoneOS

UIBackgroundModes

fetch
processing
remote-notification



```

Any guidance / help is appreciated. Thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the uploader's behavior when the iOS app enters the background, then inspect the registered background handler and the Info.plist background settings shown in the report. Done means uploads continue successfully in the background without the server reporting that the client aborted the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, ios
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.