Just use it setObject:forKey:. I think the reason is that special arrayForKey:and dictionaryForKey:etc. - this is what you get the best type security and should not give up. If you use these methods, and the element is not the default type, it is returned nil.
source
share