Lagunitas – an iOS app inspection tool

If you make iOS apps, sometimes it is helpful to verify that the archive you made via Xcode has what you expected inside of it. Lagunitas is a tool to help you do that, courtesy of @soffes.

I just tried it out and it works great. Here are some usage notes:

I use rvm so I have a nice Ruby 2.0 environment on Mountain Lion, so I installed the Ruby Gem for Lagunitas like so:
rvm use 2.0
gem install lagunitas

After that, I changed to the directory that had an IPA I was interested in.

I fired up irb:
irb

Once in irb, I required (which is like an import) lagnuitas and tried to inspect the app inside the IPA:
require "rubygems"
require "lagunitas"
ipa = Lagunitas::IPA.new("myAwesome.ipa")
app = ipa.app

I was confronted with this error message:

NameError: uninitialized constant Lagunitas::IPA::SecureRandom

And so I guessed at the right require:
require "securerandom"

Voila – that fixed it and everything went well after that:
app = ipa.app
=> #<Lagunitas::App:0x007ff002905570 @path="tmp/lagunitas-e5c477f91f8777d76f2c9e79ececd358/Payload/myAwesome.app">
app.identifier
=> "com.luisdelarosa.myAwesomeApp"

What to put in your gitignore

A question that comes up frequently is what to put in your .gitignore files.  I recently stumbled across a nice GitHub project which has .gitignore templates for every language it seems.

Here’s a few which are useful in my daily workflow:

iOS and Mac projects in Objective-C, using Xcode – This seems to cover both Xcode 3 and 4.

Android projects in Java and Eclipse

OS X (mainly for .DS_Store)

There’s also a nice explanation of how (project-specific) .gitignore and global .gitignore files work.

By the way, if you accidentally checked in a bunch of files you didn’t want to, use “git rm” to remove them from the repository.