Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Collection of common rake tasks for the iPhone Simulator.

Merge pull request #10 from xing/update_docs

Adapt Rakefile and README to new usage


Build Status Code Coverage Dependency Status Code climate Gem Version

This gem is a collection of rake tasks for maintaining common tasks for the iPhone Simulator on Mac OS like ...

  • Change preferences of the iPhone Simulator
  • Change the language of the iPhone Simulator
  • Reset the iPhone Simulator
  • Start the iPhone Simulator
  • Stop the iPhone Simulator

Some of them are stolen from RestKit.


Besides the gem dependencies, that are automatically resolved and installed via bundler, there's only one external dependency to the ios-sim binary. The most convenient way to install it is via npm:

npm install ios-sim

Example Usage

You will need to install the gem:

gem install israkel

and then your Rakefile in your project might look like:

require 'israkel'

That's it. After that you can just run rake -T to list the available tasks.

You can also change the default prefix simulator:

ISRakel::Tasks.instance do |i| = 'ios'

Edit (global) Preferences

There are binary plist files that you can edit with your custom rake tasks to change some settings:

i = ISRakel::Tasks.instance
desc "Change keyboard preferences"
task :set_keyboard_preferences do
  i.edit_preferences do |p|
      :KeyboardAutocapitalization => false,
      :KeyboardAutocorrection     => false,
      :KeyboardCapsLock           => false,
      :KeyboardCheckSpelling      => false,
      :KeyboardPeriodShortcut     => false,

There's a second method called edit_global_preferences which works the same, just edits a different file.

Authorize access to addressbook, gps and photos

Allowing access upfront can be required because it's not possible to use KIF to tap on the OK button of the access alert views.

i = ISRakel::Tasks.instance

desc 'Allow AddressBook access'
task :allow_addressbook_access do

desc 'Allow GPS access'
task :allow_gps_access do

desc 'Allow Photo Library access'
task :allow_photos_access do

Even easier, you don't have to define the rake tasks in your Rakefile. There are generic tasks that take the environment variable BUNDLE_ID into account:

DEVICE_TYPE=iPhone-5s IOS_SDK_VERSION=7.1 rake simulator:allow_photos_access


Please raise issues if you find problems or have a feature request.

Something went wrong with that request. Please try again.