Get Real Time Location in Xcode Provide an iOS App with GPS Coordinates

  • Tihomir Radev

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

You're watching a preview of subscription content. Log in to check access

Program basic iOS apps capable of retrieving and displaying the user’s device location. You’ll start by learning the basics of programming a simple tracking app. You will then see how to add functionality to your app for retrieving GPS data from the device’s internal hardware. Next, you’ll incorporate that retrieved information into the app so that the coordinates are accessible and usable by your app. Of course, the end user will want something a little more visually appealing to work with than just raw coordinate data. So you will learn to program a basic map and then incorporate the real-time location data your code is feeding into it. You’ll learn to properly format everything for every given iPhone display so that it’s appealing and workable for the user.

After completing this video, you will be able to create fantastic tracking- and map-based apps for iOS.

What You’ll Learn

  • Reach the GPS module on an iOS device to get location permission

  • Display coordinates in the proper format for a given screen

  • Add a map so the user can see not only coordinates but a location on a map

Who This Video Is For

Developers with experience coding in Xcode and Swift who want to add real-time location information into their apps.

This video will teach you to program basic iOS apps capable of retrieving and displaying the user’s device location.

About The Author

Tihomir Radev

Tihomir Radev is a freelance mobile app developer operating in Bulgaria. He has years of experience as an independent developer and has contributed to corporate and industry projects. He also has indie projects of his own available on the Google Play and App stores. Tihomir creates Android Studio and Xcode tutorials on YouTube, in addition to his development work, to give back to the development community.


Supporting material

View source code at GitHub.

About this video

Tihomir Radev
Online ISBN
Total duration
25 min
Copyright information
© Tihomir Radev 2021

Related content

Video Transcript


Hello, my name is Tihomir. I’m going to show you how to build simple app for Apress to show you your GPS coordinates and location on the map. In the first part of the tutorial, we will create a blank Xcode project for an Apress app. And then, we will start building the user interface.

Next, I’ll show you how to connect the user interface with the Swift code so we can add functions to our UI elements. We will make some little design changes, and we will prepare the privacy dialog for the location. Next, we will create a simple function to show the location permission dialogue, we will set up the delegate methods for the location, and start locating and displaying the coordinates in plain text.

Then, we will be able to first run our app in the simulator. I will explain you how you can simulate location changes on your device without moving. Next, we’ll be ready to add the map on the screen, and show our exact location with a pin. In the last part, will fix some bugs, polish some things and do final testing of our app. In the end, we will have a fully functional, real-time, location tracker.