iiFreeman
iiFreeman

Reputation: 5175

iOS 8 geofencing handle the app opened from lock screen icon

I'm using geofencing in my app by calling this lines of code in needed order and all works good, I can see the icon of my app appears on the lock screen when device enters the tracking region:

[self.locationManager requestAlwaysAuthorization];

[self.locationManager startMonitoringSignificantLocationChanges];

[self.locationManager startMonitoringForRegion: [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(airport.latitude.doubleValue, airport.longitude.doubleValue) radius:AFLLocationManager_geofencingTrackingRegionMetersRadius identifier:airport.code]];

and the question is How do I handle the event when user actually used my app icon on the lock screen and started/resumed the app from the lock screen? I believe the UIApplicationLaunchOptionsLocationKey in the launchOptions dictionary can be used for app launch from lock screen event, but what about app not launching, just becomes active? Thanks!

Upvotes: 0

Views: 633

Answers (1)

Ivan Felipe Garcia
Ivan Felipe Garcia

Reputation: 1

Apparently there are two events that can trigger and show the app icon on the lock screen follow link

Upvotes: 0

Related Questions