Welcome to the inaugural issue

Hello, my name is Todd Werth, I founded InfiniteRed. We work in RubyMotion everyday on our products and for clients. I created RubyMotionQuery (RMQ) and my co-founder Ken Miller @seriousken created Core Data Query (CDQ).

I felt that the RubyMotion community needed a weekly newsletter. I’ve been thinking about doing this for a while, but I never alloc.inited the time. This first issue is a bit rough but I’ll be improving it as I go along. Please let me know what you think, what could be better, what is awesome, etc.

Lastly, contact me with your blog posts, tips, or just to say hi (seriously).

Happy coding, @twerth

RubyMotion News


11/1/2013 – RubyMotion 2.14 released

New:

  • Mavericks
  • #eval for OS X
  • Instruments
  • Xcode Asset Catalogs

sudo motion update

Articles and Blog Posts


This week

11/9/2013 – “iBeacons and RubyMotion” by Will Raxworthy

11/5/2013 –  “RubyMotion – custom cells” by Nicolas Cavigneaux
It’s in French but Google Translate does a good job.

In case you missed them

7/25/2013 – “Dynamic method performance in RubyMotion” by Ken Miller7/6/2012 – “You should use Core Data” by Drew Crawford
An oldie, but a goodie.

RubyMotion Tips


You can use CocoaPods with many Objective-C libraries or components, but many you cannot. I personally prefer not to use CocoaPods if I don’t have to. If you can’t or don’t want to to use CocoaPods you can just vendor the library.

Simply copy the code into a sub-folder of the /vendor folder. You copy either the files to compile, or the entire Xcode project.
As an example, to include FreeMem, the folders and files would be:
|~vendor/
| |~FreeMem/
| | |-FreeMem.h
| | |-FreeMem.m
| | `-README.md
Then in your rake file do this for a non-arc library:
app.vendor_project(‘vendor/FreeMem’, :static)
Or this for an arc library:

app.vendor_project(‘vendor/XYPieChart’, :static, :cflags => ‘-fobjc-arc’)

RubyMotion Apps



11/7/2013 – Jukely 2.0 released for iOS 
“Jukely matches you with concerts and friends to go with, based on your collective music tastes.”
This video is truly awesome, watch it now!

RMQ News


What is RubyMotionQuery you ask? Check out this video.

RubyMotionQuery v0.5 will have a big change. If you’ve used RMQ, you may know that you can only use the rmq command inside a UIView or UIViewController. If that view isn’t in the subview tree, you can’t use certain features such as traversing and stylesheets. This is especially problematic in UITableViewCells or UICollectionViewCells because they are not added to the table as a subview when they are created. This will be changed in v0.5.

In v0.5 you will be able to use the rmq method in any instance of any class. When you are in an instance that isn’t a subview or a view controller, you can now use all the features of rmq. It will auto-find the appropriate view controller. You can also manually set the view controller of any rmq object. The auto-find feature isn’t 100% accurate, but it’s pretty close.
To accomplish this, some new features were added:
  • rmq.app.current_controller
  • rmq.create_factory(MyClassHere) # For tables and collection views
  • my_view.rmq_data.view_controller = your_view_controller

I hope to release v0.5 this week or next.

RMQ Tips


Enable my_view, disable siblings:

rmq(my_view).attr(enabled: true).siblings.attr(enabled: false)

Console log tips, try these:

rmq.log :tree
rmq(your_view).log :tree
rmq.all.log
rmq.all.log :wide