Yearly Archives: 2014

Alert #2

RubyMotion 3.0, Android, WatchKit, a 30 day trial, a new website, and a new pricing model

This is exciting news for the RubyMotion community, Android is huge. The 30 day trial is big too and will help RM grow. The new website is great.

Continue reading

Issue #50

2015 is going to be awesome for RubyMotion

image

RubyMotion news has been slow lately, especially around the holidays. However there are a few exciting things coming soon to the RubyMotion community. One I can’t tell you about, I’m sorry. The other is a new gem that is a group collaboration.

Many authors of popular RubyMotion gems have teamed up to create something new and special. We’re still working on the basic features of the new gem so I can’t announce it today, perhaps in a few weeks. It’s pretty cool, stay tuned.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


December 3rd, 2014 | blog post | by Nicky Hajal
How I Built My First Native OSX App in Just 6 Weeks Using RubyMotion

December 2nd, 2014 | video | by PhraseApp
Translating RubyMotion Apps with PhraseApp

December 2nd, 2014 | screencast | by Jack Watson-Hamblin
RubyMotion for Rails Developers: Auto-Layout (part 2)

December 1st, 2014 | new gem | by Shirk
motion-crescentia – RubyMotion wrapper for the Calabash BDD framework

November 24th, 2014 | screencast | by Jack Watson-Hamblin
RubyMotion for Rails Developers: Auto-Layout (part 1)

November 19th, 2014 | new gem | by Ryan Linton
medic – A RubyMotion wrapper for HealthKit

November 18th, 2014 | blog post | by Jamon Holmgren
ProMotion 2.1.0 Released – Notable Changes

November 18th, 2014 | blog post | by Gavin Morrice
RubyMotion Tutorial for Beginners: Part 2

November 18th, 2014 | blog post | by Gavin Morrice
RubyMotion Tutorial for Beginners: Part 1

November 17th, 2014 | blog post | by Sam Bauch
Making Fabric Play Nice with RubyMotion

November 14th, 2014 | blog post | by Jamon Holmgren
Annoying iOS issues: ApplicationVerification Failed

November 13th, 2014 | blog post | by Roel Bondoc
Rubymotion and Apple TestFlight

Hidden Gem by Gant Laborde


Random Colors for Layouts

Recently I was laying out a design with grid with RMQ’s online grid playground. The ability to easily have each view on the grid take on a separate color, really helps with the contrast of juxtaposed views. If you find yourself in a similar situation with an actual app, the common way was to (usually from the REPL) run:

rmq(UIView).style { |st| st.background_color = rmq.color.random }

That’s quite a line of code! We do this often enough for it to merit a nice shortcut. Currently in RMQ edge, and in RMQ 1.0, you can easily contrast your view with:

rmq(UIView).debug.colorize

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image

One more thing


image

RubyCaribe is a conference for intermediate and advanced software developers who use Ruby, Rails, and related technologies. Located in Barbados, the eastern-most island in the Caribbean. Laurent will be speaking there.


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Issue #49

Happy birthday Dispatch

It’s the one year anniversary of the RubyMotion Dispatch, which is crazy. I wanted to personally thank all our readers and the authors that produce the content we publish or link to. To celebrate, we’ve compiled a list of those authors, you can see the full list here.

To all the authors who have appeared in the Dispatch, thank you

image

A special thanks to Josh Heyer for making this collage.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


November 10th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – RubyMotion for Rails Developers: Views in depth (Part 1)

November 6th, 2014 | blog post | by Richard Taylor
Asset Catalogs with RubyMotion

November 5th, 2014 | blog post | by Richard Taylor
Using iOS8 Launch Screens with RubyMotion

November 2th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – RubyMotion for Rails Developers: View Controllers in depth (Part 2)

RubyMotion News


