Skip to content

General structure and API Questions #32

@bumpingChris

Description

@bumpingChris

@XHMM @eveningkid
Thank you @XHMM for maintaining this library!
I'm new to iCloud syncing, and so have a few basic understanding questions. I hope you can help clarify them for me.
Is my understanding on the following correct?

  1. On the mobile device, there are two locations where files are/can be stored:

    1. Local path = app relative path (e.g. /var/mobile/Containers/Data/Application/1A6CCFDA-89DC-4FE7-8CF0-72180FD34FBB/Documents/my.db).
    2. Cloud container path = directory where files are synced to the cloud. (e.g. /private/var/mobile/Library/Mobile Documents/iCloudcomproject~app/Documents/my.db). Files here exist locally AND remotely?
  2. When we execute a method like CloudStore.download, we're getting the latest version of the file from the remote cloud container to the local cloud container? And, once downloaded, we need to use RNFS.copyFile to copy the file from the cloud container to a app-relative location (e.g. RNFS.copyFile(/private/var/mobile/Library/Mobile Documents/iCloudcomproject~app/Documents/my.db, /var/mobile/Containers/Data/Application/1A6CCFDA-89DC-4FE7-8CF0-72180FD34FBB/Documents/my.db)? Is it not good practice to reference files in the local cloud container directly from the app?

  3. What's the difference between CloudStore.download and CloudStore.startDownloadingUbiquitousItem ?

Thank you in advance for your help in all this!

Originally posted by @bumpingChris in #27 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions