I’ve got an iPhone app that’s location aware (well, I’d LIKE it to be! 😉 but, for some reason, the location notifications never fire.
I’m pretty good with iPhone SDK (30+ yrs dev, iPhone since day-1), and I thought I followed all of the documentation and samples to set everything up correctly. However, when I set it to notify when I enter/leave regions — say, home and the grocery store — then go back & forth between the two spots, I don’t get the notifications.
I’m sure it’s something super-simple that I missed, like “you have to register as a notification-aware app with Apple” (you don’t, right?!), but I’m just not seeing what it is.
What are some simple notification-aware-n00b mistakes that can cause the app to just plain not-get-notifications?
Any hints?
While we’re at it — is there a good way to test/debug this stuff in the Sim, say, by injecting “now pretend my location is over HERE” type events? (I know: 2 questions. Hey, they’re closely related!)
Thanks!
(Yes, yes — of course this is all on iOS-4, with the 4.latest SDK…)
The thing I was missing: regionMonitoringAvailable returns NO on iPhone 3G and 3GS. D’oh!
NOTE: You can sort-of hack around this on 3GS with startMonitoringSignificantLocationChanges, but even that’s not available on 3G.
More on that here:
http://longweekendmobile.com/2010/06/30/location-region-data-in-background-on-ios4-iphone/