File storage

Hi! I voted for NSUserDefaults, too. Support für Game Center on tvOS is also important for us. :slight_smile:

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. :wink: Best Andreas

What is the status for io.* capabilities for tvOS?

io* should work with system.CachesDirectory, system.TemporaryDirectory and system.ResourceDirectory. Anything else needs to go to iCloud.

Rob

So there is no system.DocumentsDirectory for tvOS? What takes it place?

The bulk of this thread deals with the fact that there is a very small amount of local storage available to tvOS apps. See below thread for details:

https://forums.developer.apple.com/thread/16967

I only need a small amount to store a high score. I looked through the thread you provided but I did not see a solution for local persistent data.

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.

@Rob Miracle

When do you think there will be a solution for saving local files?

Does the user have to be using iCloud for the iCloud plugin to work?

I would imagine so.  It stores the data to that specific users “cloud”.  

Then I am sure this makes sense as a solution for storing game data (like high score, etc).

The problem is your app also needs to work while the device is offline.

  1. You can’t force a user to use iCloud. But you can encourage them and not being able to save things is encouragement.

  2. We are looking at adding support for user preference style KVS that’s local. It’s even more restricted on the amount of data  you can save with it. I need to get back with Engineering after the holidays are over. Many people are still returning from their vacations and such.

Rob

You of course could also use the Parse plugin. Still requires internet access, but it doesn’t require iCloud. This would pass Apple’s rules.

Rob

@Rob Miracle

What do you mean by “This would pass Apple’s rules.”? What rule are you talking about?

If you were to submit your app and tell the user they must turn on iCloud, I suspect Apple would reject your app for forcing the users to use it.

Rob

I voted for the NSUserDefaults, however  I was using ice.lua that sits on top of sqlite3.  A working sqlite3 would be more valuable than NSUserDefaults I think.