简体   繁体   中英

Does iCloud automatically backup/restore AIR Local Shared Objects?

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();

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM