This function gets the date from yesterday; it is working on my emulator but it crashes with my real device.

I am working with Xcode6 Beta 6.

```
var tuple :(value Int, unit:NSCalendarUnit) = (1, NSCalendarUnit.CalendarUnitDay)
var date = NSDate()
var yesterday = NSCalendar.currentCalender().dateByAddingUnit(tuple.unit, value: (-tuple.value), toDate: date, options: NSCalendarOptions.SearchBackwards)

```

This is the error I get on my real device:

```
-[_NSCopyOnWriteCalendarWrapper dateByAddingUnit:value:toDate:options:]: unrecognized selector sent to instance 0x176cca10

```