Learn to create native iOS applications using Ruby

#25 – MotionModel $5

Previously we looked at how you would go about persisting data in your RubyMotion app using SQLite. MotionModel is a great lightweight alternative to using a relational DB and makes it easy to get your Ruby models persistable. In this screencast, we’ll: Create a todo app with project and tasks using a iOS7 UITableViewController. Use MotionModel to design the model layer of the application. Setup validation and object relationships. Learn how to save and load our models to disk. Respond to object change notifications. All code is at at https://github.com/Motioncasts/mctv-motion-model

#24 – SQLite $5

There are many ways of storing data on iOS, ranging from simple to complex. Today we’ll look at using the built in iOS SQLite C library to have access to a fast embedded relational database on the device, and write a fun Jeopardy! quiz app. In this screencast, we’ll: Discuss some of the ways of storing data in IOS Use a sample SQLite database with a large dataset Use the motion.h gem to easily call into a C library from RubyMotion Open a handle to the database, execute a query and output the result Map SQLite data to Ruby objects Write a quiz app using our data All code is at at https://github.com/Motioncasts/mctv-sqlite

#23 – Analytics with Segment.io $5

In the previous screencast we had a look how to do analytics with Google. This time we’ll check out Segment.io a service that let’s you use the same, simple API with multiple providers. In this screencast, we’ll: Create a Segment.io account and setup our analytics services Install and setup the Analytics SDK Identify user analytics data Track screens Track events in our app All code is at at https://github.com/Motioncasts/mctv-segment-io

#22 – Google analytics $5

Google analytics gives us amazingly powerful tools to gain insight into how our apps are consumed by users. In this screencast we’ll learn how to use the Analytics iOS SDK with RubyMotion. In this screencast, we’ll: – Install the GA iOS SDK in our app – Test that it works with Realtime analytics – Track screen data – Track events – Track timings – Track crashes and exceptions – Track e-commerce data All code is at at https://github.com/Motioncasts/mctv-ga

#21 – Writing Mac OS X applications $5

RubyMotion not only allows us to write native iOS applications in Ruby, but since the release of version 2, we’ve got the ability to write apps for Mac OS X too. Today I want to explore this a bit by writing a sample Mac app. In this screencast, we’ll: Introduce the pomodoro technique and flesh out the design of the timer app Create and layout our UI using code Add the ability to stop and start pomodoros and display their progress using NSTimer Learn to populate NSTableview with data using delegate methods Add a audio notification All code is at at https://github.com/Motioncasts/mctv-mac-osx

#20 – Auto Layout $5

Auto layout is a cool feature added in iOS that helps you build dynamic view layouts that work on different screen sizes and orientations. In this screencast we’ll Talk about using auto layout in Interface Builder Look at an example project that uses fixed postions and see it break on a different orientation Implement an auto layout solution by creating explicit constraints Use the visual formatting language to create constraints All code in the sample can be found at https://github.com/Motioncasts/mctv-autolayout

#19 – Weak References in RubyMotion 2.0 $5

Ruby developers are used to not having to worry about memory management. On iOS unfornately, this isn’t always the case. With RubyMotion 2.0, we’ve been given a powerful construct to help us manage memory and prevent leaks – the WeakRef class. In this screencast we’ll Talk about the differences ways which Objective-C and RubyMotion handle memory allocation. Discuss what Strong and Weak references are and why you would want to use a weak reference. Look at an example app that has a memory leak Fix the leak by using a Weak Reference All code in the sample can be found at https://github.com/Motioncasts/mctv-weakref

#18 – Styling with Pixate $5

Pixate let’s you style ios applications using standard CSS. Using Pixate with RubyMotion is an easy and very powerful way of quickly creating a awesome UI. In this screencast we’ll See how to get Pixate running with RubyMotion Apply styles to common views like UILabels and UIButtons See how we can apply stylesheets while the app is running Style a TabBarController and UITableViewController Use Sass to DRY up our css All code in the sample can be found at https://github.com/Motioncasts/mctv-pixate

#17 – Animation with Walt free

Previously we covered doing animations using UIKit. Today we’ll learn how you can use the full power of Ruby together with Walt, a powerful and fun DSL for doing animations in RubyMotion. In this screencast we’ll Walk through Walt’s DSL Build a little app that does animation using Walt Look at some of the example animations All code in the sample can be found at https://github.com/Motioncasts/mctv-walt Watch

#16 – UIView Animation $5

Animations are all over iOS apps and are very useful technique highlight actions to a user. Today we’ll learn how you can use the UIView animation methods to create powerful animations. In this screencast we’ll Create a silly app that moves a button to random location once you touch it Animate its movement using UIView animation Play around with animation curves to make the animation look more natural Have a look at chaining animations to create complex sequences Use different animatable properties to fade in a view and rotate it All code in the sample can be found at https://github.com/Motioncasts/uiview-animations

#15 – MapKit and Interface Builder $5

Wherever you go, your mobile device goes, making iOS applications inherently geographical in nature. Today we’ll learn how you can use MapKit with RubyMotion and how to use IB to make it easier to build complex UIs. In this screencast we’ll Use interface builder and the ib gem to create a complex ui Display a users location on a map using MapKit and CoreLocation Change the maps viewport when a user’s location changes Build a photo location app that annotates nearby images from the Instagram API onto the map Display annotated photos in a Semi Modal view All code in the sample can be found at https://github.com/Motioncasts/mapkit-ib

#14 – Networking with AFMotion $5

A great deal of iOS apps tend to live on the internet and needs to do a lot of networking. Today we’ll hook up and app to the rest of the world using AFMotion. In this screencast we’ll Go over some of the options available to RubyMotion developers to use HTTP, the iOS api’s and Bubblewrap Create an app that uses AFMotion and make some requests using the api Build a photo gallery app that uses the most recent popular images from the Instagram API All code in the sample can be found at https://github.com/Motioncasts/networking

#13 – Face Detection $5

Face detection seems like one of those really difficult things to do, but with the help of the Core Image API and RubyMotion, it’s really easy. In this screencast we’ll Use a starter app with a UIImagePickerController class to explore the CIDetector api Write code to detect all the faces in a image as well as finding their left and right eye and mouth positions Use Core Graphics to draw a pair of sunglasses on each face in an image All code in the sample can be found at https://github.com/Motioncasts/sunglasses

#12 – Using the camera $5

Today we’re going to build an app that illustrates the quickest way of accessing the iPhone’s camera using RubyMotion. In this screencast we’ll Create an app that uses the UIImagePickerController class to pick a image and display it on screen Make sure that the app works even when the camera isn’t available Use the Core Image framework to apply a filter on our image Show off our app on a real device All code in the sample can be found at https://github.com/Motioncasts/motioncasts-camera

#11 – Observing Events $5

iOS applications are all about creating and consuming events. A good way to achieve this is the observer pattern. Let’s look at some techniques RubyMotion developers can use to observe events. In this screencast we’ll Briefly talk about the observer pattern and what it’s good for Create a small stock ticker app to demonstrate the concepts Use Ruby’s stdlib Observable module in our RubyMotion app Try out the iOS alternative, NSNotificationCenter, using Bubblewrap Observe changes to an object using iOS’s Key-Value Observing and Bubblewrap All code in the sample can be found at https://github.com/motioncasts/motioncasts-observing-events

#10 – TDD with RubyMotion $5

The Ruby community has always had a strong focus on testing, and RubyMotion developers needn’t feel left out. In this screencast we’ll Talk about TDD in Ruby and drill into some detail on how testing works in RubyMotion Create a new RubyMotion app and make our generated spec pass Flesh out the rest of our sample app in a Test Driven Manner All code in the sample can be found at https://github.com/motioncasts/motioncasts-tdd

#9 – Showing Progress with RubyMotion $5

There are a couple of options available to you if you want to show progress of a long running process in a RubyMotion app. In this screencast we’ll have a look at two options, one provided by Apple and another open source component. In this screencast we’ll Look at UIActivityIndicator and how to use it Create a new RubyMotion app and configure our project to pull in a cocoapod Use the SVProgressHUD pod to display progress and explore the api All code in the sample can be found at https://github.com/motioncasts/motioncasts-progress

