UILocalNotification in background Swift -


hello guys have question, how can receive notification when app closed? right when i'm near position i'll receive notification inside app , when i'll left position i'll receive notification, don't know how can receive same notifications when app closed. have used 3 functions:

// 1. user enter region func locationmanager(_ manager: cllocationmanager, didenterregion region: clregion) {     showalert(title: "enter \(region.identifier)") }  // 2. user exit region func locationmanager(_ manager: cllocationmanager, didexitregion region: clregion) {     showalert(title:"exit \(region.identifier)") }  func showalert(title: string) {     let alert = uialertcontroller(title: title, message: nil, preferredstyle: .alert)     alert.addaction(uialertaction(title: "cancel", style: .default, handler: { (action) in         alert.dismiss(animated: true, completion: nil)     }))     self.present(alert, animated: true, completion: nil)  } 

thanks lot.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -