Notification from Background Geofencing in iOS 5?

2020-03-27 05:37发布

问题:

Is it currently possible to create an app that "reminds me when I get to work, Siri" right now ? Or the app needs to be running to apply geofencing ?

回答1:

Yes, it is possible by using the CLLocationManager's startMonitoringForRegion which will call your App when entered/left a certain "fenced" geo-area.

BUT since the user's location is/will be used, the location icon will appear for as long as this call has yet been canceled (by the matching stopMonitoringForRegion)

(on iOS6 this icon will be replaced with a different location icon for "regional" location instead of regular location use - looks like an outline of the current icon)