RubyMotion automatically converts NSNull.null instances to nil making it... difficult to store an NSNull instance. This class and category on NSObject might help!
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
NSNullDammit.h
NSNullDammit.m
README.md

README.md

Objective-C code that helps you assign [NSNull null] within RubyMotion.

add it to your RubyMotion project
$ git clone git@github.com:colinta/nsnulldammit vendor/nsnulldammit
add it to your Rakefile
app.vendor_project('vendor/nsnulldammit/', :static)
use it!
dict = {}
array = [1,2,3]
person = Person.new

dict.setToNull('key')     # dict['key'] = NSNull.null
array.setIndexToNull(1)   # array[1] = NSNull.null
array.appendNull          # array << NSNull.null
person.setToNull('email') # person.email = NSNull.null