1

The app uses CloudKit container to sync data to iCloud. I use Share Extension to load local file data to CloudKit container.

Now the process to load local file to app is following:

  1. Open Share Extension in System File to choose a local file.
  2. Load a local file to CloudKit container.
  3. Sync data to app's CoreData.

The Step 2 and Step 3 is very slow when the file is larger. Maybe there is some wrong logic in my process.

I want to do it as the following process:

  1. Load a local file data to my app's CoreData.
  2. Sync the CoreData to iCloud.

Can I make it by that I do not use Share Extension and load local file in app directly?

A possible solution is that using App Groups and CloudKit container in the same time. Load the data to App Groups at first, then sync App Groups to CloudKit container. Is it a possible way?

What is the best way to do it? Thanks for any help.

Muz
  • 699
  • 1
  • 11
  • 25

0 Answers0