Over the last few posts in our Core Location Framework series of tutorials one of the protocols we have relied heavily on is the CLLocationManagerDelegate. We haven’t gone through this particular protocol in detail though, which is why we are doing just that today. [Read more…]
CLGeocoder and CLPlacemark Tutorial – How to Find Location Information
Core Location is a powerful framework that allows your apps to use location information. Mixed with the MapKit, you can create some powerful location based apps. Yesterday I wrote a tutorial about creating a CLRegion so that you can monitor when you enter or exit that particular area and have your app respond accordingly, even when the app is closed.
Today, I want to cover two more of the classes available in Core Location. Today we will focus on the CLGeocode class along with the CLPlacemark class. The reason I combine both in this tutorial, along with the required CLLocationManager and CLLocationManagerDelegate is that the CLGeocode class requires CLPlacemark to make it useful. Likewise, the CLPlacemark, according to documentation, is typically created by a CLGeocoder object. [Read more…]
How to Use the CLRegion Class for Geofencing
When iOS 5 launched in October 2011, one of the features that caught my attention was location based reminders. Location based reminders provided the ability to connect a specific reminder to a specific location. An example could be, written in English, “When I arrive at the supermarket, remind me to buy flowers for my wife” or “when I leave work, remind me to call Fred”. When you approach a supermarket a reminder pops up telling you to go get flowers or when I leave the office, I get a reminder to call someone on my way home. Although GPS/location features have been available for most generations of the iPhone, mixing that power with context can make your app very powerful.
Of course, geofencing isn’t only for the built in reminders app that shipped with iOS 5. Apple has opened it up for developers to access. Today, we’ll be looking at how to work with geofencing which specifically uses the CLRegion Class as well as the CLLocationManager. A good place to start, as always, is the class reference. If you are unsure how to understand class references, methods, passing messages, properties etc… then take a read of this post and return back when done. [Read more…]