My first app (built in RubyMotion) was just submitted to the App store today.
It wasn’t nearly as easy as I thought it would be.
Here’s what RubyMotion says to do to get an app to market:
If you go through that, you’ll notice they give all of a paragraph to what you need to do. What they don’t tell you is, well, hey you have to use Xcode to upload your app. Ok, that’s fine. Then they don’t tell you you need to update your Rake file so that it doesn’t reference
app.codesign_certificate = 'iPhone Developer:
app.codesign_certificate = 'iPhone Distribution:
I’m sure it’s basic stuff, but for someone getting into mobile development, it’s the little things like that which burn away hours of your time trying to figure out why RubyMotion is complaining, “no identity found” when you run rake:Archive.
If you are brand new to iOS development you’ll want to follow this document:
Part I above will get you through all the basics of being able to have a development cert, that is tied to a development provisioning file.
Now, you’ll need to follow up in RubyMotion to get that provisioning file and cert recognized… Mostly in the Rakefile you have to add a couple lines in the
Motion block, like so:
app.provisioning_profile = ‘[your path to your developer provisioning file]’
you’ll be downloading that provisioning profile from apple in the tutorial above. Just point to it… then when you do a rake device (and have a iPhone plugged in to your mac, it will deploy to it.
This is a far cry from the RubyMotion decree: Just plug your phone in and type rake:device! It’s that easy!
They really need to update their instructions.
Deployment to the App Store
Once you get to the stage of deployment (which Apple calls distribution), you need to create another cert and provisioning profile … this time for production use. You can follow this guy’s great tutorial on how to do that:
Now you’re all set to follow yet another tutorial… This time for RubyMotion:
Some things are not specified, but in the image the author provides, you’ll notice he changes the codesign_certificate from ‘iPhone Developer:’ to iPhone Distribution. That really hung me up because I kept failing authorization on my end or apples. Also, he uses app.device_family [:iPhone, :iPad] I couldn’t get my iPad icons getting found! so I gave up. I went with iPhone only.
Now you’ll be uploading via the App Loader in Xcode – after having set up your application in iTunes Connect. It will work, as long as everything is connected… the domain of the app, the cert, the production (distribution) profile…
OK – so it’s true I got a RubyMotion app (first time writing a mobile iOS app) to iTunes in under a week. My background was a developer with a Ruby/Python and Groovy/Grails background. I’ll update in a separate post how hard/easy the whole process was, and what are the hurdles to new developers thinking of RubyMotion for iOS development.