简体   繁体   中英

Synchonising Phonegap app data between ipad and iphone

I have a Phonegap app on the App Store. I am very confused as to how to allow the following senario - a user has a copy of the app on his ipad, he writes to the sqlite database, these changes to the database are synchronised with his copy of the app on his iphone.

Looking at the Phonegap documentation - I can set

preference name="BackupWebStorage" value="cloud"

in config.xml - so this backs up the database to icloud. Is this all I need to achieve what I am after?

Quoting the Phonegap documentation here,

j. BackupWebStorage (string, defaults to 'cloud') - valid values are 'none', 'cloud' and 'local'. Set to 'cloud' to allow the web storage data to be backed up to iCloud, and set to 'local' to only allow local backups (iTunes sync). Set to 'none' to not allow any backups of web storage.

So specifying value="cloud" in the config.xml allows iOS to back up files from the documents directory to iCloud. It is the developers duty to fetch back any information from iCloud that was backed up from an earlier or another installation. See this .

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