Update user's location in background (iOS)

2019-09-14 01:26发布

问题:

I'm building an app that takes the user's location and checks if he's near one of his friend's house (all the friends addresses are stored in NSMutableArray from his contact list), if he is, it sends him a push notification.

Now, I'm trying to figure out how I can get the user's location when the app is in the background (and even after the user killed the app from the multitasking screen).

I need to analyze his location and check if he is near one of the addresses on the array.

Does anybody know how can I get the location? Thanks!