Code for motioncast on using Segment.io with RubyMotion