خرید بک لینک

Vote count: 0

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.

asked 22 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 16 خرداد 1395 ساعت: 0:51

صفحه بندی