RubyMotion iOS Development Essentials

RubyMotion iOS Development Essentials
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Get your iOS apps ready faster with RubyMotion
  • Use iOS device capabilities such as GPS, camera, multitouch, and many more in your apps
  • Learn how to test your apps and launch them on the AppStore
  • Use Xcode with RubyMotion and extend your RubyMotion apps with Gems
  • Full of practical examples

Book Details

Language : English
Paperback : 262 pages [ 235mm x 191mm ]
Release Date : July 2013
ISBN : 1849695229
ISBN 13 : 9781849695220
Author(s) : Abhishek Nalwaya, Akshat Paul
Topics and Technologies : All Books, Mobile Application Development, iOS, Mobile

Table of Contents

Chapter 1: Getting Ready for RubyMotion
Chapter 2: Instant Gratification – Your First Application
Chapter 3: Evolution – From Objective-C to RubyMotion
Chapter 4: Mastering MVC Paradigm
Chapter 5: User Interface – Cosmetics for Your App
Chapter 6: Device Capability – Power Unleashed
Chapter 7: Interface Builder and WebView – More Goodies!
Chapter 8: Testing – Let's Fail Gracefully
Chapter 9: Creating a Game
Chapter 10: Getting Ready for the App Store
Chapter 11: Extending RubyMotion
  • Chapter 1: Getting Ready for RubyMotion
    • How can I develop an iOS application?
      • Native apps using Objective-C
      • Mobile web applications
      • Hybrid applications
    • What is RubyMotion?
    • Why RubyMotion?
      • If you are not an Objective-C fan
      • It is not a bridge
      • Managed memory
      • Terminal-based workflow
      • Easy debugging with REPL
      • It is extendable
      • Debugging and testing
    • Pop quiz
    • RubyMotion installation – furnish your environment
      • Prerequisites for RubyMotion
      • Installing RubyMotion
      • Update RubyMotion
      • How do we check we've done everything correctly?
      • Pick your own editor – you are not forced to use Xcode
      • How to get help
    • FAQs
    • Summary
    • Chapter 2: Instant Gratification – Your First Application
      • Your first application
      • Folder structure
      • Some more goodies
        • Let's understand the code
      • Exploring the command line
        • Motion command – one-stopshop
        • Rake tasks – get things done fast
        • Rake file – configuring your application
      • REPL – the interactive console
      • Debugger – catch your mistakes!
        • How to start debugging
          • While testing on a simulator
          • While testing on a device
          • Entering commands before starting
        • Breakpoint
        • Listing breakpoints
        • Moving between the different breakpoints
          • Checking the value of a local variable
          • Checking the value of an instance variable
        • Disable breakpoint
        • Exit debugger
      • Summary
      • Chapter 3: Evolution – From Objective-C to RubyMotion
        • Ruby and Objective-C – a partnership
          • Ruby and Objective-C share the same ancestor
        • Interfacing with C and Objective-C
          • Types
          • Enumerations and constants
          • Functions
          • Structures
          • Pointers
          • Classes
          • Objective-C messages
          • RubyMotion selectors
        • Memory management
        • Summary
        • Chapter 4: Mastering MVC Paradigm
          • Model-View-Controller (MVC)
            • Model
            • View
            • Controller
          • The restaurant application
            • Creating a model
            • Writing more code
              • Restaurant controller
              • Restaurant view
          • Connecting to an external API
          • Search restaurant by city
            • What just happened
          • Picture speaks louder than words
          • Play time
          • Summary
          • Chapter 5: User Interface – Cosmetics for Your App
            • Bars
              • The tab bar
                • Customizing the tab bar
              • The navigation bar
                • Customizing the navigation bar
              • The status bar
            • Basic UI elements
              • Label
              • Textfield
              • Switch button
              • Slider
              • Button
              • Picker view
            • Hands-on – add a Restro Application
            • Summary
            • Chapter 6: Device Capability – Power Unleashed
              • Camera – smile please!
                • Camera example
                • Understanding the Camera code
              • Location Manager – directions for apps
                • Location Manager example
              • Gestures – non-verbal communication
                • Gesture example
                • Do it yourself
              • Core Data – manage your data
                • Core Data example
                  • Creating an employee
                  • Deleting the employee
              • Address Book – manage your contacts
              • Do it yourself
                • Task 1 – show nearest restaurant
                • Task 2 – mark each restaurant on a map with a pin
              • Summary
                  • Chapter 9: Creating a Game
                    • Cocos2D
                    • Let's create a game – Whac-A-Mole
                      • Let's start coding!
                        • Adding motion to moles
                        • Adding touch events to the game
                        • Adding scores
                        • Games without any sounds are boring — let's add some sound
                    • Summary
                    • Chapter 10: Getting Ready for the App Store
                      • Generating certificates
                        • Do it yourself
                      • Provisioning profile
                        • App ID
                        • Adding devices
                        • Developer Provisioning Profile
                        • Do it yourself
                      • Setting up the RubyMotion project
                        • Entitlements
                        • Info.plist settings
                        • Building icons
                        • Configuring your application
                        • Installing on a device
                        • iTunes Connect
                      • Creating bundles for submission
                      • Summary
                      • Chapter 11: Extending RubyMotion
                        • RubyMotion gems
                          • Teacup – say goodbye to Xcode and XIB files!
                          • BubbleWrap – making Cocoa APIs more Ruby-like
                          • motion-addressbook – access phonebook easily
                        • CocoaPods – managing Objective-C libraries
                          • Installing CocoaPods with RubyMotion
                        • Summary
                        • What next?

                        Abhishek Nalwaya

                        Abhishek Nalwaya is the author of the book, Rhomobile Beginner's Guide. He is a Ruby enthusiast and loves to participate regularly at Ruby and Ruby on Rails meetup groups. He works for a Management Consulting firm. He has spoken at many conferences, meetups, and was the speaker at RubyConf India 2012 and RubyMotion Conference 2013.

                        Akshat Paul

                        Akshat Paul is a programmer and is working as a lead developer at a Management Consulting firm. He has extensive experience of mobile application development and has delivered many enterprise and consumer applications. In other avatars, Akshat frequently speaks and evangelizes at conferences and meetup groups on various technologies; this way he plays his part in giving back to the community. He has given talks at RubyConfIndia and #inspect-RubyMotion Conference. He also has a strong belief in Agile methodologies for creating world-class software, and is a Certified Scrum Master (CSM).
                        Sorry, we don't have any reviews for this title yet.

                        Code Downloads

                        Download the code and support files for this book.

                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                        - 2 submitted: last submission 10 Oct 2013

                        Errata type: Code| Page number: 75

                        The code snippet given on Page 75 has some errors. The following is the corrected line of code from the snippet (the correction has been highlighted):


                        UITableViewCell.alloc.initWithStyle(UITableViewCellStyleSubtitle, reuseIdentifier:@reuseIdentifier)


                        Errata type: Code | Page number: 27 - 28

                        On code snippet starting on page 27 and eding on page 28 has some errors. The correct one is as follows:

                        class RootController < UIViewController
                          def viewDidLoad
                            alert = UIAlertView.alloc.initWithTitle ("This is a foo title",
                              message: "Do you like this example?",
                              delegate: nil,
                              cancelButtonTitle: "Cancel",
                              otherButtonTitles: "Yes","No", nil)

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        RubyMotion iOS Development Essentials +    Oracle Primavera P6 Version 8: Project and Portfolio Management =
                        50% Off
                        the second eBook
                        Price for both: $44.10

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Install RubyMotion and get a feel for the toolchain
                        • Understand the evolution of Rubymotion from Objective-C : compare RubyMotion syntax with the corresponding Objective-C syntax
                        • Work with the XCode interface builder and design stunning user interfaces with RubyMotion
                        • Augment applications with gems: Use and create gems for RubyMotion
                        • Use device capabilities including the camera, geolocation, gestures and address book in your apps
                        • Show your web apps right from your iPhone window with WebView
                        • Learn to store data offline with Core Data
                        • Get your apps ready for the App Store!

                        In Detail

                        RubyMotion is a revolutionary toolchain for iOS app development. With RubyMotion, you can quickly develop and test native iOS apps for the iPhone and iPad, combining the expressiveness and simplicity of Ruby with the power of the iOS SDK.

                        "RubyMotion iOS Development Essentials" is a hands-on guide for developing iOS apps using RubyMotion. With RubyMotion, you can eliminate the complexity and confusion associated with the development of iOS applications using Objective-C.

                        We’ll begin from scratch. Starting by installing RubyMotion, we’ll build ourselves up to developing an app that uses the various device capabilities iOS has to offer. What’s more, we’ll even learn how to launch your app on the App Store!

                        We’ll also learn to use iOS SDK classes to create application views. Discover how to use the camera, geolocation, gestures, and other device capabilities to create engaging, interactive apps. We’ll develop stunning user interfaces faster with the XCode interface builder and make web apps by using WebView. We’ll then augment applications with RubyMotion gems, doing more by writing less code and learn how to write test cases for RubyMotion projects. Finally, we’ll understand the app submission process to push your app to Apple’s App Store

                        With "RubyMotion iOS Development Essentials", we will learn how to create iOS apps with ease. At the end of each chapter we will have a tangible and running app, which utilizes the concepts we have learnt in that chapter.


                        This is a step-by-step book that builds on your knowledge by adding to an example app over the course of each chapter. Each topic uses example code that can be compiled and tested to show how things work practically instead of just telling you the theory. Complicated tasks are broken down into easy to follow steps with clear explanations of what each line of code is doing.

                        Who this book is for

                        Whether you are a novice to iOS development or looking for a simpler alternative to Objective-C; with RubyMotion iOS Development Essentials, you will become a pro at writing great iOS apps

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software