Using iCloud for savegames - with Instructions!

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
kctoh
Posts: 2
Joined: Tue Jan 03, 2012 11:45 am

Using iCloud for savegames - with Instructions!

Post by kctoh »

Update - Figured out how!:
Steps to enable iCloud saving of ScummVM savegames are as follows:

1) Set save folder to any folder or sub-folder within "/var/mobile/Library/Mobile Documents" on all iDevices with the same iCloud ID

2) Make a copy of the same savegame on each device. This can be done through manually copying the file through iFile/Dropbox, SSHing or iExplorer or through using a program like GoodReader to download the cloud files locally (Requires that savefolder be set within GoodReader iCloud directory)

* Savegame must be in the same subfolder within Mobile Documents directory for all devices

* Creating a new savegame on one but not the other will yield an "Invalid savegame error" as the files will not be saved locally on the other iDevice

3) iCloud syncing of the savegames should now be enabled. Any changes to the savegame made on 1 iDevice will now be reflected on the others for the savegame file present in both devices.

Enjoy!
Last edited by kctoh on Sun Jan 08, 2012 8:28 am, edited 2 times in total.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Completely wild guess: compare the permissions on the save files on both devices.
kctoh
Posts: 2
Joined: Tue Jan 03, 2012 11:45 am

Post by kctoh »

Just did some more experimenting.

It appears that the "mobile documents" folder on the iPhone/iPad does not quite function as in Lion's mobile documents folder. Lion's mobile documents folder offers Dropbox-like file syncing across Macs.

The one on the iPhone/iPad does display the correct file created on another device, but a file synced this way can not be copied off the device normally. When using iFile to copy the file into a local directory, a "File Exists: File could not be copied" error is generated, and trying to copy the file off USB via iExplorer yields a 0 byte file with the same name. I think it may be that the iCloud version of the file is not really saved locally into the device.

Copying the save file and manually transferring them across devices works though, so it is definitely not the iPhone/iPad having incompatible save formats.

I have tried to set the permissions to 777, but it does not appear to resolve the issue.

Update:

It appears the issue is that iCloud does not save the synced files locally. I set the save directory into the GoodReader iCloud documents folder under "/var/mobile/Library/Mobile Documents/GOODREADER FOLDER/Documents" for both devices. I saved an iPhone game with ScummVM and used GoodReader on my iPad to download the data locally into the iPad. After that, the savegame worked on the iPad. I don't have the iPhone version of GoodReader to test if the reverse works though.

It would be great if this could be implemented into ScummVM, maybe as an "enable iCloud save" checkbox that would set the save directory into the iCloud folder and perform a download of the iCloud files into the iDevice on startup if enabled.

Otherwise, does anyone know of any similar file management apps that use iCloud - that are free? :)

Update 2:
iCloud saving works as long as the save file exists in the iCloud folder on both devices. Updating the savefile on 1 device automatically updates the savefile on the other.
Post Reply