gps alert the user when reaches the particular location - ios

I am developing the location based application. I just stop the location manager when user reaches the particular location(which is selected by user). I have tried in all combinations but no luck.Please help me on this.
Thanks in advance.

What you are looking for is called Geofencing.
It's built-in in CoreLocation and really easy to use.
Have a look at this tutorial.

Related

Does Location matter while using cloud Firestore?

In a hurry I put a wrong location in my cloud Firestore setup. I am not allowed to change it. Currently I'm staying in Singapore but the location I have put is US. Can someone help me what should I do? What will happen if I continue with that location for my database.
Thanks
To reduce latency you should take a location near you or more precise your users. Unfortunately you can't change the location of a firestore database once selected. What you can do is to create a new one and set the location of that one near you and your users. Just don't forget to replicate that in you firebase configuration in your app.

get location data when location services are off by ios

Is there any way to get location of the iPhone without demanding location services from the user? It should not be really accurate.
edit: I have no problem with implementation of location services. I try to find an alternative way
No this is not possible.
Apple has made location service abstract so you can't really see which technic is used. Thus if the user turns off the location service you can't get the location any other way.
There is however the option to check the user IP and get a very rough location.

Foursquare API: Consider close proximity as check-in

I've been looking into the Foursquare API on iOS (through das-quadrat). I'd like to figure out if a user is at a specific location. I know how to find it and I can actually get it. That works.
How can I now tell if the user is actually close enough to the location to consider his close proximity as a check-in (I'm not interested in actually checking him in the Foursquare way)? It's just that I want to know that a user is at a venue of a category I'm monitoring. I know that I can just calculate the distance between the user's location and the venue's location and consider every distance less than, say, 15 meters a check-in but I was wondering if there's is a more elegant solution, maybe even an API endpoint that I'm just missing.
I would guess that the real time API is best suited: https://developer.foursquare.com/overview/realtime
Allows you to register for notifications, thus Foursquare does the heavy lifting for you.

How to get GPS coords on button click ? (most simple)

i tried to implement GPS functionality into my app using the few tutorials.
I do it by using this:
http://www.tutorialspoint.com/ios/ios_location_handling.htm
Gps coords are obtained after start of the app.
But problem is that, i am not able to call GPS coords again after button click, it means somethong like:
- (IBAction)getGpsCoords:(id)sender {
[[LocationHandler getSharedInstance]setDelegate:self];
[[LocationHandler getSharedInstance]startUpdating];
}
How should be right solution? I will glad id somebody can explain how to do it better (with some good example or link).
Thanks for any advice.
It's not really clear what you're having difficulty doing. You don't say what LocationHandler is, but the flow is pretty much correct:
Start location services
A delegate method gets called periodically as the location information changes
You can't just tap a button and get the current location; that's not how the API works. I suppose you could start location services when the app starts and record the current location in a singleton (like your LocationHandler class?) and just call that when you press the button?

how to find users location when a photo is taken and display+save in a UIMapView

was just wondering how i would basically go about finding the user's location and then displaying this in an un-editable UImapView. This would be used to location stamp photos and videos taken within the app and must still be displayed whilst the app is open.Just as a disclaimer i am not asking anyone to sit and write this code for me (but feel free to if you want) i was just hoping that someone else may have already done this and so might provide their code as a reference. thanks for any help you can provide
As rokjarc says, you need to break this into pieces.
The camera app that's built into iOS already has the option to save location data into your photos.
Are you saying that you want to be able embed location information in pictures that you take from within your app?
You have at least 3 different things you need to read about:
CLLocationManager. You would create an instance of the location manager and ask it to start updating your location. It takes a while to settle down, so you would want to start it when your app is launched. You'll want to fine-tune the settings so it only notifies you on fairly large location changes to conserve battery. The location manager is an async library, so you start it updating, then wait for it to notify you, and parse the location updates it gives you to make sure they are current/accurate enough.
Next, map kit. You would need to add an MKMapView to your app's views, and set it up to display to a window. you could either use the option that shows the user's location automatically, or use location manager information to change the map region and/or create a map annotation showing the user's current location.
Third, you will need to figure out how to save location metadata to the images you take. That's not something I've done, so I don't have any specific help for you.

Resources