Introduction
Tappity is a framework for remote controlling an iPhone app running on the iPhone Simulator, supporting multi-touch, acceration, as well as location and compass signals.
Tappity consists of a client app and a server-side library, which must be linked with the iPhone app one intends to control. The server lib transparently hooks into UIAccelerometer and CLLocationManager to relay the data. It can also hook into EAGLContext for visual feedback for full-screen OpenGLES apps, as UIKit's window compositing doesn't capture GL content, when attempting to draw a window into an image.
Download
The source code can be freely downloaded and used, it is available under a BSD-style license, also reproduced below. Comments, bug reports, and patches are welcome, please send them to me.
The source archives are labelled with the revision number of the source repository, the higher the number, the newer the release. Some releases might not be in the archives.
You can use bzr to check out the current source via
bzr co http://code.monkeyinthejungle.net/bzr/iphone/common bzr co http://code.monkeyinthejungle.net/bzr/iphone/tappity
You need both the common and tappity repositories. You can also just browse the source via a web interface.
License
/* * Copyright (c) 2009 Dömötör Gulyás. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
Instructions
After downloading the source code, I recommend including tappity.xcodeproj as a subproject into your target app. The project file contains targets for building the standalone client app, as well as client and server libs. Link the target app with libTappityServer.a.
For the client app, you will need to change the bundle identifier on the tappity target to something for which you have a valid provisioning profile, if you wish to run the app on an iPhone or iPod, which you most likely do.
Watch out, there is a catch: You must set "OTHER_LDFLAGS = -ObjC" in the build settings of the client/target app, so that the library can initialize itself automagically, or you need to call initTappityServer() explicitly.
Should something go wrong, I can often be found on IRC, in the channels #macdev and #iphonedev on freenode.net.
Known Bugs
-
The touch keyboard isn't captured in the feedback images.
Non full-screen GLES views' visual feedback isn't positioned correctly.
UIKit views are only fed back until the first GLES view is drawn.
The client interface sucks.
This list isn't exhaustive, so if you happen to find any more bugs, please let me know.
Change Log
r62
-
adds rescaling touches for iphone->ipad events
r61
-
fixes bug in server side data reception
feedback images are now reduced to a fixed size to improve network load
variably sized GL framebuffers now supported
adds 'placed screenshot' in addition to raw screenshot message, for non full screen GL
no longer sends suspend/quit events to the server when client is quit, which caused the server to quit, too, even though that was most likely not intended
r59
-
fixes bug where client ignores all incoming data when visual feedback is disabled (thanks to Frank C. for pointing that out)
r58
-
fixes some tappity build issues
CLLocationManager swizzled methods made to work standalone, too, when the server lib is included in device builds
fixes bug in sending thread condition wait
r54
Initial release.
Why it's Free
I felt like I have created something useful, but it's hard to put a price on it. However, if you feel like this is worth something to YOU, don't hesitate to get in touch, and I'll let you know where to wire the money.
Thanks
Thanks to Andy Korth for being the first victim, and Keith Bauer for pointing out __attribute__((constructor)).