RubyMotion #inspect 2014 conference update

Hey RubyMotion fans, here is an update on #inspect 2014. This is the floor plan of our venue:

image
full-size image

The Golden Gate Room is the main room where we all will be sharing, talking, and teaching each other about RubyMotion. There is a pretty good size screen behind the stage. The ceiling is very high and the room will easily hold all of us. It has windows on three sides. On the right side it looks out over boats then to the Golden Gate Bridge. Here is a photo:

image

The Marina Room is where we’ll have food, drinks, and a place to hang around. It can hold upto(80) people sitting. We can also use this space for other things. If you have any ideas, let me know.

The Bay Room will be where the speakers can setup. The Foyer is a decent size, it has room for tables and such. There is also a very small kitchen if we need a place to prep food.

Outside, we get a slab of concrete with picnic benches on it (8 of them IIRC). Plus the marina with the boats is right next door:

image

We can serve alcohol here, which means we don’t need to travel somewhere else for our after-party. We’ll have other refreshments for those not drinking alcohol.

We’re working hard to make the conference and the after-party a safe and inclusive event. I’m personally going to make sure everyone is having fun and feeling comfortable. I’ve been to plenty of conferences where some people (the “cool kids”) seem to be having all the fun, while the rest are wondering what to do. I’m going to personally make sure that doesn’t happen here. It’s my personal mission.

If you haven’t signed up yet, I recommend you do, we’d love to see you there. If you’d really like to come but for some reason you’re having difficulties, let me know, perhaps the community can assist you.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


Mar 11th, 2014 – “Reflecting on RubyMotion Experiences – Part 2” by Tony Issakov

Mar 11th, 2014 – “gem – motion-weakattr – weak_attr for WeakRefs in RubyMotion” by Clay Allsopp

Mar 10th, 2014 – “screencast – Episode 14 – Five Advanced RubyMotionQuery Tips” by Jack Watson-Hamblin]

Mar 10th, 2014 – “gem – motion-momentum – RubyMotion framework for creating iOS and OS X applications the “Rails” way” by Jack Watson-Hamblin

Mar 7th, 2014 – “NSAgent – A OSX RubyMotion app to record screen videos and upload them easily. ” by Ivan Acosta-Rubio

Mar 7th, 2014 – “gem – stringify_float – Work around poor floating point support with RubyMotion” by Michael Graff

Mar 7th, 2014 – “gem – motion-gyro-image-controller – iOS (RubyMotion) Image Controller with Tilt Control” by Jerry John Jacob

Mar 7th, 2014 – “RubyMotion The “Rails” Way” by Jack Watson-Hamblin

Mar 6th, 2014 – “Adding Couchbase Lite to a RubyMotion application” by Josep

Mar 6th, 2014 – “RubyMotion on OS X – the sky is the limit (especially for Rails developers!)” by Elliott Draper

Mar 5th, 2014 – “RubyMotion: Under the hood” by Tony Issakov

Mar 5th, 2014 – “gem – motion-linear-animate – RubyMotion library for linear animations” by Jerry John Jacob

Mar 5th, 2014 – ““An introduction to RMQ” updated” by Todd Werth

Mar 4th, 2014 – “New in RubyMotion: New CLI, WeakRef Zeroing, Background Fetch Testing, Subscripting, Performance” by RubyMotion

Mar 3rd, 2014 – “Real-time web rubymotion built with Ruby on Rails and RubyMotion” by Yuki Moriyama

Mar 1st, 2014 – “atom-rubymotion – RubyMotion support in Atom” by Satoshi Ebisawa

RubyMotion News


RubyMotion 2.24

  • Fixed a regression introduced by the last build where environments running
    versions of Ruby not handling source files as unicode by default would be
    broken due to the presence of a unicode character in one of the files.

