Search code examples
iphoneiosnotificationsreachability

Receiving reachability notifications while running in the background?


I'm having trouble with receiving reachability notifications while running in the background as a location-based reminder app. Has any one succeeded in getting this to work and if so, how?


Solution

  • I needed to use background task bracketing to get this to work. Reachability needs an active run loop and using a background task seems to be one way to provide this in the background. Not sure if there are other/better solutions for this.

    Also if you're using RestKit it already comes with a Reachability Observer which is a modified version of Apple Reachability sample code.