Auto backup in iOS

7 views
Skip to first unread message

P5music

unread,
Dec 5, 2020, 6:16:12 AM12/5/20
to CodenameOne Discussions
My CodenameOne app is intended for iOS and I want that some private app files are automatically backupped, like this:
I would like to know if this kind of code:

public void writeFile() throws IOException {
try(OutputStream os = Storage.getInstance().createOutputStream("/"+APP_DATA_FILE_NAME);) 
{
os.write(appDataText.getBytes("UTF-8"));
os.flush();
os.close();
} catch(IOException err) {
System.out.println("write err");
}
}
is able to leverage the auto-backup feature, that is, the folder the file is written into is backupped.
Thanks in advance

Shai Almog

unread,
Dec 5, 2020, 10:09:20 PM12/5/20
to CodenameOne Discussions
Data in storage and in the file system home directory should be backed up.
Reply all
Reply to author
Forward
0 new messages