Monthly Archives: February 2014

Issue #16

RubyMotion #inspect 2014 update

The RubyMotion #inspect 2014 conference is coming this may. Don’t wait too long to signup, space is limited.

Soon we will publish a list of places to stay while you are in San Francisco.

This event cannot happen without the help of sponsors from the community, so please show them some love:

Pixate – Gold Sponsor

image

Terrible Labs

image

If you missed the last issue, you can find it here: issue #15

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


Frozen Rails 2014 Conference Frozen Rails is a single track Ruby conference held in Helsinki, Finland (September 11-12). They’re hoping to get proposals for talks on using of Ruby outside of Rails, such as RubyMotion.

Feb 24th, 2014 – “MotionInMotion – Episode 12 – Application URLs” by Jack Watson-Hamblin

Feb 23th, 2014 – “Simpler Core Data with RubyMotion” by Stefan Haflidason

Feb 21th, 2014 – “gem – Test your RubyMotion app using screenshot comparison” by Clay Allsopp

Feb 21th, 2014 – “Fixing the iOS 7 Navigation Bar Overlap Problem” by Jack Watson-Hamblin

Feb 20th, 2014 – “Using MagicalRecord and Core Data in RubyMotion” by Paul Sturgess

Feb 19th, 2014 – “RubyMotion – using MapKit” by Nicolas Cavigneaux

Feb 19th, 2014 – “Resources for learning Rubymotion” by Jeremy Groh

RubyMotion Tip of the Week


When you’re creating a UITableView or UITableViewController you can use many different cell types in one table. A logical “unit” doesn’t have to be only one cell.

For example: imagine you have a list of comments, and some of the comments have images. Rather than making only one comment cell class, make a CommentImageCell and a CommentTextCell. This is much easier than dynamically changing the height of the cell depending on wether it has an image or not. It’s also more efficient.

I like to create an array of rows, with their class and their data. Then when creating that cell in the delegate you know which kind of cell to create and you can apply the data.

rows = [
  { klass: CommentTextCell, data: comment.body },
  { klass: SomeOtherCell, data: some_data }
]

RubyMotion App of the Week


image

A Dark Room

This is strange, but I’m intrigued. About it, the website, and the

