Book Image

RubyMotion iOS Development Essentials

By : Abhishek Nalwaya, Akshat Paul
Book Image

RubyMotion iOS Development Essentials

By: Abhishek Nalwaya, Akshat Paul

Overview of this book

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.
Table of Contents (19 chapters)
RubyMotion iOS Development Essentials
About the Authors
About the Reviewers

Setting up the RubyMotion project

Next, let's set up our RubyMotion project; it will include the information we have collected previously.


Entitlements are used during the code-signing part of the build process. Many applications require access to device features; Apple requires you to specify the entitlements if you want to access a specific device feature. This can be added in the Rakefile. The entitlement method in the Rakefile lets you specify the appropriate keys and values in the following way:

Motion::Project::App.setup do |app|
  # ...
  app.entitlements['keychain-access-groups'] = [
    app.seed_id + '.' + app.identifier

In this example, if your application requires access to a keychain to store user credentials, you must send a request for keychain-access-groups by passing the application provisioning identifier and application identifier along with seed_id and the app identifier.

Info.plist settings

To provide the best experience to the users, iOS expects the presence...