RubyMotion 2.23

  • Added support for objects conforming to the Subscripting interface
    (Objective-C Literals).
  • Fixed a bug with the `motion activate’ CLI command. Thanks to Joffrey
    Jaffeux for the patch.
  • Fixed a regression when specifying external templates to `motion create’.
  • Fixed a bug where WeakRef.new would cause a crash when nil, true, false,
    Fixnum or Float objects were passed.
  • Fixed a bug where vendor_project' with:static’ did not reuse `:cflags’
    for the BridgeSupport generation.
  • Fixed a bug where manually created BridgeSupport metadata files were no
    longer being used by the compiler. Now if one exists in the root of the lib
    dir, that will be used instead of one in the platform-specific build dir.
  • Added temporary files that are sometimes generated by the REPL to the
    default `gitignore’ file. Thanks to Mark Rickert for the patch (pull
    request #150).
  • Added support for “value of def-expr” feature (ex. def foo; end' returns
    the
    :foo’ symbol).
  • Fixed a bug where NSDate.distantFuture returns a wrong value.
  • Fixed a memory leak when an exception message is created.
  • Fixed a bug where the cycle detector would be activated during asynchronous
    Dispatch::Queue blocks even if ARR_CYCLES_DISABLE was set.
  • Fixed a bug where #send would freeze the app when passed a method name
    which accepts a bool if the method would be used with #send only.
  • Optimized methods converting implicitely types using #to_str etc.
  • Improved String#to_sym performance. ~40% faster.
  • Improved performance in dispatcher. ~20% faster.
  • Improved performance where allocates internal memory of String objects.
    ~10% faster.
  • Improved performance of methods where accepts Regexp object. ~20% faster.
  • Improved String literals performance. ~60% faster.
  • Improved String performance where it handles short strings. ~25% faster.
  • Improved String#{strip, rstrip, lstrip} performance. ~70% faster.
  • Improved String#{[], []=, +, =~} and Array#+ performance. ~20% faster.
  • Improved String#{==, !=} performance. ~50% faster.
  • Improved String#include? with UTF-8 strings performance. ~15% faster.
  • Improved String#{==, <=>}, NSString#== and Hash#== performance if it would
    compare other class object. ~8 times faster.
  • Improved Time#{+, -} performance. ~25% faster.
  • Improved Time#{==, !=, <, <=, >, >=} performance. ~2 times faster.
  • Improved Time#+ with float performance. ~80% faster.
  • Improved Array#{==, !=} performance. ~25% faster.
  • Improved Hash#{==, !=} performance. ~50% faster.
  • Improved Range literals performance. ~20% faster.
  • [iOS] Fixed a bug with the flick' UI test helper not working withUISwitch’ on iOS 7.
  • [iOS] Added support for launching an application for background fetch in
    the iOS Simulator with the `background_fetch=1′ rake option.
  • [iOS] No longer query the simulator application for its window metrics when
    it is connected to a REPL but not the active application.
  • [iOS] Improved the automatic selection of codesign certificates.
  • [iOS] Improved error reporting when specifying the rake target' option
    with a version lower than the configured deployment target and when
    specifying
    retina=false’ when targeting iOS 7.
  • [OSX] Fixed a bug where the REPL wouldn’t work in development mode if the
    app is sandboxed.
  • [OSX] Removed backtrace symbolication when an application is sandboxed and
    print the command to allow the user to symbolicate themselves instead.
  • Jim Weirich, 1956 – 2014. Without you I would not exist. Rest in Peace.

sudo motion update

iOS Marketing Tip of the Week by Mark Rickert


There’s a huge controversy over whether or not you should prompt users to rate your app after a certain number of uses or a predetermined user action.

I use Appirater and have experimented with releasing builds with and without it enabled. In my experience, I get zero reviews/ratings in my apps when I don’t specifically ask the user to do it. It’s unfortunate that users need a personal invitation to give feedback about an app, but in my experience it’s the only way to actually get reviews and ratings. Most users will just dismiss the dialog and move on, but those critical few who actually take the time to rate your app will make all the difference.

Ultimately, you need to decide where you fall on this issue and take what you think is the best course of action for your particular situation.

RMQ Tip


Images

RMQ provides various features for dealing with images.

If you want to load an image from your /resources folder (which is where they should be), you can either load it and cache it (imageNamed) or load it and not cache it (NSBundle.mainBundle.pathForResource):

 rmq.image.resource('foo')  # /resources/foo@2x.png
 rmq.image.resource('foo', cached: false)
 # In a stylesheet
 st.background_image = image.resource('foo')

Capped images

Sometimes when you apply a background_image to a view you want the image to stretch to the size of the view without stretching the corners of the image, for example if you’re making a rounded button. The SDK has a nice feature for this, called UIImage#resizableImageWithCapInsets. It stretches the center of your image, but not the corners.

Let’s say you want to create this, like we did in Temple:

image

The red bar grows horizontally. But it has rounded caps. So we created this image image, which is the caps, plus one pixel to stretch. Here it is blown up and I dimmed the 4 caps:

image

Basically just the center line of it stretches, the other 4 quadrants do not. RMQ makes this very easy. You create a UIImageView, then in the style (or anywhere) you set the image like so:

 rmq.append(UIImageView, :your_style)
 # Then in your style 
 st.image = image.resource_resizable('your_image', top: 4, left: 4, right: 4, bottom: 4)

The top, left, etc, tell which parts of the image not to stretch. You can now resize your view and it will look great.

Snapshot of a view

Lastly you can get an image of a view, meaning a “screenshot” of it:

 my_image_view.image = rmq.image.from_view(some_view)

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


As I was finishing the Dispatch tonight I noticed Dash‘s icon changed, it’s kind of cool. If you’re not using Dash, you really should be.

image

No, I’m not getting paid by them to push Dash, although I should be; Kapeli, call me, and by “call me” I mean send me money via Paypal, Bitcoin is fine too.


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