New 2.38 released

  • Optimized the app executable size when a project has too many Ruby source files, by removing unnecessary internal code. ~30-60% lighter.
  • Disabled armv7s support for iOS projects. If you want to add armv7s support back, simply add the ‘armv7svalue to theapp.archs[‘iPhoneOS’]` config in the project’s Rakefile. This architecture is no longer enabled by default in Xcode.
  • Fixed a bug where a compiled Core Data model would be removed when cleaning when an original xcdatamodeld was not available.
  • Fixed a bug where in certain circumstances cleaning would try to be performed when the vendor dir, e.g. vendor/Pods did not exist.
  • Fixed a few cases where the Yosemite version number was parsed incorrectly.
  • Added support for axel as an alternative to curl when downloading updates, which supports resuming and uses 10 connections to improve speed. Axel is available from http://wilmer.gaast.net/main.php/axel.html or can be installed through Homebrew: $ brew install axel.
  • Fixed a regression where rake spec did not work on OS X platform.
  • Fixed a bug where Dispatch.once did not work correctly with x86_64 on iPhone simulator and i386 on OS X platforms.
  • Fixed a bug where :cflags for :static vendored projects could not override those set by the toolchain by default. E.g. -fno-modules.
  • Fixed the motion --version command invocation to print both the stable and pre-release versions of RubyMotion.
  • [OSX] Fixed a bug where embedded frameworks would not be codesigned as per the current requirements for the App Store.
  • [iOS] Removed Symbols not found... message when app will be deployed into iOS device if Xcode dumped device symbols into user directory.
  • [iOS] Fixed a bug which it could not recognized Provisioning Profile which is generated with “iOSTeam Provisioning Profile”.
  • [OSX] Fixed a bug where BigDecimal#inspect would return invalid string on Yosemite.

sudo motion update

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image

One more thing


At InfiniteRed, we’re starting to use ProMotion as well as RMQ on our projects. This should work well as ProMotion is controller-centric, and RMQ is view-centric. As we do this we’re going to create an RMQ plugin (rmq-promotion gem) that does a few nice integrations. Everything works fine now, but we want it to be smoother, especially when using RMQ for styles. We have no timeline yet, but we’re working on it.


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

This year’s authors

ir_authors_770

It’s the Dispatch’s one year anniversary, to celebrate, we want to highlight everyone who contributed content to the Dispatch over the last year.

Access Ninja
Ainame
Alasdair Monk
Alex Rothenberg
Alex kakubei
Amir Rajan
Andrew Gertig
Arkency
Atsushi Nakatsugawa
Austin Seraphin
Baylor Rae
Benjamin Morgan
Bjorn Maeland
BostonMotion
Brian Pattison
Chris Bartling
Christoffer Lernö
Christopher Speer
Clay Allsopp
Clay McIlrath
Colin T.A. Gray
Confreaks
Daniel Spector
Darren Cauthon
Darren Rogan
David Astels
Dennis Major
Drew Carey Buglione
Eiji Iwazawa
Elliott Draper
Eric Henderson
Erwin Boskma
Francis Chong
Fumihiko Shiroyama
Gant Laborde
Garrett Heinlen
Gavin Morrice
Henrik Hodne
Hwee-Boon Yar
ITO SOFT DESIGN
Ignacio Piantanida
Imanol Fernandez
Iskander Haziev
Ivan Acosta-Rubio
Jack Watson-Hamblin
James A. Anderson
Jamie Wagner
Jamon Holmgren
Jaune Sarmiento
Jens Balvig
Jeremy Groh
Jerry John Jacob
JetBrains
Jordan Maguire
Josep
Joseph Ku
Joshua Ballanco
Justin DeWind
Kamatamadai
Kamil Lelonek
Kareem Kouddous
Katsuyoshi Ito
Ken Miller
Kieran Andrews
Landon Schropp
Laurent Sansonetti
Leigh Appel
Lori Olson
Luke Cathie
Mackato
Maethee
Makoto Kawasaki
Marcus Gartner
Mark Rickert
Mark Villacampa
Masashi Shinbara
Mathew Sinclair
Matt Brewer
Matt Garrison
Matt Green
Michael Denomy
Michael Graff
Michal Taszycki
Michał Taszycki
Mirko Stocker
MotionInMotion
Multunus
Multunus Software
Murtuza Kutub
Nader Hendawi
Neeraj Singh
Nelson Pascoal
Nick Arnott
Nick Pachulski
Nicolas Cavigneaux
Nikolay Nemshilov
Notification Center
Orta Therox
Paul Campbell
Paul Sturgess
Philipp Fehre
Qi He
Ray Hightower
Rob Horrigan
Ruby Commotion – RubyMotion Community Projects
Ruby5
RubyKaigi
RubyMotion
RubyMotionJP
Ryan Grey
Satoshi Ebisawa
Satoshi Watanabe
Scott W. Bradley
Shizuo Fujita (Watson)
Sim
Sotaro Omura
Stalin
Stefan Haflidason
Steve Ross
Sunil Kumar
Tatsuhiko Miyagawa
Terrible Labs
Thom Parkin
Thomas Mayfield
Todd Werth
Tony Hillerson
Tony Issakov
Torben Toepper
W.R. de Vos
Wes Garison
Will Raxworthy
Wouter de Vos
Y.Kentaro
Yuki Moriyama
Yuki SHIDA
bellx2
digitalfx
kyamaguchi
moriyaman
t_nakamura
utwang

A special thanks to Josh Heyer for making the avatar collage above.

Issue #48

People like the new by-week/alert format of the Dispatch

After I sent out the first alert last week, some people contacted me and they liked the idea. So I’ll go ahead and use the new system.

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


October 31st, 2014 | slide deck | by Michał Taszycki
Ruby – Write Once, Run Anywhere – Polyconf 2014

October 30th, 2014 | blog post | by Mark Rickert
Prepending the Default RubyMotion Build Task [UPDATED]

October 29th, 2014 | blog post | by Philipp Fehre
Using Couchbase Lite from RubyMotion

October 26th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – RubyMotion for Rails Developers: View Controllers in depth (Part 1)

October 26th, 2014 | video | by Nikolay Nemshilov
Native iOS Development with RubyMotion and UnderOS

October 20th, 2014 | blog post | by Brian Pattison
Ruby All the iOS 8 Push Notifications!

October 20th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – RubyMotion for Rails Developers: Views and View Controllers

October 15th, 2014 | blog post | by bwarner
App to Distribution to iTunes

RubyMotion News


New 3.0 prerelease (Android)

A new 3.0 prerelease (Android) is out: some compiler and build improvements, more Ruby methods and bug fixes. Enjoy and please keep testing!

sudo motion update --pre

RubyMotion Tip


UIAppearance protocol

The SDK has a concept called the UIAppearance protocol. It’s basically a global place to set various styles.

There are some problems with it:

  • You can only set some attributes on some views and controllers
  • The styles only get applied when a view is created, so you can’t use it for theming, where you need to change the theme while screens are already loaded

You still should use it, because if you can set something’s appearance it saves you from styling it throughout the app.

I usually create an StandardAppearance class like so:

class StandardAppearance
  def self.apply(window)
    Dispatch.once do

      UIWindow.appearance.tap do |o|
        o.tintColor = UIColor.redColor
        # set other attributes here
      end

    end
  end
end

Then I call it in AppDelegate:

StandardAppearance.apply @window

Or if I’m using RMQ (which of course I am), I call it in ApplicationStylesheet so that I can use my named colors, named fonts, etc:

class ApplicationStylesheet < RubyMotionQuery::Stylesheet

  def application_setup
    color.add_named :apricot, '#EEAA22'

    StandardAppearance.apply rmq.app.window
  end

end

The following have attributes you can set with appearance:

  • UIActivityIndicatorView
  • UIBarButtonItem
  • UIBarItem
  • UINavigationBar
  • UIPopoverController
  • UIProgressView
  • UISearchBar
  • UISegmentedControl
  • UISlider
  • UISwitch
  • UITabBar
  • UITabBarItem
  • UIToolbar
  • UIView
  • UIViewController
  • UIWindow

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image

TOL

Thinking out loud


I personally have 4 rules for company culture: hire creative people, hire nice people, be honest with them as much as humanly possible, and then let them create the culture. Nothing else is needed.

I liked her talk on company cultures: Rocky Mountain Ruby 2014 – Your Company is “Awesome” (But is “Company Culture” a lie?)


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Alert #1

Biweekly newsletter and new alerts

I’ve listened to people’s ideas and I want to improve the Dispatch, so I’ve decided to change the schedule. I will send out the newsletter every other week (ish) and I’m also going to send out small alerts (like this one) when needed.

The two-week schedule is because some weeks I can’t find enough great content to include, so I’m forced to have less than great content. I prefer to publish less often and have better content.

There is a second problem: when timely announcements need to be made, such as announcing an RM update, I have to wait until the next issue is published. That’s what these alerts are for.

Today we have two alerts, let me know what you think about the new system.

Happy coding, Todd Werth (@twerth)

RubyMotion News


RubyMotion 2.37 released

  • Fixed a regression where Dispatch.once did not work correctly when it was invoked in some points.
  • Fixed a bug where the compiler would crash with an assertion message [BUG] Object: SubtypeUntil ... when compiling certain Ruby files.
  • Fixed a bug in the compiler when compiling for ARM64 where certain types would still be emitted with a 32-bit architecture in mind.
  • Fixed a bug in the compiler when compiling for ARM64 where certain structs would not be properly available (such as NSDecimal).

sudo motion update

Try 64-bit and submit bug reports to HipByte


HipByte wants me to ask you to please try 64-bit mode, and then submit any bugs you find.

It is not yet enabled by default for applications that do not embed Frameworks or App Extensions. In order to enable it on other builds add the following line to your project’s Rakefile: app.archs['iPhoneOS'] |= ['arm64']

Apple will be requiring 64-bit in all our apps:

https://developer.apple.com/news/?id=10202014a

“Starting February 1, 2015, new iOS apps uploaded to the App Store must include 64-bit support and be built with the iOS 8 SDK, included in Xcode 6 or later. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.”

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Issue #47

ARM64 support (64-bit), build your App Extensions now

Until version 2.36, RubyMotion did not support 64-bit. Because of this, you could not write App Extensions that worked on a device. 2.36 fixes this issue. Go forth and extend.

See below in the release notes for more info.


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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


October 13th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – RubyMotion for Rails Developers: Hello RubyMotion

October 10th, 2014 | blog post | by Christoffer Lernö
The Other Alternatives – While Swift is working towards 1.1, I thought it could be interesting to compile an inventory of languages that position themselves on top of the ObjC runtime.

October 9th, 2014 | blog post | by Jack Watson-Hamblin
Big changes coming to MotionInMotion and RailsInMotion

October 7th, 2014 | new gem | by Eric Henderson
motion-paddle – A RubyMotion gem for the Paddle framework

October 6th, 2014 | podcast | by Access Ninja
Access Ninja episode 004: Austin Seraphin part 1 (Austin is always fun)

October 6th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – Episode 46 – From Interface Builder to NSLayoutConstraints

October 5th, 2014 | new gem | by digitalfx
RubyMotion-Leap-Motion – A starting point for using the Leap Motion in RubyMotion

October 3rd, 2014 | blog post | by Tony Hillerson
RubyMotion Releases Android Public Beta

October 2nd, 2014 | video | by RubyKaigi
Laurent Sansonetti – Inside RubyMotion for Android – RubyKaigi 2014

RubyMotion News


RubyMotion 2.36 released

  • Added ARM64 support (64-bit) for iOS. It is not yet enabled by default for
    applications that do not embed Frameworks or App Extensions. In order to
    enable it on other builds add the following line to your project’s Rakefile:
    app.archs['iPhoneOS'] |= ['arm64']
  • iOS 4.3 and OS X 10.7 are no longer supported, due to internal changes
    that require us to use a newer C++ standard library.
  • [iOS] Fixed a bug where the app.provisioning_profile setting would not be
    configurable in the Rakefile of App Extensions projects.
  • Fixed a bug when copying an ImmediateRef, which isn’t needed anyways,
    because a tagged pointer can not be duplicated either.
  • Fixed a bug where Xcode 6 would cache precompiled headers in a
    hidden location and subsequent vendored builds could fail after cleaning.
  • Fixed a bug where a failed vendored build could cause subsequent builds to
    never actually start.
  • Fixed the build system to remove Xcode 6 noise from vendored build output.
  • Fixed a bug where the #supportedInterfaceOrientations method would be not
    properly included.
  • Fixed a race condition bug in the runtime where a crash would occur if
    the same Objective-C constant was being resolved at the same time from
    different threads.
  • Fixed the motion changelog command to honor the --pre flag, which will
    open the pre-release NEWS file instead.
  • Fixed the motion update --pre command to print a reference to the
    motion changelog --pre command.
  • Improved IO#.read performance to read from files. ~4 times faster.

sudo motion update

Hidden Gem by Gant Laborde


“My custom font is not being positioned right!”

This info might save you a ton of time one day. It’s not specific to anything RM, but that’s what makes it so tricky!

Custom fonts are a great thing to add to any iOS app, but sometimes they pack a hidden cost. The font creator may not have tested their font on iOS/OSX. That’s why generally do my best to stick to Native iOS Fonts. If your font is being clipped in the containing label in any direction, you’re not going to be able to set an inset to fix this. You’re going to need to modify the actual font with a font editor like Mensis or Apple Font Tool Suite. Today I’m showing the latter.

Using the command ftxdumperfuser, which is one of the many commands in the suite, we can force an XML generation of the font attributes. The command used on a font named MetaOT-Norm.otf would be: $ ftxdumperfuser -t hhea -A d MetaOT-Norm.otf and will generate a file called MetaOT-Norm.hhea.xml

In the above command -A is for auto-fuse of the XML in and out (-A d/-A f). “-t hhea” is specifying we’re going to modify the horizontal-header table, where we can pad the font properties correctly.

Modify the properties of this XML file. For me the Descending property needed to be toned down from “-347” to “-247”.

You can then merge your changes back into the file with the command:

$ ftxdumperfuser -t hhea -A f MetaOT-Norm.otf

VOILA! The custom font works like a charm now!

RMQ Tips of the Week


I haven’t done an RMQ tip in a while, so I have a few tips for you this week:

rmq by itself

rmq by itself is the same as rmq(rmq.root_view), it’s just a shortcut. So when you do something like this:

rmq.log :tree

You are really logging the root view’s tree. Same thing for rmq.append(UIButton), that is appending a button to the root view.

The one odd thing is when you’re using a utility, which really doesn’t apply to the root view, such as:

rmq.image.resource('foo')

Technically it still has selected the root_view, but you aren’t using it.

Simple animations

Did you know you can animate simply with rmq? Like so:

rmq.animate do
  rmq(UIButton).nudge r: 40
end

A better way to do that is select something first. In this case q is an RMQ instance selecting all UIButtons:

rmq(UIButton).animate do |q|
  q.nudge r: 40
end

You can read more about it here.

From the Archives

(because it’s easier to copy & paste than to write)


iOS Marketing Tip of the Week by Mark Rickert

Did you know that you can contest bad reviews your apps get in the App Store? I’ve done this a few times when a user gave me a 1-star review for the app lacking a feature that existed since version 1.0.0. Apple actually reads these and the reviews were removed from iTunes within a few days.

Here’s a step-by-step guide on how to get the inaccurate review removed:

  1. Log into iTunes Connect.
  2. In the lower right corner, click the Contact Us link.
  3. From the dropdowns, select: App Store Questions, then Customer Reviews, then Specific Removal Request.
  4. A text block will appear with another contact us link. Click that, fill in the requested information, and submit!

Apple sure makes this hard for us developers to find, but at least there’s a way to contest the inaccurate or inappropriate reviews.

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Issue #46

Yosemite GM, Xcode 6.1 GM, SDK 8.1, and RubyMotion 2.35 all work

I can confirm that all this is working together, and I’m now using it on my production workstation. Your mileage may vary. Earlier this week a lot of us were having problems, but they are all resolved now.

I did this:

  • Upgraded to Yosemite GM from Apple Development center
  • Deleted Xcode 6.01 and emptied the trash
  • Downloaded Xcode 6.1 GM from Apple Development center
  • Installed it
  • Went to the App Store, went to “Updates”, then installed “Command Line Tools (OS X 10.10) Version 6.1”
  • rake clean:all ; bundle ; rake pod:install in all my projects

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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


October 2nd, 2014 | blog post | by Jack Watson-Hamblin
Is RubyMotion Suitable for Client Work?

September 30th, 2014 | reddit thread
Is Rubymotion Suitable for Client Work?

September 29th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – Episode 45 – Size Classes in Xcode 6 Storyboards

September 29th, 2014 | new gem | by Ignacio Piantanida
motion-splash – Create iOS launch images from any UIViewController with RubyMotion

September 18th, 2014 | blog post | by Mark Rickert
Prepending the Default RubyMotion Build Task

RubyMotion News


RubyMotion 2.35 released

  • Fixed a bug that could occur when the only available SDKs are newer than the available BridgeSupport metadata.
  • [iOS] Fixed a bug where it would not symbolicate with rake profile:device. The dSYM file path was changed to fix a bug.
  • [iOS] Fixed a bug where the RubyMotion shared framework would not update even if it changed the code in framework.
  • [OSX] Fixed a bug that would always cause the REPL to crash.
  • Fixed a bug where GLKit functions would trigger a crash when it will run app on iOS simulator.

sudo motion update

RMQ News


RMQ 0.8.0 released

Release notes are here.

It has new landscape, plugin, and iOS 8 features.

RMQ plugins aren’t fully done, but they are mostly done. The first plugin is being built and we’re already using it in an app we’re working on, you can check it out here.

Note: if you get an error about your UITextViewStyler, replace its superclass with UIScrollViewStyler

Hidden Gem by Gant Laborde


You use the internet for docs, stop fooling yourself.

A lot of the Hidden Gems I write about are general Ruby hints or heavily opinionated; today it’s both. I’d like to start with a short anecdote.

One of my favorite life-hacks ever:
“Turn every coat-hanger around in your closet. In a year or 6 months, take every piece of clothing that is still on the reversed hanger and donate it to charity. You’re not using it.”

Today is that coat-hanger moment. Have you EVER? used ri or rdoc? Shy of flights or sea-coders, you can’t even come up with an instance where you need to ri Array RIGHT NOW! Just stop it. I first came up with this as a way to speed up installs on my poor Raspberry Pi, but after watching sinatra install docs, I decided to cut the cord. Join me! Tell your gems not to pull docs anymore, and realize McDonalds has free WiFi, if you ever find yourself needing to look something up on the road.

$ echo 'gem: --no-ri --no-rdoc' >> ~/.gemrc

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Issue #45

Xcode 6 and iPhone 6 fixes

RubyMotion 2.34 was released this week, fixing various problems we’ve been having using new iPhones and Xcode. Go grab and test it.

HipByte released new renewal pricing. What are your thoughts about that?


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

Happy coding, Todd Werth (@twerth)

Articles, News, New Gems, and Blog Posts


September 26th, 2014 | blog post | by Alex kakubei
The Disappointement of Rubymotion

September 25th, 2014 | blog post | by RubyMotion
RubyMotion for Android and Renewals Pricing

September 24th, 2014 | blog post | by Jordan Maguire
Should my company choose RubyMotion or Swift?

September 24th, 2014 | slides | by Paul Campbell
You’re More Powerful Than You Think

September 23th, 2014 | blog post – Japanese | by Satoshi Watanabe
I try using the listLiew in RubyMotion for Android

September 23th, 2014 | blog post | by Kieran Andrews
RubyMotion Android Beta Tip

September 23th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – Episode 44 – Converting Between Android with Java and Android with RubyMotion

September 23th, 2014 | blog post | by Luke Cathie
RubyMotion & Google iOS SDK

September 22th, 2014 | blog post | by Jamon Holmgren
Building iOS forms the ProMotion way with ProMotion-form

September 20th, 2014 | blog post – Japanese | by Fumihiko Shiroyama
I try using the RubyMotion for Android

September 19th, 2014 | new gem | by Qi He
motion-wechat – Rubymotion gem to easily use WeChatSDK

RubyMotion News


RubyMotion 2.34 released

  • All iOS and OS X versions of the runtime have been recompiled with Xcode 6.
  • [iOS] Add support for iPhone 6/6+ launch images. Unless explicitly
    specified, the Info.plist UILaunchImages key is populated from all PNG
    files in the resource directories that start with Default. For iPhone 6/6+
    use the -667h and -736h filename modifiers.
  • [OSX] Fix a bug that made it impossible to build a OS X app on Yosemite
    with Xcode 6 GM, even when targeting 10.9.
  • Fixed a bug that omitted class and protocol methods from the ctags.
    Patch by Rakesh BS.
  • Improved exception backtrace symbolication performance by ensuring the dSYM
    bundle is used when available.
  • Improved Enumerable#inject performance. ~40% times faster.
  • Fixed a bug that could cause clang++ to be called with too many arguments
    for a shell to handle.
  • Fixed a bug that could cause gen_bridge_metadata to be called with too
    many arguments for a shell (on Yosemite) to handle.
  • [OSX] Fixed a bug that made it impossible to use a NSApplication subclass.
  • [OSX] Fixed a bug where it would trigger a crash when it will evaluates a
    expression on REPL on Yosemite.
  • [OSX] Fixed a bug where the build directory for 3rd-party library wouldn’t
    be removed with rake clean command.
  • [OSX] Fixed a bug where it didn’t handle NSTaggedPointerString objects
    when it configured lower OS X version as deployment target on Yosemite.
  • [OSX] Fixed a bug where rake debug=1 freezes lldb with Xcode 6 GM.
  • [iOS] Changed default simulator to ‘iPhone 6’ which it would be introduced
    by Xcode 6 GM.
  • Fixed a bug where Instruments didn’t launch if it would specify a template
    name with “rake profile template=’xxx'”.
  • Fixed a bug where Method#owner will return incorrect owner if the method
    in inherited class would be overrided.
  • Fixed a bug where wrong method would called when it would include module
    which have #viewWillAppear and #viewWillDisappear implementations.
  • Fixed a bug where method would not called when it would include some module
    which have #viewWillAppear implementations.
  • Fixed a bug where #method_missing would receive incorrect arguments after
    calling was cached.
  • Fixed a bug where the build system would ping the update server for each
    target an application project includes.
  • Fixed a memory leak which was created when huge splat would be passed into
    the methods since second argument.
  • Improved Regexp.last_match performance. ~20% faster.

sudo motion update

RubyMotion App of the Week


image

tunedup – by By Sam Bauch

“tunedup is for discovering new music. We play a song clip. swipe right if you like it. swipe left if you don’t. Listen to full songs on Spotify, and login with Spotify to save your favorite songs to a tunedup playlist. We keep track of your likes and dislikes and try to recommend music you might like.”

Gems used:

  • MotionKit
  • AFMotion
  • motion-config-vars
  • sugarcube
  • bubblewrap (core & media)

Pods used:

  • JMImageCache
  • Bolts (for App Links Navigation Protocol – particularly interested in this area of inter-app nav/communication)
  • Mixpanel
  • New Relic
  • MBProgressHud

Also:

  • Spotify framework SDK
  • Apple’s ImageEffects+ library
  • Tapstream – they offer a neat solution for custom onboard links where you can customize first run experience based on the link a user tapped to install the app.

RMQ News


RMQ Edge and SDK 8

If you’re using SDK 8 and use RMQ in landscape, you will want to use RMQ edge. Replace your RMQ gem in your gemfile with this:

gem 'ruby_motion_query', :git => 'git@github.com:infinitered/rmq.git'

We’ll be releasing RMQ v0.8.0 soon; a small but important upgrade. Landscape is great now, before it was meh.

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com

Issue #44

When it rains it pours

People in long lines at the Apple stores (my local store), iPhone 6 shipped today (mine is in a FedEx truck out for delivery, please hurry, we’re running out of oxygen), iPhone 6++ and its awesome camera, RubyMotion beta for Android (that is referred to as burying the lead), automatic update to Xcode 6 (thanks Apple for ruining my morning by breaking my builds), iOS 8 rollout, RubyMotion 2.3 released (minor update), Mark Rickert left his lake “house” and now is at a McDonalds in an unknown city (well I know, but you can’t make me talk), We don’t have to change our apps to Euros for Scotland. Did I miss anything?


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

Happy coding, Todd Werth (@twerth)

RubyMotion News


Public Beta of RubyMotion for Android

image

Read about it here.

A free screencast about setting everything up.

Examples.

RubyMotion 2.33 released

  • Added support for installing pre-releases of RubyMotion. The
    sudo motion update --pre command will install a pre-release build in
    /Library/RubyMotionPre. Currently, the pre-release channel contains
    the first beta of RubyMotion for Android. Enjoy! ^_^

sudo motion update

RubyKaigi 2014 Discount (15% off)

Go here.

Articles, News, New Gems, and Blog Posts


September 23th, 2014 | meetup | by Ruby Ireland Meetup
RubyMotion Ireland – Paul Campbell present an introduction to rapid native iOS app development using Ruby with RubyMotion

September 18th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – Episode 43 – The Raw Experience of Setting Up RubyMotion for Android

September 18th, 2014 | blog post | by Mark Rickert
Prepending the Default RubyMotion Build Task

September 17th, 2014 | slides – Japanese | by Katsuyoshi Ito
CDQ for the first time

September 17th, 2014 | slides | by Sotaro Omura
RubyMotion もくもく会 in Osaka

September 17th, 2014 | blog post – Japanese | by Y.Kentaro
No headers to parse

September 17th, 2014 | interesting tweet | by Ivan Acosta-Rubio
Laurent Introducing Android beta at RubyMotion Kaigi 2014

September 16th, 2014 | blog post | by RubyMotion
Announcing the public Beta of RubyMotion for Android

September 15th, 2014 | screencast | by Jack Watson-Hamblin
MotionInMotion – Episode 42 – Objective-C Basics and Conversion

September 15th, 2014 | new gem | by Qi He
Rubymotion Geocoder wrapper!

RubyMotion App of the Week


image

K2 Poker – by By Stuart Hanscombe

“K2 Poker, become the King of Poker by winning an imaginary $1 Million, starting with just $1 double your way up the mountain of cash by playing everybody’s favorite Poker game, with the added twist of being able to burn your cards along the way. You have been given the advantage, use it wisely.”

Gems used:

  • RMQ => Layout / Stylesheets, event handling, animations.
  • Formotion => settings Page
  • Bubble-Wrap => Sounds
  • Motion-Social => Sharing functionality.

Non RubyMotion gem:

  • Ruby-Poker

Hidden Gem by Gant Laborde


RM Loop Efficiency

We’re all familiar (at least I assume) with ways to loop n times in Ruby.

There’s:

  • The universal for loop for i in 1..n
  • The terse yet readable times loop n.times
  • Finally the witty upto loop 1.upto(n)

Each loop has different readability and implementation speed. Though I’ve always had a proclivity towards n.times do or 1.upto(n), It was my understanding that it’s generally concluded that the ugly for loop wins. After coming across that statement again and realizing how different RubyMotion was from most other implementations, I decided to give it a go.

The Results

To my delight, the results were clearly. for loop in RM is actually the slowest across the board! From 500, to 5 million, and there’s nearly no difference between n.times and 1.upto(n). If I had to give credence to one or the other, it seems upto wins in Normal rake tasks, and times wins with mode set to release.

I’m just happy all results show not to use the ugly for loop.

Try it for yourself!

CDQ Tip of the Week by Gant Laborde


The motion_print gem continues to sprint beyond its dead competitor awesome_print_motion. Besides being smaller and faster, the gem hast started to support detailed printing of common RubyMotion libraries. The new 0.0.3 release can detect and elaborate on the contents of CDQ objects.

https://github.com/MohawkApps/motion_print/pull/7

Sponsor


My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.

Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.

image


If you have any tips, blog posts, or comments, please send emails to todd@infinitered.com