#8 – Pull to refresh $5

In this screencast we’ll Help you setup your gems using bundler Populate a table view with test data Configure our project to pull in a cocoapod Use the SVPullToRefresh pod to provide a pull to refresh mechanism All code in the sample can be found at https://github.com/hendrikswan/motioncasts-pull-to-refresh Want a taste of what you’ll get? Here is a preview of what’s in the video:

#7 – Searching Tables in RubyMotion $5

In this screencast we’ll write a little app called rhymer, that will search a dictionary for words ending with a certain suffix. We’ll go over the following topics Help you setup your gems using bundler Setup a UITableViewController with a UISearchBar Learn how to read a text file into memory Handle search events and search through a dictionary of words Populate a tableview controller with the search results All code in the sample can be found at https://github.com/motioncasts/motioncasts-rhymer

#6 – Tables with RubyMotion – Part 2 $5

In this screencast we’ll Help you setup your gems using bundler Learn how to make your table editable and delete rows Sync data in a source with the changes made on the table Add more data to the data source by adding a special row in the table view Sort data in the datasource through the table view All code in the sample can be found at https://github.com/hendrikswan/motioncasts-tables-2 Want a taste of what you’ll get? Here is a preview of what’s in the video:

#5 – Tables with RubyMotion – Part 1 $5

In this screencast we’ll Help you setup your gems using bundler Learn how to generate table view controllers using the rubymotion_generators gem. Parse JSON with bubble-wrap Bind data from JSON in our generated UITableViewController Introduce sections and show hierarchical data in one table Change the code to have a master detail relationship between one UITableViewController and another All code in the sample can be found at https://github.com/hendrikswan/motioncasts-tables Want a taste of what you’ll get? Here is a preview of what’s in the video:

#4 – SugarCube and Geomotion free

Sugarcube is an essential RubyMotion gem that provides quite a lot of nice syntactic sugar and Rubyisms for iOS development. It also comes with some great REPL view adjustment extensions that makes pixel pushing a breeze. Geomotion is a nice little library that extends CGRect and make view geometry so much cleaner. I have found these two gems to be a wonderful combination when building views programmatically. In this screencast we’ll Help you setup your gems using bundler Learn how to generate view controllers using the rubymotion_generators gem. Explore the geomotion API Build a simple view controller with a UIScrollView Use geomotion to layout our views. Tweak our view positions using SugarCube’s REPL adjustments All code in the sample can be found at https://github.com/motioncasts/motioncasts-geomotion-sugarcube

#3 – Push with Parse and RubyMotion $5

In this screencast we’ll Take you through the concept of Apple push notifications We’ll go through every step needed for configuration of push notifications, including steps in the provisioning portal and steps at parse.com We’ll get a simple RubyMotion up and running and plug in all the correct configuration values We look at some simple code to subscribe to push notifications and send a test message from parse.com, leaving you in a good position to start utilizing push notifications in your app All code in the sample can be found at https://github.com/hendrikswan/motioncasts-parse-push Want a taste of what you’ll get? Here is a preview of what’s in the video:

#2 – Start building views in RubyMotion $5

In this screencast we’ll Take you through the basics of building views in RubyMotion, using UIKit. We’ll introduce you to the MVC pattern and how it’s used in Cocoa. Next we’ll illustrate some of the concepts by creating a very simple view in RubyMotion. We’ll go over the how UI classes are structured in Cocoa touch and the different types of UIViewControllers. Next, we’ll do some navigation between views using the Navigation and Tab Bar controllers. Finally we’ll create a view using Xcode and Interface builder, and learn how you can use it from RubyMotion.

#1 – Get moving with RubyMotion free

You’ve heard about RubyMotion and would like to see what it can do. In this screencast, we’ll be looking at getting your RubyMotion environment set up, drop into the debug console, and go over some resources that will help you become an expert RubyMotion developer.