3 Replies
      Latest reply on Oct 10, 2016 4:02 PM by Mr. Brightside
      MendelK Level 2 Level 2 (90 points)

        Another day, another CloudKit issue :-)

         

        Maybe someone else has encountered this:

         

        Sharing a root record with 5.000 or more child records fails with a "Server rejected request" error:

         

        <CKError 0x600001c54ee0: "Server Rejected Request" (15/2000); server message = "Internal server error"; uuid = 915943EA-2816-426A-93E7-C3B197DA4C95; container ID = "iCloud.com.syniumsoftware.macfamilytree8">

         

        If the root record of the CKShare contains less objects, it works perfectly OR if the CKShare was already present before the 5.000 objects have been created.

         

        We've already filed a bug report for this: #28473396

        • Re: CKShare fails reproducibly for a large number of child records
          MendelK Level 2 Level 2 (90 points)

          Got an answer from Apple developer technical support that they could reproduce the issue and they've asked the CloudKit team if there is anything they can do about it.

           

          Strangely, if the CKShare is created before the other records are inserted, everything is fine and all records (even 100k or much more!) can be shared using the CKShare without any problems or performance issues. Creating the CKShare after inserts (as suggested by the documentation) fails.

           

          Example:

           

          Create a root record to use as a parent for records

          Create 5.000 Records

          Create CKShare with root record

          -> FAILS with "Server Rejected Request"

           

          Create a root record to use as a parent for records

          Create CKShare with root record

          Create 5.000 Records

          -> WORKS

            • Re: CKShare fails reproducibly for a large number of child records
              codingrhythm Level 1 Level 1 (0 points)

              Hi MedelK,

              How did you go with this issue? any updates? I am currently thinking about working on same thing using similar methods. Share root CKRecord with many child CKRecord. What kind of setup do you have? Root record contains all child records or each child records has a reference to root record?

               

              What I really want to ask is. If it's root record contains child records, when a child record is updated (added, modified, deleted), will root record be considered as modified as well? which means when downloading updates from iCloud, it basically sends all child records over the network instead of changed ones. It doesn't feel optimal unless I am wrong.

               

              If child record keep a reference to root record, will child records be shared automatically when root record is shared?