
RubyMotion iOS Development Essentials
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- 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 DescriptionRubyMotion 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.What you will learn - 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!
Who this book is forWhether 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
More details
Other editions
Additional editions

Content
- Intro
- RubyMotion iOS Development Essentials
- Table of Contents
- RubyMotion iOS Development Essentials
- Credits
- About the Authors
- Acknowledgement
- About the Reviewers
- www.PacktPub.com
- Support files, eBooks, discount offers and more
- Why Subscribe?
- Free Access for Packt account holders
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Errata
- Piracy
- Questions
- 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
- 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
- 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
- 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
- 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
- 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
- 7. Interface Builder and WebView - More Goodies!
- Interface Builder
- Let's try the Interface Builder
- .xib to RubyMotion
- UIWebView - embed web content
- Summary
- 8. Testing - Let's Fail Gracefully
- Unit testing
- Functional testing
- Device events
- Rotate device
- Accelerometer device event
- Gestures
- Tap
- Flick
- Pinch open
- Pinch close
- Drag
- Rotation
- Summary
- 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
- 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
- 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?
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.