12

I try to use cordova Background Geolocation to send my position to a server in background. But when i put my app in background after some time it stop working. So I tried BackgroundFetch service https://github.com/christocracy/cordova-plugin-background-fetch but doesn't work: the error is:

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 fetch to the list of your supported UIBackgroundModes in my Info.plist?

1 Answer 1

26

Just do it as it is. Find the Info.plist in your project and add a pair of key/value like this,

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

Once you did it, rebuild it and the warning will disappear.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.