Monthly Archives: April 2014

Issue #25

Movies did it right with the credits at the end

I always felt that software should have a credit page or screen. Something that highlighted everyone who worked on the project, just like movies do.

Lately, I’ve been mentioning everyone who helped me on RMQ in the release notes. I figure that’s a small way to do it.

I have an idea for a new column in the Dispatch. Periodically I’ll have a “gem of the week”, and I’ll ask the creator three things:

  • Why did you create this gem
  • What are you going to add next
  • Who helped you build the gem

I’ll send out some emails (or feel free to email me) and ask some gem creators about their gems, I’ll see what response I get.

Continue reading

Issue #24

RubyMotion news is a bit light this week

Perhaps everyone is getting ready for the conference. Perhaps it was due to tax day in the US last week. Speaking of the conference, Laurent and the crew at HipByte announced new speakers, panel, and the schedule, read about it here.

You may have noticed that the Dispatch hasn’t been going at a 9am PST. Yeah, I’m sorry about that. I’ll do better, especially after #inspect. I promise.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts

Apr 21st, 2014 – “screencast – Episode 20 – Local Notifications” by Jack Watson-Hamblin

Apr 21st, 2014 – “RubyMotion #inspect 2014: Last Speakers, Panel, Schedule” by RubyMotion

Apr 18th, 2014 – “Porting Apple’s Core Data Books Sample Project to RubyMotion” by Stefan Haflidason

Apr 15th, 2014 – “Travis – Xcode 5.1, iOS 7.1 and OS X 10.9 for Mac and iOS builds” by Henrik Hodne

Apr 15th, 2014 – “slides – Building Tillless with RubyMotion” by Mathew Sinclair

March 20th, 2014 (I missed this one) – “” by Multinus

RubyMotion App of the Week

I featured “A Dark Room”” in issue #16. Now I’m pulling it out of the archives (a dark musty basement where the Dispatch is carefully stored) because it was the top-paid iPhone app in the US App Store.


A Dark Room

About it, the website, and the code for the website

RMQ News

I’m working on RMQ 0.6.0, which will be the new enhanced rectangle system (frames, etc). I’m also adding a grid system. I use grids a lot when working on apps (typically just a hash), so I feel it’s a good addition for RMQ’s layout system. Here is a sneak peak:

There is an app grid at:

You can also have a grid per stylesheet. If none exists, the app grid will be used. rmq.stylesheet.grid (this will return app’s if nil). If you want to create a grid for your stylesheet, you can just dup the app one like so (inside the stylesheet): self.grid = Then you can mod it: self.grid.columns = 6. Or you can create one like so:{
  columns: 10,
  rows: 13,
  column_gutter: 10,
  row_gutter: 10,
  content_left_margin: 5,
  content_right_margin: 5,
  content_top_margin: 5,
  content_bottom_margin: 5,
  status_bar_bottom: 20,
  nav_bar_bottom: 64

If you want your view to be from b2 to d3, you can do any of the following:


st.frame = "b2:d3"
st.origin = "b2:d3"
my_view.frame = some_grid['b2:d3']

You can do fun stuff like this too, only set the left and width:

st.frame = "b:e"

You can mix and match other layout features with grid features:

st.frame = {grid: "b2", w: 100, h: 200}
st.frame = {left: "b", top: "2", right: "d", bottom: "3"}
st.origin = {l: "b", t: "2", r: "d", b: "3"}
st.frame = {grid: 'b:e', top: 100, height: 20}

One more thing

How most people imagine the software we build running.

How it actually runs.

If you have any tips, blog posts, or want to sponsor this newsletter, please send emails to

Issue #23

The keynote from HipByte is going to be awesome

Laurent and the crew at HipByte are going to announce some very cool things during the keynote at this year’s conference. If you love RubyMotion, you’re going to love this. The rumor is RubyMotion v3 will be a game changer.

Some cool new speakers have been added, HipByte wrote about it here.

I want to thank Mark Rickert again for his awesome marketing tips. I learn something every week.

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

Happy coding, Todd Werth (@twerth)

Continue reading

Issue #22

RubyMotion #inspect conference update

I’ve updated the lodging section of the website. If you’re coming to the conference in May, check it out for tips on where to stay. You can see it here

New speakers have been added, HipByte wrote about it here.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts

Apr 8th, 2014 – “How to Add Reveal to Your RubyMotion App Without Modifying the Rakefile” by Mark Villacampa

Apr 8th, 2014 – “meetup – Quarterly Hands on RubyMotion in Chicago” by David Astels

Apr 7th, 2014 – “screencast – Custom Table View Cells & AutoLayout” by Jack Watson-Hamblin

Apr 7th, 2014 – “gem – A RubyMotion Wrapper for the awesome Phony gem” by Christopher Speer

Apr 6th, 2014 – “BostonMotion 6 – RubyMotion Meetup” by BostonMotion

Apr 4th, 2014 – “podcast – Hack and Heckle 057 – RubyMotion Sydney meetup organizer interview” by Leigh Appel

Apr 3rd, 2014 – “video – 2014 – RubyMotion’s Secret Sauce by Joshua Balanco” by Joshua Ballanco

Apr 3rd, 2014 – “RubyMotion #inspect 2014: First Batch of Speakers, Lodging Information, Sponsors” by RubyMotion

RubyMotion news

RubyMotion 2.26

  • Fixed a regression introduced in the previous release that was causing a
    crash when checking if a class supports weak references on iOS 6.

RubyMotion 2.25

  • Added support for Xcode 5.1 and iOS 7.1 final.
  • Added support for OSX 10.6 as deployment target (experimental).
  • Improved user feedback by printing a warning when overriding a protocol
    method that was previously defined with one of the `attr_*’ methods. This
    may print false positives.
  • Improved `rake ctags’ to index the application’s .rb files. Thanks to
    Hwee-Boon Yar for the patch (pull request #152).
  • Improved use of WeakRef' to raise an exception when trying to create a
    weak reference to one of the unsupported classes. For more information, see
    Which classes don’t support weak references?’ at
  • Added some introspection support to `ImmediateRef’. It can now report the
    actual class, its methods, and a inspect description string.
  • Added gemspec call to Gemfile for gem template. Thanks to Mark Rickert for
    the patch (pull request #151).
  • Fixed a bug where `rake device debug=1′ did not work with Xcode 5.1.
  • Fixed an error in `rake device debug=1′ if it would use UTF-8 as app name.
  • Fixed a bug where an application could not be installed and launched on the
    Simulator or a device due to the application bundle containing a directory
    called `Resources’. This will now fail the build with a descriptive error.
  • Fixed a bug where the OS X REPL did not work on 10.7 Lion.
  • Fixed a bug where KVC property validation methods defined in Ruby would not
    be compiled with the appropriate (Pointer) types.
  • Fixed a bug where Ruby methods defined on Objective-C tagged pointer
    objects could not call methods on itself.
  • [iOS] Made tap' test helper work withUISwitch’.
  • Fixed a bug where methods with BOOL arguments would not be handled properly.
  • Fixed a bug where the cycle detector did not work for Array/Hash objects.
  • Fixed a memory leak in Object#{method, public_method, instance_method,
  • Fixed a bug where Boxed#copy would cause a crash.
  • Fixed a bug where Range#copy would cause a malloc_error_break error.
  • Improved Object#instance_variable_set performance. ~20% faster.
  • Improved Object#method performance. ~50% faster.
  • Improved method dispatcher performance. ~5% faster.
  • Improved fine-grained lock performance. ~20% faster.
  • Improved memory management performance. ~25% faster.

RubyMotion App of the Week


Apr 8th, 2014 – Winds Aloft Forecast

“aloft is the beautiful new way to check NOAA winds aloft forecasts from your iOS device!”

iOS Marketing Tip of the Week by Mark Rickert

From time to time, I’d like to start taking questions from Dispatch readers. If you’ve got an App Store marketing question you’d like me to address, please email me at

This question comes from my good friend, Gant Laborde. Gant asks:

There’s a lot of websites for submitting your app for indexing, and giving away app codes. Are any of them worth a damn?

I’ve been developing iOS apps since 2011 and I’ve never submitted my app to an app indexing service, yet my apps show up. Most of these websites simply scrape Apple’s public RSS feeds and search APIs. This gets them pretty much all the data they need to run their sites and make money off affiliate links (see Issue #19 for my tip on how to make money off linking to the App Store).

The really interesting part of the question is about redeeming promo codes. I’m a big fan of Tokens which is an app that helps you create and distribute promo codes and then tells you when they’ve been redeemed. This makes it really easy to track who you sent codes to and what percentage of your promo codes are used. The app is free for one app, so try it out and see if it makes your giveaway workflow better. There are other services out there, but I’ve found Tokens to be the best in terms of functionality, user experience, and developer workflow.

RubyMotion Tip of the Week by Gant Laborde of Iconoclast Labs

Understanding NSLog vs puts

Most Ruby devs know the difference between puts and p. They know that p will simply call puts with inspect e.g.

p foo == puts foo.inspect

p doesn’t just call to_s, so It’s much better for debugging and that’s why I personally use p all the way up until I get a chance to implement awesome_print_motion, and switch p out for ap. I’ll even leave it in my production apps as Mark Rickert suggests.

This is great for debugging the Ruby side, but it’s no panacea. Sometimes you’ll crash before you can even see your messages. Keeping your messages at the Ruby level, means that you’re not writing a file, and you can’t directly utilize the Apple System Log facility. This is where using NSLog would be best (bonus is that they get time and process stamped, too!).

You’ll always be able to find your results logged:
On Device rake crashlog:device

Simulator rake crashlog

You’ve got options, so use the method that works best for you!

One more thing

The community is working on an app for the #inspect conference. Look for it next week.

If you have any tips, blog posts, or want to sponsor this newsletter, please send emails to

Issue #21

I’m now teaching RubyMotion and RMQ workshops

(First off, there are no April 1st jokes in this issue, I just realized it was April 1st and figured I’d better say that. Well, just one, here it is)

In addition to our products, we at InfiniteRed do both client work and 1-on-1 training and coaching. I personally mentor Ruby on Rails developers, teaching them RubyMotion; getting them up to speed quickly with best practices. I love this part of my job, so I’ve been thinking of ways to expand it to more people, and make it more affordable. Today I do that.

I’d like to announce our first live online workshop: “Practical RubyMotion for Ruby Developers


Register for the “beta” workshop and get $100 off. Only for you, the readers of the Dispatch. Use this promo-code when you register: the_dispatch_rocks

Normally the workshop size will be 5 to 10 people (plus me the coach), but for the beta, I want to limit it to 5 people. I’m sure there will be bugs to work through, but don’t worry I’ll add extra time to make up for any technical glitches.

Wether you’re attending the workshop or not, I’d love to hear you thoughts on the whole idea, email me:

Read all about the workshop here.

Please excuse my shameless self promotion, but hey, I waited 21 issues before I promoted our services. That’s pretty good considering.

Continue reading