I set the NSURLSessionDownloadTask in NSMutableDictionary. Than i want to save this dictionary in NSUserDefaults. I know, i can't save custom object in NSUserDefaults. After searched, i found this answer; How to store custom objects in NSUserDefaults. But i couldn't implement to my code.
Here is pard of code;
[self.downloadTasksDictionary setObject:dlTask forKey:[NSString stringWithFormat:@"%@",customId]];
[[NSUserDefaults standardUserDefaults] setObject:self.downloadTasksDictionary forKey:@"DownloadTaskDict"];
[[NSUserDefaults standardUserDefaults] synchronize];
Is there any way to save this NSMutableDictionary in NSUserDefaults?
Thanks.
