RubyMotion Provisioning Profiles

Note: This article on provisioning profiles was first posted in the RubyMotion Google Group on May 10, 2012. It was also referenced on Stack Overflow.

Everything with RubyMotion worked great until I tried to run the sample apps on a physical device. And then I had to spend a few hours wrestling with provisioning profiles. Hopefully this post will save time for somebody else.

In order to successfully run a RubyMotion app on a non-jailbroken iPhone 3GS (via $ rake device) I had to:

The default “iOS Team Profile” didn’t work for me. I had to set explicit values in my rakefile for the app. Here’s my rakefile for the ‘Tweets’ sample app:

require 'motion/project' 
Motion::Project::App.setup do |app| # Use `rake config' to see complete project settings. = 'Tweets' 
  app.provisioning_profile = '/Users/[username]/Library/ MobileDevice/Provisioning Profiles/[string-of-numbers].mobileprovision' 
  app.codesign_certificate = 'iPhone Developer: John Q Developer (A5QZ9QF4Z1)' 

Of course, my name isn’t “John Q Developer”, but you get the idea. Hope this helps!