1
votes

An Adobe article from 2012 states that:

"AIR maps File.applicationStorageDirectory and Local Shared Objects (LSOs) inside “Application Support Directory” . Since this directory is backed up on iCloud by default, one must use it only to store application data files that must not be deleted under low memory conditions."

This would be great - I store my Adobe AIR iOS app's savegames in LSOs, they get backed up by iCloud, and when a player installs my app on their new phone or second iDevice, iCloud will download the savegame data automatically and sync it up. Except that doesn't seem to happen, both in my tests and user reports.

Can anyone confirm whether or not iCloud works by default on Adobe AIR LSOs or does anyone know how to get it working? I know I can install an ANE like this one and do key-value pairs, but I'd prefer to have iCloud simply sync the .SOL shared object files which my app already creates using this code:

var sharedObject:SharedObject = SharedObject.getLocal("sharedObjectName", "/");
sharedObject.data = "Hello";
sharedObject.flush();
1
No professional app should rely on LSO for anything important, if the data stored in LSO is important for the app that means you have made a big mistake using LSO to start with. ICloud will not restore LSO as those files are meant to be volatile and discardable. User and system can discard LSO files at anytime. If you use LSO you must accept that its stored data and the file itself can be gone at anytime, if it's not acceptable for you then don't use LSO.BotMaster
@BotMaster Whoa, can you point me to documentation on this? I've been using LSOs for savegames and user settings for years on all platforms, have never had a problem with them disappearing and I was not aware that they're considered temporary files. It was easy to configure Steam to backup/sync/restore LSOs, I just want the same on iCloud.Sarah Northway
You don't know that cookies are volatile and can be discarded at anytime? Or you don't know that LSO are cookies?BotMaster
What do you suggest using instead and how do you get iCloud to sync that?Sarah Northway

1 Answers

0
votes

Try my ANE FPiCloud(free):

import ru.flashpress.iCloud;
FPiCloud.keyValueStore.setString('key', 'value for save');
var value:String = FPiCloud.keyValueStore.getString('key');

Documentation and library here: http://flashpress.ru/blog/ane/iCloud/?lang=en .