Regardless of your opinion on Monkey Patching, it's something programmers have been doing for years. Like any other decision, it has its tradeoffs. It gives you extra functinality on top of your base classes, but you could run into namespacing issues, or suprise teammates through unexpected functionality on classes they're familliar with.

In RubyMotion, there's an additional cost: visibility into what you're actually editing isn't as clear as you might think.

➜  monkey-test  rake
    ...
  Simulate ./build/iPhoneSimulator-7.1-Development/monkey-test.app

(main)> Hash.ancestors
=> [Hash, NSMutableDictionary, NSDictionary, Enumerable, NSObject, Kernel]

What are the implications of this?

Let's hit a url with AFMotion, and see what we get back

class Film
    def Film.search(item, &block)
      url = "https://www.fandor.com/api/2/films.json?searchTerm=#{item}"
      AFMotion::JSON.get(url) do |response|
        puts response.object.class    # => Hash
      end
  end
end

RubyMotion and AFMotion report that we get back a hash. Let's test that.

class Hash
  def monkey_patch
    'ooh ooh ooh'
  end
end

...
AFMotion::JSON.get(url) do |response|
  puts response.object.class    # => Hash
  puts {}.monkey_patch          # => 'ooh ooh ooh'
  puts response.object.monkey_patch # => NoMethodError
end

But when this code gets run, an error gets thrown:

(main)> Hash
(main)> 'ooh ooh ooh'
2014-08-18 10:45:01.080 flow[16095:70b] film.rb:27:in `block in search:': undefined method `monkey_patch' for #<Hash:0x934b5b0> (NoMethodError)

That's because RubyMotion lies. Hash is built on NSMutableDictionary. AFMotion returns an NSmutableDictionary masquerading as a Hash. Our Monkey-Patch doesn't work, because we're patching Hash, not the Obj-C class.

Once we know this, the fix is easy:

class NSMutableDictionary
  def monkey_patch
    'ooh ooh ooh'
  end
end

...
  puts response.object.class    # => Hash
  puts {}.monkey_patch          # => 'ooh ooh ooh'
  puts response.object.monkey_patch # => 'ooh ooh ooh'

TL;DR - if you're monkey patching an Object in ruby, consider patching the superclass if it's an Obj-C class.