Hey guys, I could really use some help with this. I’m having trouble getting my app to send notification when the app is killed. It will do it when in the background or when the phone is turned off but not when it is killed. I followed this tutorial to the dot: http://developer.estimote.com/proximity/ios-tutorial/#add-an-estimote-monitoring-manager
I also read this post here: https://community.estimote.com/hc/en-us/articles/203253193-Pushing-notifications-from-iBeacon-when-the-app-is-in-the-background-or-killed that showed exactly how to do it but that is in objective C correct? (Sorry I’m a bit of a beginner)
There was this one post I saw that said that the proximity app template does this but I couldn’t get it to work. This was the post: Get my app to detect beacons while in the background
Is there something I’m missing? What do I need to add to my app to make this work? Help would be GREATLY appreciated as I’ve been stuck on this for a while now.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
ESTConfig.setupAppID("weattendance-2lq", andAppToken: "a65fb0eb6418d444bc866aa8b5d44e15")
self.monitoringManager = ESTMonitoringV2Manager(
desiredMeanTriggerDistance: 2.0, delegate: self)
self.monitoringManager.startMonitoring(forIdentifiers: [
"2fe9f9eab6f63a83403d83d5fdd5f338",
"600b8a212b5931dd7dc79b47566a032f"])
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound]) { (granted, error) in
print("notifications allowed? = \(granted)")
}
return true
}
This is what I have in my app delegate right now and according to the first community post, code for monitoring in background should be there but I don’t know what it is in swift.
If anyone could help me figure out how to make this work it would mean the world to me.