Chaudhry Talha
Chaudhry Talha

Reputation: 7888

How to save a location on Google Map in ios

I've implemented Google Maps in my app. Now I want user to store some places locally using my app. They will be only visible to user it's more like his personal data. User can tap on a location on the map and it will save that coordinates and add a marker to that place.

Now I've been able to do this: If the user taps on the map it adds a marker and NSLog the coordinates.
So how can I save this location into my app? So that I can use it to perform other tasks even if the application is not open this remains saved.

Upvotes: 1

Views: 791

Answers (1)

Glorfindel
Glorfindel

Reputation: 22651

There are many options to save data in iOS apps; CoreData, SQLite, local files: https://developer.apple.com/technologies/ios/data-management.html

If you don't want to store that many data, NSUserDefaults is probably the way to go: http://code.tutsplus.com/tutorials/ios-sdk-working-with-nsuserdefaults--mobile-6039

Upvotes: 2

Related Questions