Pregunta

We have an iOS application with questions and answers and we want to update its content from our server. Our current solution makes a request and update the content every time the user enters the application, but the content is changed rarely on the backend, so this requests are not necessary every time the user enters the app.

What will be the best solution to know when the content had changed on the backend so we can update the content on the iOS app?

We thought about the following solutions:

  1. Use Push Notifications to receive a push when the content had changed; Unfortunately on this solution the user can select "Don't allow" for push and also they are not 100% delivered, at least on time.

  2. Implement service on backend which returns if the content had changed; so when the app starts will make this request and if returns true, will fetch the content.

Thank you.

¿Fue útil?

Solución

You can use 'silent push notifications' that are available in iOS 7.0 +. These act in the same way as a push notification but allow your application to run small amounts of code when not loaded. You could set a flag here to tell the app tp update next time its loaded.

Alternatively, like you suggested created a smaller web call that just checks for new content without actually performing a fetch. You could also set these to only first on a specific day of the week/month and time you're content updates with this ?

I guess a combination of these two would cover all bases ?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top