Using KML file for iOS Simulator

(Before beginning, there may be other ways to use KML. I am just beginner in iOS programming and this is how I work around.)

XCode allows to simulate the locations using GPX file type.

One of location tracker, Google Latitude, allows to download recorded locations to KML file type.

To use KML file for iOS Simulator, you can just convert KML to GPX file.

Simple instructions below explains how to convert KML to GPX and use GPX in iOS simulator.

1. Export KML file from Google Latitude

2. Open http://kml2gpx.com/ and convert KML to GPX

3. Add converted GPX file to XCode project.

4. Open GPX file and remove below parts

5. Change trkpt and Replace to wpt in GPX file

6. Save GPX file and Run your project

7. On Debug Area, you can find GPS icon. If you click GPS icon, you can see added GPX file on the list. Just click the file and you will see simulator is simulating GPS locations in GPX file.

Screen Shot 2013-06-23 at 12.56.39 AM

 

 

 

 

 

 

 

 

In this tutorial video, the application is from Chapter 62 – “iPhone iOS 6 Development Essentials” written by Neil Smyth.