w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Read/Write NSSet/NSMutableSet to file

Use an array as an intermediary. Writing:

NSArray* temp = someSet.allObjects;
if (![temp writeToURL:someURL atomically:YES])
    /* handle error */;

Reading:

NSArray* temp = [NSArray arrayWithContentsOfURL:someURL];
if (!temp)
    /* handle error */;
NSMutableSet* set = [NSMutableSet setWithArray:temp];




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.