Be sure to check out the sample source for Flurry, Paint, and this one from AdMob:
// this is generated for your module, please do not change it
// this is generated for your module, please do not change it
#pragma mark Lifecycle
// this method is called when the module is first loaded
// you *must* call the superclass
NSLog(@"[INFO] AdMob module loaded",self);
// this method is called when the module is being unloaded
// typically this is during shutdown. make sure you don't do too
// much processing here or the app will be quit forceably
// you *must* call the superclass
URLs are one of those things about the web that we often take for granted. As developers, we can request resources and send users to other destinations just by knowing a location on the Internet.
The mobile landscape is a bit different. While most mobile applications speak Web, consuming REST-ful APIs and other web resources, quite often they’re little silos of vertical, site or brand-specific functionality. Did you know that for iOS developers Apple makes it possible to register your own URL scheme, as in this Gowalla example:
As handy as these custom iOS URL schemes are in launching other applications, mobile developer Greg Pierce wants to the community to extend the idea of custom URL schemes and adopt a standard for inter-app communication. X-Callback-URL is a draft specification for one-way and two-way communication between mobile apps on iOS and looks like this:
scheme: The app’s custom URL scheme, terminology in the above example
host: Callback URLs are identified by a host value of x-callback-url
version: The X-Callback-URL spec version, currently 1.0
action: The action to perform in the target app. In this case, Terminology will perform a lookup action.
x-callback parameters: Optional. Not used in this example
action parameters: The parameters to pass to the executing action, “a good deal” in this example
This approach provides a robust way to not only launch an app, but also request that the app handle an action, which may or may not have a UI associated with it.
The real power of X-Callback-URLs lies in two-way inter-app communication. By using the x-callback parameters in the spec, we can ask the target app to call us back on our own URLs, even handling success and error scenarios. Sort of like custom HTTP headers, these callback parameters are identified with an x- namespace:
x-source : The friendly name of the source app calling the action. If the action in the target app requires user interface elements, it may be necessary to identify to the user the app requesting the action.
x-success : If the action in the target method is intended to return a result to the source app, the x-callback parameter should be included and provide a URL to open to return to the source app. On completion of the action, the target app will open this URL, possibly with additional parameters tacked on to return a result to the source app. If x-success is not provided, it is assumed that the user will stay in the target app on successful completion of the action.
x-error : URL to open if the requested action generates an error in the target app. This URL will be open with at least the parameters “errorCode=code&errorMessage=message. If x-error is not present, and a error occurs, it is assumed the target app will report the failure to the user and remain in the target app.
Here’s how you’d build a URL to allow your users to select some text in your app, choose a replacement in Terminology, and have to return back to your app.
A new breed of mobile devices led by the Apple iPad are changing the way we think about web layout. Applications like Flipboard and Feedly have led the charge in a resurgence of magazine-style layouts both on the web and on the tablet.
<html class="no-js no-treesaver">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,maximum-scale=1">
<title>Sample Treesaver Page</title>
<link rel="stylesheet" href="style.css">
<link rel="resources" href="resources.html">
<p>This markup is an example of a page using Treesaver for layout. It is not very exciting right now.</p>
Be sure and check out the impressive demos, especially on the iPad. With this first public release, Filipe admits the project still needs a lot of work. But the GitHub repo has a deep wiki and is very active. If you’re interested in contributing, you can help knock out the growing list of bugs and features.
Interface Builder is one of the coolest things about Cocoa development. Being able to draw your interfaces visually can save you tons of otherwise tedious code to create layouts and set visual styles for your user interface elements.
But wait, there’s more. We also stumbled across Adrian’s other project Bluwoki, a Bluetooth peer-to-peer walkie-talkie for iPhone and iPod Touch. Since my daughters get their Dad’s old hand-me-down iPhones, I may have to install this for them to have some fun around the house. Bluwoki is also open source, grab the code on GitHub.
While language purists might balk at the growing popularity of projects that compile to Objective-C, the verbosity of the Cocoa framework has many developers looking for a faster way to create iPhone apps. Let’s face it, the vast majority of apps in the App Store follow a familiar pattern of making a network request, showing an activity indicator, parsing a JSON response, handling errors, loading a UITableView, and handling navigation to the next bit of data.
Behind most every App Store download, there is a painful trail of ad hoc beta builds as developers send beta bits to users to gather feedback and fix bugs. Luke Redpath, UK Rubyist and iOS developer, aims to ease that pain for iOS developers with BetaBuilder, a Ruby gem that bundles up a collection of rake tasks to make it easier to deploy your iOS apps.
BetaBuilder supports distributing your apps own your own server or using TestFlightApp.com. To get started, first install the gem:
gem install betabuilder
Next, require BetaBuilder in your Rakefile:
… and configure your app:
BetaBuilder::Tasks.new do |config|
# your Xcode target name
config.target = "MyGreatApp"
# the Xcode configuration profile
config.configuration = "Adhoc"
config.deploy_using(:web) do |web|
web.deploy_to = "http://beta.myserver.co.uk/myapp"
web.remote_host = "myserver.com"
web.remote_directory = "/remote/path/to/deployment/directory"
Now we can see all of our tasks with rake -T:
rake beta:archive # Build and archive the app
rake beta:build # Build the beta release of the app
rake beta:deploy # Deploy the beta using your chosen deployment strategy
rake beta:package # Package the beta release as an IPA file
rake beta:prepare # Prepare your app for deployment
rake beta:redeploy # Deploy the last build
If you want to use TestFlight instead of hosting your builds yourself, simply swap out the deploy config with:
config.deploy_using(:testflight) do |tf|
tf.api_token = "YOUR_API_TOKEN"
tf.team_token = "YOUR_TEAM_TOKEN"
Nifty. Need additional deploy strategies? Go ahead and fork the project and share it with the community.
Thanks, Luke, for pointing out some prior art from Hunter who lent the name to the project.
In the spirit of showing versus telling, they’ve released Tweetanium, a Twitter client and cross-platform showcase of the Titanium platform.
If you missed it, be sure and catch Episode 0.0.8 in which Marshall Culpepper gives us the scoop on the Titanium architecture.
Our weekly list of projects you might have missed on GitHub: RestKit RestKit is a nice high-level library for consuming REST resources in Objective C. It runs on OS X and iOS and provides three major features: Network transport including GET, POST, PUT, and DELETE Object mapping between JSON responses and local domain types, in […]
zepto.js is under heavy development (growing by 2x since we first spotted it yesterday), but looks to deliver on its goal of being a “~2k library that handles most basic dredge work for you in a nice API so you can concentrate on getting stuff done.”
zepto.js uses the familiar $ function and includes the usual suspects:
get(): return array of all elements found
get(0): return first element found
html('new html'): set the contents of the element(s)
css('css properties'): set styles of the element(s)
append, prepend: like html, but append or prepend to element contents
Methods you’d expect for Ajax-fied GETs and POSTs are there as well:
(n.) – a slang word for a computer tablet such as the iPad or other branded tablet devices
Facebook loves iOS developers. First, they gave us Three20, a nice iOS app framework extracted from their popular native app. Now they’ve released the Facebook iOS SDK which lets you easily add authorization, API calls, and Facebook dialogs to your iOS apps.
To authorize a user using OAuth2 you can simply create the Facebook client and call authorize
Wynn caught up with David Kaneda to talk about mobile web app development with Sencha Touch. Items mentioned in the show: Sencha Touch – HTML5 mobile application framework WebKitBits – David’s Tumblr for the latest in WebKit news and tips jQTouch – jQuery plugin for mobile web development on the iPhone, iPod Touch, and other […]
ShareKit from Nate Weiner lets you support sharing URLs, images, text, and files in your iOS apps in just three lines of code.
The project supports the usual suspects like Delicious, Twitter, Facebook, and more out of the box, but you can also extend it to support other services. ShareKit even supports offline sharing, allowing items to be sent when the user reconnects to the network.