Using CoreLocation.framework
With today's always on, always tracking social media apps, using and tracking the user's location has become a standard feature of many apps. In this section we're going to explore a new framework from the inside out, by jumping straight to coding. This framework is CoreLocation
, which as the name might imply is going to give us the tools we need to access location services on a user's device.
We're going to be switching back to our Snippets
application and adding the functionality for the user to attach their current location to a new snippet when they create it. You can continue to work from your old Snippets
project, or if you had any problems with yours you can grab the final version from the resources folder of this chapter, because again, the folder will have the finished work from this chapter.
Note
Before we get started, make sure to link CoreLocation.framework
to your Snippets
project like we did in the test project earlier in the chapter.