Question: Is there a way to use existing objective-c methods to do a full deep copy of a NSDictionary or NSArray, that themselves have nested dictionaries or arrays within t
The easy way for a DEEP copy is to simply use CFPropertyListCreateDeepCopy. Here is example (with ARC):
NSDictionary *newDictionary =
(__bridge NSDictionary *)(CFPropertyListCreateDeepCopy(kCFAllocatorDefault,
(__bridge CFPropertyListRef)(originalDictionary),
kCFPropertyListImmutable));
my originalDictionary in this example is an NSDictionary
CFPropertyListRef can simply be cast to NSDictionary as long as the top level entity of the CFPropertyListRef is a CFDictionary.