background preloader


Facebook Twitter

Core Location Redux: Adding an NSTimer. Yesterday, I posted a tutorial on getting started with Core Location.

Core Location Redux: Adding an NSTimer

Be sure to check it out if you haven’t already. One of the comments we received pointed out that it would be a good idea to also have an NSTimer running to stop the Core Location updates should we never receive a location with a good-enough accuracy. This prevents the case where the device keeps Location Services powered up (such as the GPS and radio) and drawing power. Let’s take a look at how to implement this timer: First, setup an NSTimer class variable in the same class where you’re using the CLLocationManager: Be sure to include the corresponding @synthesize.

This method does two things. Lastly, this method invalidates the NSTimer object as we no longer need it. One last note: we also want to stop this timer should we unload our view (remember that we’re already stopping Core Location updates in our viewDidUnload method). Starting the Timer Great, now let’s kick off the timer.

SimpleGeo on the iOS: Getting Started Tutorial. Mobile apps that are geographically-aware are all the rage these days, and there’s a number of ways to jump into this new geo-world we live in.

SimpleGeo on the iOS: Getting Started Tutorial

One of the more interesting ones is SimpleGeo. They’re a startup in San Francisco that provides a number of APIs for doing geo-related things (like geofencing, and reverse geocoding which we’ll take a stab at today). Although they have a pretty decent iOS framework, there is next to zero documentation on how to use it. So I thought I’d write a simple app demonstrating how to do a reverse geocode (and retrieve the current weather) using SimpleGeo.framework. Here’s the process: Get the current lat/lng using the built-in iOS Core Location framework.Create an SGPoint using the lat/lng.Setup SimpleGeo with your API keysPass the SGPoint to getContextForPoint, with ourselves as a delegate. Core Location in iOS: A Tutorial. Developing iOS apps that can take advantage of the built-in GPS unit is a great way to add a new dimension to the user experience.

Core Location in iOS: A Tutorial

You can quickly make your apps location-aware (and able to find the current latitude/longitude coordinates) with minimal effort. This tutorial will walk through the steps involved in finding a device’s current position. How To Read and Write XML Documents with GDataXML. If you're new here, you may want to subscribe to my RSS feed or follow me on Twitter.

How To Read and Write XML Documents with GDataXML

Thanks for visiting! In my recent post on How To Choose the Best XML Parser for Your iPhone Project, Saliom from the comments section suggested writing a post on how to use an XML library to read and write XML documents, create your own objects based on the documents, and perform XPath queries. Introduction to MapKit Framework for iPhone Development. Maps are important part of our life.

Introduction to MapKit Framework for iPhone Development

We use them daily to find places and directions. The MapKit framework makes it easy for developers to implement applications which can make use of the maps in the applications. In this article we are going to introduce the MapKit framework for iOS programming. Concepts: There are several concepts that we must learn first before diving into the code. 3 Very Useful Accelerometer And Vibration Code Snippets.

The accelerometer can be one of the more confusing iPhone features to program.

3 Very Useful Accelerometer And Vibration Code Snippets

The input generally to be filtered, generally needs quite a bit of tweaking, and I’ve found that many people simply want too much out of the accelerometer. The compass addition allows you to take it to a level beyond the original iPhone, but reliable reading of complex gestures are still out of the question.


Vues. Données. Image. Son. Design. Social. In-app purchase. How to (almost) create your own iPhone OS framework. As of iPhone SDK version 2.1, it doesn't seem to be possible to package your own code into an iPhone OS framework. Messing around with OS X 10.5 framework build options didn't yield any useful results for us. The closest we got is a static library built for each platform (iPhone OS and the Aspen simulator), bundled up into one file (using a command line tool called 'lipo') and a set of header files that you would reference in order to use the library. Setting: You have several implementation files with the corresponding header files that you'd like to reuse in another iPhone app project. Forum Cocoa - Communauté francophone des développeurs Cocoa pour iPhone iPad iPod & Mac. iPhone internet connection check (WiFi, 3G, Edge) something like Reachability.h. Usage is really simple: if ([Connection isConnected]) { ... } else { ... } if ([Connection isConnected]) { ... } else { ... } Connection.m file: And this is the header Connection.h file: #import <Foundation/Foundation.h> #import <SystemConfiguration/SystemConfiguration.h> #import <netinet/in.h> #import <arpa/inet.h> #import <netdb.h> @interface Connection : NSObject { } + (BOOL) isConnected; @end.