CloudKit webservice

Hi,


We configured iOS cloudkit app and got the iCloud container id from developer portal and App Token from iCloud dashborad and tried to run CloudKit webservice. While running this webservice, we are getting following CORS errors:


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.apple-cloudkit.com/database/1/iCloud.com.metasys.CloudKit-Catelog/production/public/users/current?ckAPIToken=557bdeb18756e12f9335ace5b173c3bae484cec2031c9d083003a170d7a49e93. (Reason: missing token 'access-control-allow-origin' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel).


Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.apple-cloudkit.com/database/1/iCloud.com.metasys.CloudKit-Catelog/production/public/users/current?ckAPIToken=557bdeb18756e12f9335ace5b173c3bae484cec2031c9d083003a170d7a49e93. (Reason: CORS request failed).


Please let us know how can we resolve this issue ?

Which hostname are you making the requests from? Make sure that it's from one of the specified domains for the API token in the CloudKit Dashboard. There is also the option to open requests from "Any domain" to your container if you don't want to restrict where requests can be made from.

CloudKit webservice
 
 
Q