VKLocalNotifications
This project covers all the requried code to trigger UILocalNotifications. It can be helpful when you want to trigger a Push Notification when a user reaches a particular location. Does not need internet connection.
Demo (App in background):
Demo (App in foreground):
How to Test:
-
Install the app on the device.
-
Launch the app and tap on Trigger Local Notifications Button.
-
Keep the app in foreground/ background/ kill the app.
-
Move out of the initial location to around 300-400 metres and get back to initial location.
-
That's it. You see the UILocalNotification pop ups as shown in the attached GIFs.
Addendums to info.plist :
Key : Privacy - Location Always and When In Use Usage Description
Value : Need your location to trigger notifications
Key : Privacy - Location When In Use Usage Description
Value : Need your location to trigger notifications