I have stored our Phone Contacts id into an NSMutableSet to do some task.
and now I want to pass mutable set object into an NSArray but I have getting problem when I assign it.
this is my code:
NSMutableSet *newsetadded = [NSMutableSet setWithSet:oldsets];
NSArray *oldDataArray = [newsetadded allObjects];
Please tell me what I am doing wrong in our code..!
Tarun Kumar
07-Dec-2015I think your code is not generating error but I am providing the code for your help.
use mutableCopy method of set class, it may be you get your problem's solution.
If this code is not helpful for you, then I sure your problem is in your oldsets object, check your oldsets again.