Forum Xamarin.iOS

How can I call a periodic Task when my app is inactive?

JasonixDevJasonixDev Member ✭✭

For Android I call the AlarmManager with a Repeating Timer.

How can I solve the whole thing for iOS?
When I enable the BackgroundFetch it dosent work..

Can anyone help me?

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    There are server ways to implement periodic background task.

    1. Pushing Updates to Your App Silently

      You could deliver periodic silent notifications and wake up your app in the background on the user's device , everytime it will call the method application:didReceiveRemoteNotification:fetchCompletionHandler.

    2. Updating Your App with Background App Refresh

    • Call setMinimumBackgroundFetchInterval: to set periodic time .
    • Execute background task in the method application:performFetchWithCompletionHandler:
      [Note]The feature is available after iOS 7.
Sign In or Register to comment.