This checks my collection view if there is something called "BETA". When this is the case, it should look what the itemID of it is. This should be brought together and return something like "2 4" in a plist file.
In my log I get "Teststring 2" and "Teststring 4" but what I need is that it logs "Teststring 2 4". So it needs to bring those two values together.
The Array:
self.content = [NSMutableArray arrayWithObjects:
@{@"itemTitle":@"Passave",
@"itemVersion":@"1.2.0.1",
@"itemBundleID":@"com.Stormar.Passave",
@"itemID":@"0",
@"itemDescription":@"Fill in your password quick.",
@"itemPrice":@"€19,99",
@"itemUrlDownload":@"https://www.dropbox.com/s/vf0wdc3bnida3mb/Passave.zip?dl=0",
@"itemImage":@"https://upload.wikimedia.org/wikipedia/commons/a/a1/Passave.png"},
@{@"itemTitle":@"TopRadio",
@"itemVersion":@"1.3",
@"itemBundleID":@"Stormar.TopRadio",
@"itemID":@"1",
@"itemDescription":@"Listen to music from TopRadio!",
@"itemPrice":@"FREE",
@"itemUrlDownload":@"http://topradiodownloalink.com",
@"itemImage":@"https://upload.wikimedia.org/wikipedia/commons/0/0e/TopRadio.png"},
@{@"itemTitle":@"Shifter",
@"itemVersion":@"1.0",
@"itemBundleID":@"com.Stormar.Shifter",
@"itemID":@"2",
@"itemDescription":@"Switch your symbols with numbers!",
@"itemPrice":@"BETA",
@"itemUrlDownload":@"http://shifterdownloalink.com",
@"itemImage":@"https://upload.wikimedia.org/wikipedia/commons/0/07/Shifter.png"},
@{@"itemTitle":@"Spammer",
@"itemVersion":@"1.1.0",
@"itemBundleID":@"com.Stormar.Spammer",
@"itemID":@"3",
@"itemDescription":@"Spam your friends ;)",
@"itemPrice":@"FREE",
@"itemUrlDownload":@"http://spammerdownloalink.com",
@"itemImage":@"https://upload.wikimedia.org/wikipedia/commons/c/c4/Spammerl.png"},
@{@"itemTitle":@"Mucow Creator",
@"itemVersion":@"0.1.2",
@"itemBundleID":@"com.Stormar.Mucow-Creator",
@"itemID":@"4",
@"itemDescription":@"Create your own Adobe Muse Widgets!",
@"itemPrice":@"BETA",
@"itemUrlDownload":@"http://mucowcreatordownloalink.com",
@"itemImage":@"https://upload.wikimedia.org/wikipedia/commons/0/06/Mucow_Creator.png"},
nil];
The Code:
if ([[self.representedObject valueForKey:@"itemPrice"] isEqualToString:@"BETA"]) {
NSLog(@"BETA YES ID : %@", [self.representedObject valueForKey:@"itemID"]);
NSMutableString *teststring = [[NSMutableString alloc]init];
[teststring appendString:[self.representedObject valueForKey:@"itemID"]];
NSLog(@"Teststring %@", teststring);
[Functions saveDataToPlist:plistPathSMSettings OfType:@"String" Value:teststring ForKey:betaDef];
}