Book Image

RubyMotion iOS Development Essentials

Book Image

RubyMotion iOS Development Essentials

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
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Evolution – From Objective-C to RubyMotion

"Actually, I'm trying to make Ruby natural, not simple."

— Matz

In this chapter, we will have a detailed discussion on how Ruby is implemented in RubyMotion. We will also understand how we can use the various Objective-C objects in our Ruby code. As we know, the iOS SDK is written in Objective-C, which is a simple extension of the C language. Since this is a book on learning RubyMotion, we will not focus too much on this. However, we will make sure you have enough knowledge on Objective-C to program in RubyMotion. In this chapter, we will cover the following topics:

  • How Ruby and Objective-C work together in RubyMotion

  • In what ways are RubyMotion objects inherited from Objective-C

  • Interfacing with C and Objective-C – learning about data types

  • Memory management with RubyMotion