I
I
Ilya2019-06-16 02:33:33
React Native
Ilya, 2019-06-16 02:33:33

How to run Background Task on IOS?

Two months after the project at Expo, I realized that nothing sensible would come of it.
I had to rewrite the entire project on a clean RN. (that still pain)
The project stopped as soon as it came to background tasks.
Everything went smoothly on Android. If anyone is interested, this module helped me:
react-native-background-job
Unfortunately, this module does not work and is currently not compatible with iOS.
It is expected that he will start working on IOS 13. (Information from the RN forum) I
started trying analogues. Tried this one:
react-native-background-fetch
But it only fetches. The task of my task is to show notifications. He can't. Earlier in one of the topics they suggested:
react-native-firebase
Like, he somehow pushes notifications when the app is turned off. In my case, he is unlikely to help. We have our own server.
There is also some react-native-queue . But I didn’t really understand how it works. It doesn’t work for me.
Maybe someone faced such a problem. How did you solve it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-06-16
@s_panteleev

offtopic

Ну зачем же так категорично?)
Для своих задач Expo подходит отлично, для специфичных – да, нужен чистый RN.
Боль в expo eject?
And what did not suit the BackgroundFetch built into the expo and local notifications ?
If you only need background tasks to receive notifications, try just sending these notifications from the back with regular guns - they work both when the application is running, and when it is in the background, and when it is completely closed. Especially if there is a server that can perform this task (and not just a local application)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question