After searching for some time, I found a few links that were helpful and went with this partial solution for my needs: http://mobileoop.com/getting-location-updates-for-ios-7-and-8-when-the-app-is-killedterminatedsuspended
So you can better understand my needs I will explain them here. What I need to do is send to my backend the user location from time to time (usually every minute). These locations must be sent also when the app is running in background and when the user terminates the app.
By following the above link, my app was able to send locations for only a period of time before the iOS terminated my app. The following text was printed in my phone log.
BKNewProcess: 0x14554b60; my.app.bundle.id; pid: 1539; hostpid: -1> has active assertions beyond permitted time: {( BKProcessAssertion: 0x14558a80> id: 1539-3EF171FD-FFAD-4E67-9CE6-1D615E9479AD name: Called by MyApplication, from -[BackgroundTaskManager beginNewBackgroundTask] process: BKNewProcess: 0x14554b60; my.app.bundle.id; pid: 1539; hostpid: -1> permittedBackgroundDuration: 180.000000 reason: finishTask owner pid:1539 preventSuspend preventIdleSleep preventSuspendOnSleep , BKProcessAssertion: 0x14658370> id: 1539-AA198F96-D8F4-4323-ABC2-E4447D9A4C87 name: Called by MyApplication, from -[BackgroundTaskManager beginNewBackgroundTask] process: BKNewProcess: 0x14554b60; my.app.bundle.id; pid: 1539; hostpid: -1> permittedBackgroundDuration: 180.000000 reason: finishTask owner pid:1539 preventSuspend preventIdleSleep preventSuspendOnSleep )}
So my question is: Is this the correct approach? If so, what could I be doing wrong?