Because there is no instance method addObjects:forKey:
in an NSMutableDictionary
.
The method you are looking for is setObject:forKey:
. (https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html)
If you say why you thought the method should be addObjects:forKey:
I can help you in a more generic way. But in general you want to look in Apple's documentation (like in the link above, generally just google the class name), or in look in the headers, in Xcode you can press Cmd-Shit-O and then type the name of a class and you can open the header from there.
A clue that you've got the wrong method in this case is that addObjects
is plural (and forKey
isn't) and you're only trying to add one object.