react-native-background-fetch: Background Fetch Not Working [IOS]
Your Environment
- Plugin version: 3.0.3
- Platform: iOS
- OS version: 13.2.3
- Device manufacturer / model: 11 Pro
- React Native version (
react-native -v
): 0.61.5 - Plugin config just timere 15
Expected Behavior
Work on background
Actual Behavior
When close app console says and not working on background. Can’t end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
Steps to Reproduce
- start app
- background Fetch config started on componentDidMount
- Closed app
- And error fired
Context
Work on background fetch
Debug logs
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 54 (21 by maintainers)
I don’t know exactly the code packaged in this library. As I can see, when you used Debug Simulate Background Fetch event. You will receive taskId as “react-native-background-fetch”. For my understanding, this is TRADITIONAL taskId, base on this taskId whenever we call “BackgroundFetch.finish(taskId)”, the completionHandler from delegate “performFetchWithCompletionHandler” should be called to complete TRADITIONAL background fetch task.
about taskId “com.transistorsoft.fetch” which is required in the setup process. It is only a custom task defined and required from iOS 13+ to schedule a task.
There are 2 cases that can be a reason for your issue, that you did not receive events:
BR,
I have no idea what you’re doing wrong.
In this repo is a fully functional /example app. Clone this repo and run the /example
@balwinder4264 Please edit your post and syntax-highlight your code by wrapping in triple-backticks.
Hello again,
already verified setup but still not work 😕