Provisioning Profile Troubles - ParkinT/RubyMotion_Life GitHub Wiki

Solutions to difficulties with Provisioning RubyMotion apps


Thanks to RayHightower for this step-by-step process:

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:

  • Delete all of the expired provisioning profiles in the Mac OS X Keychain Access app. Yeah, my past is littered with many random experiments :-)
  • Explicitly set the path to my provisioning profile in the rakefile for the app (the defaults didn't work for me).
  • Explicitly set the name of my codesign_certificate.

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 at https://github.com/HipByte/RubyMotionSamples :

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

Updating (or validating) iOS Team Provisioning Profile

  1. Create a project profile from the Apple Developer portal
  2. In X-Code Organizer, select Provisioning Profiles under the iPhone device
  3. Select the invalid iOS Team Provisioning Profile
  4. Select Editor, Refresh from Developer Portal (this will locate any missing certificates and use the portal to generate and deploy a new one)