Cloudkibo / iOS

iOS Code
0 stars 0 forks source link

Learn iCloud API for backup of "App sandbox Data" like WhatsApp #534

Closed sumairasaeed closed 7 years ago

sumairasaeed commented 7 years ago

This task is to explore how to save "App Data" files to iCloud. Backup files should be hidden and not visible to user on iCloud. This is what happens when watsapp takes backup. We will here learn to find out iCloud API for storing files in this way. The other thing would be to learn how to restore the already backed up data from iCloud during app installation.

Some of documentations we need to go through are these: https://developer.apple.com/library/content/documentation/General/Conceptual/iCloudDesignGuide/Chapters/iCloudFundametals.html

https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloudKitQuickStart/EnablingiCloudandConfiguringCloudKit/EnablingiCloudandConfiguringCloudKit.html

sumairasaeed commented 7 years ago

I have read the documentations and some blogs. There are two ways backup is taken. One is iCloud and other is iTunes. As watsapp uses iCloud so i have focuesed learning towards iCloud. After reading, I have not yet found any API for manually taking backup and storing on iCloud which should not be visible to user. There are ways to store files on iCloud but these will be accessible and visible to user.

I also got to know that iCloud takes automatic data backup for applications which have configured iCloud Entitlements within their app. It backups apps data stored in Document directory of apps sandbox container. However it does not backup any data stored in Cache or temp directory.

I am reading more on it on how can we manually schedule this backup at specific times and how backed up data can be restored when app re-installs after being uninstalled.

jekram commented 7 years ago

Why do we need to backup the data manually? I have seen the API why we cannot use it?

We should not waste time on iTunes.

jekram commented 7 years ago

Why do we need to backup the data manually? I have seen the API why we cannot use it?

We should not waste time on iTunes.

jekram commented 7 years ago

You are way behind schedule so let's not waste any more time. This is not a research project.

sumairasaeed commented 7 years ago

Yes, we know how to save files of App container to icloud. That can be done using iCloud API available. However, the issue was that those files are accessible by user and shown on iCloud Drive. I checked that watsapp backup files are not shown on iCloud Drive. So i explored and found a way we can make them hidden. Will try that solution when working on coding tasks to see if they are visible.

Learning required is done and we have started to code now. We can close this task.