Yes, this is my number one concern. All our apps are well under the 200MB limit but we need a solution for local storage for saving preferences. If there’s no solution for this, we won’t have the option to use IAPs.
I’m going to throw out an option here. Regardless of what ever we do with iCloud, your Apple TV pretty much has to be network connected. Parse.com or setting up your own Coronium.io server and store whatever you want. NSUserDefaults should not be hard to implement in Enterprise.
NSUserDefaults will have a 0.5mb limit
CloudKit’s Key-Value pairs will have a 1mb limit
Finally, while there seems to be no local data store, Apple does talk about the caches directory. Have you tried to open/close files in system.CachesDirectory?
I do have a backend where i can store the games state.
But how do i get a unique id for the device, it has to be something that is returned by the OS, cause i cannot create it myself and save it locally as i normally would do.
There is the OpenUDID plugin (iOS only) that will work. system.getInfo() has a “deviceID” option which should return an allowed unique ID that can be used. Of how about a novel idea, don’t tie it to the device at all, but to a user ID. That way people on Android devices that support multiple users won’t interfere with other user’s saved data. If someone gets a new device, since it’s tied to the user, not the device, they can pick up where they left off.
thanks for implementing iCloud-Key-Value-Storage, this really is great, I now will use this for “Freeze!” and “Freeze! 2 - Brothers” so the game progress is synced across all devices, even between the phone/tablet and upcoming tvOS versions.
This is important according to Apple if the Apple TV is offline - the game still needs to know about the selected language, the current level of the game etc.
So the correct way to set this up is:
1.) save all the info (level progress etc.) you need for the player to continue his game locally using NSUserDefaults
2.) additionally save all this stuff using iCloud KVS to sync with the same game on phone/tablet
If Apple tv is online use the iCloud KVS values, if offline use the local backup from NSUserDefaults.
To set this up should be much less effort than implementing iCloud KVS - and again, thanks for that, will start to work with this now.
[quote name=“JonPM” post=“314687” timestamp=“1450662835”]I just voted as well.  This really is something that should be standard.  Other items, IMHO, like Game Center should require popular vote…[/quote] Hi Jon, thanks for upvoting NSUserDefaults! But on Game Cente support I strongly disagree, every game that needs to be taken seriously has to have at least Leaderboards and Achievements. It’s not so much about the players (don’t get me wrong, many love & demand this), it’s more about Apple: It’s even harder to get picked by the Apple Editorial Team for a feature if you don’t support basics like Game Center. They need stories, like “Freeze! 2 now is available for iOS and tvOS, and game progress, Achievements & Leaderboards are shared across all devices!”. With stories like this they will promote their Apple TV, and if you cannot deliver this promise they just will pick another game for a promotion. I will only publish the tvOS version of the game when I can support Game Center, otherwise my chance to be featured might be gone.
I am not saying Game Center is not important, because it is.  I’m merely saying the need to save data locally is a very basic necessity in comparison.  As you said, every game that needs to be taken seriously needs GC, but in contrast, every game needs local file storage.  If the Apple tvOS reviewers review apps in the same manner as they do iOS (i.e. in airplane mode), then lacking local persistent data storage could be grounds for rejection. Â
Hi Jon, of course, that’s what I’m saying, read my earlier post about Apple expecting the apps to work offline. Because of this NSUserDefaults should have a high priority. I just objected to your suggestion to throw Game Center at the mercy of votes. And this in a threat about NSUserDefaults. Best Andreas
This is  the thread that is discussing possible solutions/workarounds regarding local file storage for tvOS. You can read through this thread to get a feel for how tvOS development has been progressing, including resources about tvOS and it’s various challenges. Rob Miracle created a tutorial here that talks about how to use the iCloud plugin so that Corona developers can target tvOS distribution.