(https://github.com/Continuities/adarkroom) for the website

CDQ News and Tips by Ken Miller


Hey RubyMotion folks, I'm going to start work on CDQ 0.2.0 soon, and I wanted
to give you a heads up as to what I'm going to be tackling:

  • Callbacks: Structured way to perform actions when certain lifecycle events take place: create, update, delete, either for a specific object (say, on behalf of some controller code) or for all instances of a class.
  • Friendly error messages: Core Data error messages are... cryptic. This would put a layer on top to make them easier to decipher.
  • Easier Validations: Core Data lets you add simple validations on your schema, or custom ones in your model, but working with them in code is not easy or natural. This would create simple API for running builtin validations, and for defining custom ones.

You can see this list as it updates, and any future plans on the roadmap page on github:

https://github.com/infinitered/cdq/wiki/Roadmap

If you have ideas you'd like to share (or even better, help out with) or you just have a question, reach out to me on Twitter, or email (ken@infinitered.com).

iOS Marketing Tip of the Week by Mark Rickert


The first screenshot you upload to iTunes Connect is the first impression a potential purchaser gets of your app. Along with your app's name, the first screenshot should be a good representation of what your app actually does.

What makes a great screenshot? Check out this artice from Dan Counsell of Realmac software (RapidWeaver, Clear, etc.) on how to design great App Store screenshots to set your app apart from the fray.

RMQ News


RMQ v0.5.5 released.

  • Fixed the table template, it wasn't using a reuse identifier when creating cells, ack, I'm sorry about that
  • Fixed a crash when calling rmq inside an AppDelegate instance
  • Updated README for clarification
  • Added to scrollview styler: direction_lock and scroll_enabled
  • Added to view styler: tint_color
  • Added to tableview styler: separator_style, separator_color, and allows_selection

Because this updates the table template, please update your gem as well as your bundle:

gem update ruby_motion_query
bundle update ruby_motion_query

Help support the Dispatch and signup over at MotionInMotion


MotionInMotion releases a new
RubyMotion screencast each week. Here are some examples:

  • Episode 12 - Application URLs
  • Episode 11 - RMQ
  • Episode 10 - Teacup
  • Episode 9 - ProMotion + Formotion
  • Episode 7 - Working with the Camera

Sign up, it's only $9AUD/month!

One more thing


Jim Weirich, the creator of Rake, passed away on February 19th.

image

Here is a (https://www.youtube.com/watch?v=z7E1zx9j31M&list=TLWNQ8oYr_Sigj8fbHN5M9i-_EtCyP2pCo) talking about RubyMotion.

Thank you Mr. Weirich for making our lives a little easier every single day.


If you have any tips, blog posts, or want to sponsor this newsletter, please send emails to todd@infinitered.com

Issue #15

The Dispatch just hit 500 subscribers

The very first RubyMotion Dispatch I sent out went to 86 people, that was sent out 15 weeks ago.

I want to thank Mark Rickert for writing the “Marketing Tip of the Week”, they’re super helpful.

If you missed the last issue, you can find it here: issue #14

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


Feb 17th, 2014 – “Spotlight: Service Status by Odin Dutton” by Jack Watson-Hamblin

Feb 17th, 2014 – “MotionInMotion screencast – Episode 11 – RMQ” by Jack Watson-Hamblin

Feb 16th, 2014 – “wakizashi – HTML/XML Parser for RubyMoton” by Francis Chong

Feb 15th, 2014 – “Simpler Core Data with RubyMotion and CDQ (Part 1)” by Stefan Haflidason

Feb 15th, 2014 – “Motion-Tickspot – A RubyMotion wrapper for the http://tickspot.com API that works on iOS and OS X.” by Brian Pattison

Feb 15th, 2014 – “OS X Apps with Ruby: Part 4” by Jack Watson-Hamblin

Feb 14th, 2014 – “Learn RubyMotion Episode 18 – Using lock code functionality when app comes to foreground” by Neeraj Singh

Feb 13th, 2014 – “Spotlight: Mutual by Andrew Gertig” by Jack Watson-Hamblin

Feb 13th, 2014 – “Demo to read the QR code using the camera in RubyMotion – iOS 7 Rubymotion Barcode Scanner Example” by Atsushi Nakatsugawa

Feb 11th, 2014 – “Building Podstudio in Rubymotion” by Nader Hendawi

In case you missed it

Juxtapose – Screenshot-driven assertions for testing RubyMotion applications” by Thomas Mayfield

ObjC2RubyMotion Converter for Sublime Text 2/3” by kyamaguchi

RubyMotion Tip of the Week


You can use a UIWebView to easily deal with multi-part processes that require things like sessions and 3rd party websites.

Let us imagine you want to add some sort of authentication, such as OpenID, GitHub, etc. An easy way to handle this is to create a controller with an embedded browser (UIWebView). The web view will maintain a session during the entire process, and you can monitor and change everything such as query params, cookies, headers, etc.

When you’ve got what you need (authentication token for example), you simply stop the next request, close the screen and go onto the next step.

UIWebViews are heavy objects, so you wouldn’t want to use this technique for something that would be easier with AFMotion, however it’s super useful in some situations.

iOS Marketing Tip of the Week by Mark Rickert


So you’ve got this killer idea for an app! Thats great, but don’t start building it right away. Before jumping head first into creating the app you should run through a few “validation steps”:

  1. Validate the market – Just because you think it’s a good idea doesn’t mean people will want to buy it. Use services like App Annie to look at the category of app your idea fits in and see what’s popular and doing well. Check to see if there are other apps that exist in the same space, and if they do, make sure you have clear ideas about to set yours apart.
  2. Validate the idea – Before you write a line of code, draw up some initial concepts that show the main functionality of the app. DO NOT ask your friends or family for their opinion. Despite what you may think, they’re going to tell you want you want to hear. Find a disinterested 3rd party who will give you honest feedback about the idea.
  3. Validate the user interaction – Now you can start coding. Don’t polish anything. Don’t fix bugs. Just get a working prototype of your app in the hands of a few people and see how they use it. Take notes and ask questions (but not leading ones).

Once you’ve successfully completed these steps, you can start building your production app. The app could likely to be very different from your original vision, but it’s likely to be better and a bigger success because of these few validation steps.

RMQ News


RMQ v0.5.3 released.

Added a template for a UITableViewController:

gem update ruby_motion_query

In your project:

bundle update ruby_motion_query
rmq create table_view_controller bars

Help support the Dispatch and signup over at MotionInMotion


MotionInMotion releases a new
RubyMotion screencast each week. Here are some examples:

  • Episode 11 – RMQ
  • Episode 10 – Teacup
  • Episode 9 – ProMotion + Formotion
  • Episode 7 – Working with the Camera

Sign up, it’s only $9AUD/month!

One more thing


Ashley Wagner asked her olympic teammate how to create a hash in Objective-C:

[NSDictionary dictionaryWithValuesAndKeys:
    @"Germany", [NSNu mber numberWithInt:8],
    @"Norway", [NSNumber numberWithInt:7],
    @"Netherlands", [NSNumber numberWithInt:6],
    nil];

// Or the new way
NSDictionary *olympicMedalCount = @{
    @"Germany" : @8,
    @"Norway" : @7,
    @"Netherlands" : @6
};

image


If you have any tips, blog posts, or want to sponsor this newsletter, please send emails to todd@infinitered.com

Issue #13

Do you want to be a RubyMotion hero? Write a wrapper around RestKit

I’m working with a client and we’re using both CDQ and RestKit. CDQ is for the local Core Data store and it works really well. On a side-note Ken Miller said he would write a weekly CDQ tip for the Dispatch. We use RestKit to connect to a Rails server and sync the data. It’s very full featured and great, but there is a lot of boilerplate and complexity. It’s begging for a nice ruby wrapper.

Happy coding, Todd Werth (@twerth)

Motion Meetup Announcement