title: Create local location based notifications in swift
body: <p>I'm a relatively new swift developer and I've heard in iOS 8 you can send local notifications based on a users Location. I have had a look at some code, particularly this one to create simple time based local notifications.</p>
  
  <pre><code>var leftNotification1:UILocalNotification = UILocalNotification()
      leftNotification1.alertBody = "NotidicationA"
      leftNotification1.repeatInterval = NSCalendarUnit.CalendarUnitHour
      leftNotification1.fireDate = NSDate(timeIntervalSinceNow: 900)
      UIApplication.sharedApplication().scheduleLocalNotification(leftNotification1)
  </code></pre>
  
  <p>I have also seen that you can replace fireDate with a location trigger like something like this:</p>
  
  <pre><code>var localNotification:UILocalNotification = UILocalNotification()
      localNotification.regionTriggersOnce = true
      localNotification.region = CLCircularRegion(circularRegionWithCenter: CLLocationCoordinate2D(latitude: 37.33233141, longitude: -122.03121860), radius: 50.0, identifier: "Location1")
      UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
  </code></pre>
  
  <p>I know with locations you need permission from the user and poll for locations and that. I am not aware of how to do that sort of thing and link it with that code. When I just enter this code into my ViewDidLoad like I do for the top one it doesn't work for obvious reasons, the CoreLocation isn't registered and its not polling for locations. If someone could inform me about how to get this code working or even better give me an example code to take a look at that'll be great. Thanks.</p>