Backgroung service in Ionic app

I am trying to use Cordova Background Geolocation to send my position to the server in the background. But when I put my app in the background image after a while, it stops working. So I tried the BackgroundFetch service https://github.com/christocracy/cordova-plugin-background-fetch but doesn't work: error:

You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.

      

how can I add a selection to the list of supported UIBackgroundModes in my Info.plist?

+3


source to share


1 answer


Just do it the way it is. Search Info.plist in your project and add key / value pair like this,

<key>UIBackgroundModes</key>
<array>
    <string>fetch</string>
</array>

      



Once you do that, rebuild it and the warning is gone.

+11


source







All Articles