skip to Main Content

Is there any way to get a call back in the iOS application in offline mode, even if the app is in the background or not running state?

What I meant was – Is there a way to perform a particular task in the app (e.g. scheduling local notifications) at scheduled time, if the app is in background or not running state?

2

Answers


  1. I would recommend using Firebase[1]

    Once an app has connected to Firebase, the client will cache data locally and be able to access data where there is an outstanding "on" callback even after a network connection is lost.

    You can enable disk persistence, your app writes the data locally to the device so your app can maintain state while offline, even if the user or operating system restarts the app.

    You can enable disk persistence with just one line of code.
    Database.database().isPersistenceEnabled = true

    [1]https://firebase.googleblog.com/2015/05/announcing-mobile-offline-support_93.html

    Login or Signup to reply.
  2. Creating a Notification Request
    init(identifier: String, content: UNNotificationContent, trigger: UNNotificationTrigger?)
    Creates a notification request object that you use to schedule a notification.
    UNNotificationRequest

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search