iSimulate – Testing Multi-Touch, Accelerometer and GPS using Xcode Simulator

I recently spent a few hours working with iSimulate, an interesting combination of an iPhone application and a packaged library you add to an Xcode project. iSimulate provides a unique solution to the lack of support in the Xcode simulator for exercising multi-touch events, accelerometer data as well as GPS location information.

The timing for working with iSimulate couldn’t have been better – I’m in the midst of testing an application that uses the accelerometer as the primary input mechanism. Unfortunately, with the iPhone simulator alone, there is no built-in mechanism for capturing and processing accelerometer data – welcome iSimulate.

The application I’m building is a simple shoot’em up gun simulation, you’ve seen any number of these on the App Store. There are a range of guns to choose from, and each has a unique loading sequence, all tied to movements of the device. For example, the grenade launcher, loads with a flick of the wrist, mimicing how one would flick a pistol to open the chamber. There also is an assault rifle that loads in two steps, sharp thrust down followed by the same movement up (think of a pump shotgun). To fire each weapon, you point the top of the phone at your target, and flick you wrist back, similar to the effect of a recoil.

Given the focus of my work on the above application, my testing of iSimulate was limited to the accelerometer, which consisted of running through all the simulations (loading and firing) for each gun in my application.

Using iSimulate requires purchasing an iPhone application of the same name, and installing a free SDK library. Installing the SDK was a walk in the park, it took all of 2 minutes. Once you rebuild and launch your application in the simulator, you start the iSimulate application on your iPhone. The two will sync-up and you are ready to go, you can now use a real iPhone to test your multi-touch, accelerometer and GPS code.

The video that follows is a screen capture of my iPhone application running with the Xcode simulator, with all accelerometer data coming from iSimulate running on my iPhone. It worked without a hitch and made for a speedy code, build, test cycle, as the iPhone application is loaded into the Xcode simulator, versus the actual device, cutting down the load time significantly.

One update that I would welcome to iSimulate, if technically possible, would be support for the built-in camera. This would have been very handy when I was working on iHuntNet and iFishNet, where a photo was taken of a trophy “catch” (fish, deer, etc) and the device was used to determine the size of the “catch” by comparing against an object with a known size (dollar bill, beer can, etc). In the Xcode simulator I could take a photo, however, the resulting image was blank so testing of the scaling code for size determination could only be done on a device. Having the means to test in the simulator where an actual iPhone takes the photo and makes this available to the iPhone app, would of saved oodles of time in the testing process.

I found iSimulate to be a very creative use of technology to solve a real-world development issue, namely, no support for testing accelerometer, multi-touch and location code within the Xcode simulator. If you are working with any/all of these technologies, I highly recommend you take a closer look. You can learn more about iSimulate here: iSimulate.

Comments are closed.