1. Convert a string to an array
NSString *string = @"a,b,c,d";
NSArray *array = [string componentsSeparatedByString:@","];
2. Convert the array to a string
NSArray *array = @[@"a",@"b",@"c",@"d"];
NSString *string = [array componentsJoinedByString:@","];
The mutual conversion depends on what symbol is used to separate the elements, and what symbol is used for splicing. The commas "and" above can also be replaced by dots " ." Or comma "and"