본문 바로가기

Programming/Swift

iOS: Tracking Visited Locations

Introduction

iOS has very powerful APIs for tracking user locations and working with maps. You might be making an app for your local café and want to notify the user of special offers when they are nearby. Or, you’re making a music player and you want to start playing some bouncy beats when the user enters a gym. Tracking location all the time, however, can drain a battery really fast! In this Core Location tutorial, you’ll learn how to use some of the lesser-known, but very powerful, capabilities of the framework. You’ll learn how to create an app that logs user movements during the day but also doesn’t drain much of a device’s battery.

 

In this tutorial, you’ll make a travel logging app. Imagine you’re traveling to a new city. Instead of keeping a journal, this app will automatically track locations you visit, so you can remember them later and compare them with your friends.

Here’s what this app will do:

  • Track the user’s location, even when the app is not open.
  • When the app logs a new location, send the user a local notification.
  • Save those locations in a file.
  • Display a list of logged locations.
  • Display a map with user location and logged locations.
  • Allow users to manually log their current location.

www.raywenderlich.com/5247-core-location-tutorial-for-ios-tracking-visited-locations