T
T
Tkas2019-06-30 20:52:00
iOS
Tkas, 2019-06-30 20:52:00

How to send a push notification from an unloaded application when a certain event occurs?

Description . There is an application in which the user saves his data in Core Data (food in the refrigerator). Each product has its own expiration date.
Task . Make it so that the user receives a push notification on his iPhone that, they say, the expiration date of some product is about to expire (let's say 1 day before the expiration date).
Question . How to do it?
Since notifications should also come at the time when the application is unloaded from memory, APNs must be used. Do I understand correctly that user data will also need to be duplicated somewhere on the server (for example, using Firebase)? If yes, then:
1. How to authorize a user? In similar applications, you do not need to register in any way or use Facebook or Google accounts to log in, I need the same.
2. How to send a push notification in Firebase 1,2,3... days before the expiration date (how is it all set up)?
3. As far as I understand, I do not need to store all the data entered by the user remotely. The name of the product and its expiration date are enough (photo, quantity and all that can be omitted).
The question is large and complex, so I will be glad for any clues (for example, at least some links where to dig).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NSA-bot, 2019-07-01
@Tkas

You can use not push notifications, but local notifications that will be triggered after specified periods of time (including when the application is unloaded from memory). And then you do not need to store anything on external servers. There is a long good video on YouTube on Local Notification, where everything is explained in detail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question