I am trying to retrieve user’s current location to see how far all the events are from their current location.
So on page load I have done this:
Request location authorization ( for this I created a page variable with location manager type variable)
Request location update ( for the location manager I used the same page variable in step 1)
2.1 When location is updated.
Set value of current location (type CLLocation) to Event data location updated > recent location
2.2 when location update failed!
So i always get the alert that the location update failed. Not sure what i am doing wrong. I have followed all of the instructions.
However in the Events page > when the cell is loaded I have this steps that take place!
- Create a location object
- Calculate distance
3. Set value
I get this as the result
< The last line of every event is the distance away text >
So I am confused if its calculating the distance or not.