<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title> - Ruby Motion</title>
	<link href="https://www.fullstackstanley.com/tags/ruby-motion/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="https://www.fullstackstanley.com"/>
	<generator uri="https://www.getzola.org/">Zola</generator>
	<updated>2015-08-23T00:00:00+00:00</updated>
	<id>https://www.fullstackstanley.com/tags/ruby-motion/atom.xml</id>
	<entry xml:lang="en">
		<title>My first iOS app with RubyMotion in 2015</title>
		<published>2015-08-23T00:00:00+00:00</published>
		<updated>2015-08-23T00:00:00+00:00</updated>
		<link href="https://www.fullstackstanley.com/articles/my-first-ios-app-with-rubymotion-in-2015/" type="text/html"/>
		<id>https://www.fullstackstanley.com/articles/my-first-ios-app-with-rubymotion-in-2015/</id>
		<content type="html">&lt;p&gt;So, I&#x27;ve taken to learning RubyMotion specifically to make iOS applications.  This blog is all about my experience as a fresh iOS developer with no prior experience with Objective C or Swift.  I&#x27;ll go through the benefits, the bottlenecks and what I intend to do in the future.&lt;&#x2F;p&gt;
&lt;span id=&quot;continue-reading&quot;&gt;&lt;&#x2F;span&gt;
&lt;p&gt;Here&#x27;s a screenshot of my App. It&#x27;s a very simple guitar tuner called Tune Fork. For anyone that doesn&#x27;t play guitar, the strings occasionally need tuning and some songs need playing in different tunings, too.  This app&#x27;s purpose is to make tuning easier. It&#x27;s certainly not a unique app. Similar apps exist, but I felt it was a reasonably simple app to make for my skill level.&lt;&#x2F;p&gt;
&lt;img class=&quot;gfyitem&quot; data-id=&quot;NiftyCreativeDutchsmoushond&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&#x2F;&gt;
&lt;p&gt;There are 3 tabs: &lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The tuner, which plays the notes out loud&lt;&#x2F;li&gt;
&lt;li&gt;The profiles tab, which lets you select or create custom tunings.&lt;&#x2F;li&gt;
&lt;li&gt;The settings tab, which adds some minor customisations to the tuner.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;RubyMotion is comparable to Ruby, with the added project generator and various rake tasks for compiling and testing out of the box.  These are useful, but I had no prior experience with iOS development and I spent most of my time reading books and watching screencasts on how to use it.&lt;&#x2F;p&gt;
&lt;p&gt;I really wish that RubyMotion came with &lt;em&gt;more&lt;&#x2F;em&gt; documentation and &lt;em&gt;more&lt;&#x2F;em&gt; handholding for beginners. The getting started guide consists of basic terminology, installation, a list of recommended text editors and a &amp;quot;Hello World&amp;quot; application for iOS and OSX. I appreciate that there are a lot of samples but for a paid programming language I expect more documentation.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;motioninmotion.tv&quot;&gt;MotionInMotion&lt;&#x2F;a&gt; has some incredible screencasts that really made RubyMotion click for me, especially the RubyMotion for Rails Developers series. It&#x27;s disappointing that FluffyJack seems to have stopped making them. Considering it costs $9&#x2F;month and boasts a &amp;quot;New Episode Every Monday&amp;quot; - as of now (August 22nd, 2015) there hasn&#x27;t been a screen cast since April 7th. That&#x27;s a lot of missed Mondays! His book, RubyMotion for Rails Developers, which I preordered, also appears to be abandoned, with no sign of updates since the initial sample chapter.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;motion-toolbox.com&#x2F;&quot;&gt;Motion Toolbox&lt;&#x2F;a&gt; is a simple website that helps you find gems. It leaves a lot to be desired if, like me, you don&#x27;t really know what you&#x27;re looking for. Categories are cool and all but having a text search like &lt;a href=&quot;https:&#x2F;&#x2F;rubygems.org&quot;&gt;RubyGems&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;packagist.org&#x2F;&quot;&gt;NPM&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;packagist.org&#x2F;&quot;&gt;Packagist&lt;&#x2F;a&gt; would be more useful.&lt;&#x2F;p&gt;
&lt;p&gt;There are a lot of gems out there that try to hide the cruft of Objective C which leaks through to RubyMotion. ProMotion, MotionKit, Sugarcube, RMQ, Bubblewrap, MotionPrime... the list goes on.  You would think that this is a good thing; however, as a beginner it&#x27;s quite overwhelming. Some of these gems have overlapping responsibilities it&#x27;s difficult to know which combinations to use.&lt;&#x2F;p&gt;
&lt;p&gt;The RedPotion gem makes this a non-issue. RedPotion glues a few of these gems together.  Namely, ProMotion and RMQ, as well as other useful gems. It has detailed documentation to get you started. It also comes with a lot of useful generators and a sensible directory structure. It&#x27;s essentially Rails for  RubyMotion.&lt;&#x2F;p&gt;
&lt;p&gt;If RedPotion is Rails then RMQ is jQuery. As quoted from their Github, &amp;quot;fast, non-polluting, chaining, front-end library. It’s like jQuery for RubyMotion plus templates, stylesheets, events, animations, etc.&amp;quot;.  My favourite feature of this gem is the live stylesheet reloading which allows editing the styles without recompiling the application - a huge time saver!&lt;&#x2F;p&gt;
&lt;p&gt;With the documentation from all of the gems that RedPotion brings you can get a surprising amount of work done. Problems arise when you want to steer away from the happy path, though. For example I wanted to change a significant amount of the colour scheme of my app and with certain elements it can be very awkward.  Along side a lot of Googling, &lt;a href=&quot;http:&#x2F;&#x2F;revealapp.com&quot;&gt;Reveal&lt;&#x2F;a&gt; and the Sublime Text Plugin &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;kyamaguchi&#x2F;SublimeObjC2RubyMotion&quot;&gt;SublimeObjC2RubyMotion&lt;&#x2F;a&gt; have been incredibly useful.&lt;&#x2F;p&gt;
&lt;p&gt;The majority of problems can be solved with Google but it&#x27;s very rare to see an answer in RubyMotion. It&#x27;s a shame, but I don&#x27;t feel pretending Objective C or Swift don&#x27;t exist is a viable option. I may end up reading one or two books on iOS development in Swift in the future, as I believe it would be hugely beneficial. I fear there will never be a time when I can Google a question and assume that the answer is already available in RM.&lt;&#x2F;p&gt;
&lt;p&gt;In terms of community RubyMotion has the disadvantage of the added cost. This steers a significant amount of people away from RM but the people that &lt;em&gt;are&lt;&#x2F;em&gt; there are very helpful and fast to respond to any questions. &lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;d like to see a way to encourage programmers from other CLI driven languages to pursue RubyMotion. Node, [Modern] PHP, Python developers etc. As far as I&#x27;m aware there is no alternative in those languages. Although they may not know Ruby they still might enjoy the workflow that RubyMotion and RedPotion bring.&lt;&#x2F;p&gt;
&lt;p&gt;In summary, RubyMotion is far from perfect, but if you prefer the &amp;quot;webdev&amp;quot; workflow of CLI generators, REPL and using your preferred text editor I think it&#x27;s worth a shot - especially with the RedPotion gem. Aside from a few hiccups, it&#x27;s quite enjoyable to use. I know that I would never have made my first app if RubyMotion and RedPotion didn&#x27;t exist so I&#x27;m quite pleased that I gave it a go.&lt;&#x2F;p&gt;
</content>
	</entry>
</feed>
