Strange things happens to me, I try to create mutable dictionary, but it return an immutable.
NSMutableDictionary * d = [NSMutableDictionary dictionary];
[d setObject:value forKey:key];
The d NSMutableDictionary is still NSDictionary, see in screenshot. And, of course, application crashes then executing [d setObject:value for:key]

Your problem is that your
valueisnil, and you can’t set anilvalue into a dictionary.Don’t worry about the
__NSCFDictionary *andNSDictionarystuff that you see in the variable inspector. You most definitely have a mutable dictionary. What you see in the inspector is artifacts of howNSMutableDictionaryis implemented (as a class cluster).