O'Reilly logo

RubyMotion by Clay Allsopp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Where It Begins: AppDelegate

Before we even setup the app in the Rakefile, our app comes with some sensible defaults. Most importantly, it automatically compiles all Ruby files in the app directory of our project. Remember that app_delegaterb we mentioned earlier? It so happens that code was compiled with the app. In fact, it was the only code compiled with our app, so it’s probably a good idea to see what it does.

 class​ AppDelegate
 def​ application(application, didFinishLaunchingWithOptions​:launchOptions​)
 true
 end
 end

Hmm, all that did was define an AppDelegate class with one method. There’s not even a superclass, so how does this do anything at all?

Well, there’s a comment in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required