How to get the user's current location by code in iphone app?

Gopinath picture Gopinath · Feb 20, 2012 · Viewed 16.4k times · Source

I want to get the user's current location from my iPhone app. I want to show the user's current location like country name, latitude, longitude information in my app. And also i want to show the location in Google map also. I have tried Google search also, but can't get the exact answer. I have get the info that was to use CLLocationManager in my app to track the location. How do i use this? I have download one sample app from Apple Documents. Here is the link: https://developer.apple.com/library/ios/#samplecode/LocateMe/Introduction/Intro.html

Can you please help me on this? Thanks in advance.