Wait, what the heck is geofencing? No, it's not some virtual sword fighting app for your phone. Geofencing, or a geofence, is exactly what its name implies - a virtually fenced-off geographic location. When this concept is applied to mobile phones, it refers to a device's ability to receive automatic alerts or notifications when entering, leaving or moving within a specific geographic area. Location Labs, providers of location services for mobile developers, announced earlier this week the release of its library that will allow iPhone developers to build geofencing apps thanks in no small part to new features included in the new iOS 4.0.

Location Labs' Geofence Library for iPhone

As the company points out, location services on mobile devices have been hindered both by differences in location technology standards, and the significant drain on the device's battery caused by its use. With the introduction of background applications with iOS 4.0 and increased battery performance in the new iPhone, Apple has created a fitting platform for geofencing apps, the company says.

One aspect of background location capabilities in the new OS is and API that notifies apps "based on configurable accuracy and distance change filters," which is a highly-accurate "always on" battery drainer, says Location Labs. A new service, the "significant change location service," uses less power but the lower accuracy and frequency makes geofencing useless, delaying notifications by several hours.

"With the iPhone, we employ a combination of [...] the standard and significant change location services, intelligent interaction with the iPhone backgrounding and suspending logic as well as local awareness of proximity to the geofence boundaries," the company said in a blog post Wednesday. "Together these allow us to offer a high quality firing latency guarantee (measured in minutes) while keeping impact on battery life to a minimum."

What This Means for Location Apps

To get an idea of how geofencing technology could improve on existing location-based applications, just look at the current popular apps. Apps like Foursquare and Gowalla could implement this infrastructure to allow users to automatically check-in when entering the geofence of a particular location.

I can't even count the times I've been out and forgotten to check-in at various locations, robbing myself of precious Foursquare points. With geofencing, I could have been automatically checking in as I went from place-to-place, or perhaps a push notification would have reminded me after I was within the perimeter of the geofence for a certain amount of time.

Additionally, geofences could allow for a feature of location apps that Robert Scoble advocated for earlier this month. As Scoble points out, it is helpful to location app users if they can tell if their friends are still at a location, and determining how long users spend in businesses can have a significant impact of location-based marketing.

"For instance, I hate shopping so I'll only spend four minutes inside the Gap, if I go at all. But there are many people who will linger there for hours," he said. "If you are another clothing store, which customer is more valuable to you to get to come to visit your store? Me or that other customer?"

Other interesting ideas for geofences include connecting mobile devices to house lights or air conditioning units to automatically activate them when users approach their homes. Friends could even be notified when they are within a certain distance of one another. The possibilities for geofencing applications are enormous with this new library from Location Labs.

Photo by Flickr user KWDesigns.