[Previous] How to Disable VLC Crash Reporting | Home | [Next] Autonomy Respecting Relationships

MacRuby and the Mac App Store

I wrote a MacRuby platformer game called Gruesomely Hard Platformer and it is now for sale in the Mac App Store. I made the graphics myself. I'm not an artist :) But I think it's fun. I wrote the physics and gameplay and everything from scratch, it doesn't use any game making framework or engine.

Click here to see screenshots or buy it.

Click here to see a demo video on youtube.

I wanted to record some tips and tricks for how to get a MacRuby app to work. There's a few problems that are not user friendly at all. I had to find solutions in a bunch of different places. Hopefully this compilation will be helpful to some. This is what worked for me October 2011 with Xcode 4.1 and OS X 10.7.

- MacRuby version 0.10 (the latest stable) will give you an error about symbolic links when you try to validate for app store submission. Download and install the latest nightly version.

- You need three certificates for code signing. In the Certificate Utility, download the WWDR certificate from the Overview section. Then go to Certificates and create two distribution certificates. Do not select both checkboxes. Choose Distribution then only check the first box. Then create a certificate following the instructions. Then do the same thing again using the same CSR (Certificate Signing Request) file, but with only the second checkbox checked. Double click the certificates after you download to add to your keychain.

- You need an app ID. You do not need a provisioning profile unless you're using specific features like Push Notifications or iCloud.

- In Xcode, add your app as a build target to the deployment scheme.

- In Xcode build settings, remove the i386 architecture.

- In Xcode build settings, add 3rd Party Mac Developer Application as the code signing entity.

- For testing your app, use the scheme named after your app and click Run.

- Use NSBundle.mainBundle.resourcePath.fileSystemRepresentation instead of File.dirname(__FILE__)

- To test the standalone app you will submit to the app store, change to the Deployment scheme and choose Archive from the Product menu. Then choose to share and the Application radio button and you can save it to disk.

- For submitting to the app store, first get your app in the "Waiting For Upload" state not preparing for upload. You have to click a button in iTunes connect that sounds like you're going to upload it now, even though you aren't actually going to upload via your browser. Then go back to Xcode and do Archive, then deal with code signing (see next item), then choose Validate followed by Submit. You cannot validate it before getting to the ready to upload state in iTunes connect.

- Xcode will code sign your app, and it will pass validation, but it doesn't work. You need to manually sign it. Right click the archive and pick Show in Finder. Then type "cd " (with the space) into a terminal window and drag the archive in, then enter. That gets you to the archive folder. Then I did this:
cd Products/Applications/; codesign -f -s "3rd Party Mac Developer Application: Elliot Temple" Gruesomely\ Hard\ Platformer.app/
- If Apple automatically detects problems with your app submission, such as code signing issues, they will email you with the errors. But in Apple Mail the email may appear blank (it did for me with my Google Apps email). If so, read it in webmail.

I still got a bunch of code signing warnings emailed from iTunes. They were for files inside the app, but not the main bundle. I don't know how to fix them, but Apple accepted my app anyway, so they can be safely ignored. Hopefully a future version of MacRuby or Xcode will fix it.

Elliot Temple on October 19, 2011


What do you think?

(This is a free speech zone!)