ICloud Caldav multiput response issue.
I'm posting this since here since i didn't get any response on StackOverflow:
https://stackoverflow.com/questions/52993042/how-to-do-caldav-multiput-delete-for-icloud
Hopefully someone here can help me.
We have an iCloud calendar PHP integration that uses batch CRUD methods as detailed here: https://github.com/apple/ccs-calendarserver/blob/master/doc/Extensions/calendarserver-bulk-change.txt
It appears Apple has updated their servers because since last week suddenly the integration stopped working. There were various changes we could fix, such as creating calendars and events. But <MM:delete/> does not work yet, even though I'm using the exact specs required.
Here's the body:
$body = <<<CALENDAR
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MM:multiput xmlns:D="DAV:"
xmlns:MM="http://me.com/_namespace/"
xmlns:C="urn:ietf:params:xml:ns:caldav">
<MM:resource>
<D:href>/$iCloudUserId/calendars/$calendarName/$eventUid.ics</D:href>
<MM:delete/>
</MM:resource>
</MM:multiput>
CALENDAR;
$response = $client->request('POST', "https://pXX-caldav.icloud.com/{$iCloudUserId}/calendars/{$calendarName}/", [
'auth' => [
'[email protected]',
'third-party-pass',
],
'headers' => [
'Content-Type' => 'application/xml; charset="utf-8"',
],
'body' => $body,
]);
The response i get is an expected 207 Multi-Status but the body is basically empty. This is what it looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:multistatus
xmlns:ns6="http://me.com/_namespace/"
xmlns:ns5="http://calendarserver.org/ns/"
xmlns:ns2="DAV:"
xmlns:ns4="urn:ietf:params:xml:ns:caldav"
xmlns:ns3="http://apple.com/ns/ical/" />
The strange thing is, a regular DELETE for one event works. But then we would have to fire a lot of requests to the server.
Anyone working with the ICloud Caldav that has this issue?
Please or to participate in this conversation.