How to delete iCloud Key-Value Data

icloud, ios, iphone, sdk

Solution

How about

[[NSUbiquitousKeyValueStore defaultStore] removeObjectForKey:@"key"];

?

Problem

I'm using the iCloud Key-Value Data storage solution, so I'm not working with documents (UIDocument). I've got the syncing implemented, and it seems to work well. However, I need to do some more detailed testing, now, and I can't figure out how to force delete the data on iCloud. How can I delete data from my iCloud account for testing purposes? I've tried this: ``` [[NSUbiquitousKeyValueStore defaultStore] setArray:[[NSArray alloc] init] forKey:@"iCloud_BG_KEY"]; ``` I've also tried this: ``` [[NSUbiquitousKeyValueStore defaultStore] setArray:nil forKey:@"iCloud_BG_KEY"]; ``` As well as turning off iCloud Backup for my app (Settings > iCloud > Storage & Backup > Manage Storage > [my_backup_device] > Show All Apps > [my app]). And of course, I'm deleting my app and rebuilding and running xcode. How can I force delete of the iCloud files (again, for Key-Value data storage)?

Original source