cllocationmanager - iOS Location Reminders "While Using" the app -
I'm working on a new app that leverages the use of location-based reminders via geofencing.
As far as I understand, in order to do this, the application must request through authorization:
CLLocationManager.requestAlwaysAuthorization ()< / Pre>So far, it works as expected, but I'm curious that for example "Reminders" app, and others like Omnifocus only "when in use" or "<">
< Previous>locationManager.requestWhenInUseAuthorization ()
Those apps can still provide location-based reminders without authorization requests Are able. I have also noticed that these apps will not trigger the "location" icon on the status bar in the background bar, which does my app distribute these notifications to these apps?
Thank you!
Received reply by looking at the WWDC CL Location Update for iOS 8 :
Reminders and similar applications always work without the need for AdWords because they take advantage of UILocalnotification outline changes since iOS 8, this field based trigger Supports
So now if you do not need to "launch" your app in the background and do something while changing the location and just submit a notification, you just use UILocalNotification and RegionBased Triggering.
@NSCopying var area: CLRegion! In IOS8, there is a 'field' property in the UILoclonification, which corresponds to a CLRegion object. From Apple Docs: Specifying a value for this area (reason) Due to the local notification delivery, when the user crosses the area limit, this field defines itself as if the user enters Whether it comes out of the field or not, notification starts or not. The default value of this property is zero.
You can assign a value to this property or fireDate property but not both. Trying to schedule a local information that raises an exception in both the field and the date of the fire.
Comments
Post a Comment