iOS not syncing with NextCloud/CalDAV in background

An iPhone isn’t syncing with a NextCloud calendar in the background. However, when manually opening the Calendar app, events created since the last time opening the app pop up after a few seconds.

These requests are made when opening the Calendar app on the iPhone:

Feb  2 10:18:34 401 1293 - - ---- 738/695/2/3/0 0/0 "REPORT /remote.php/dav/principals/users/$username/ HTTP/1.1"
Feb  2 10:18:35 207 1259 - - ---- 753/711/2/3/0 0/0 "REPORT /remote.php/dav/principals/users/$username/ HTTP/1.1"
Feb  2 10:18:35 401 1200 - - ---- 756/712/2/3/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/ HTTP/1.1"
Feb  2 10:18:35 207 2603 - - ---- 758/713/2/3/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/ HTTP/1.1"
Feb  2 10:18:36 401 1200 - - ---- 755/713/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/personal/ HTTP/1.1"
Feb  2 10:18:36 207 1313 - - ---- 754/712/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/personal/ HTTP/1.1"
Feb  2 10:18:36 401 1200 - - ---- 755/712/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/personal/ HTTP/1.1"
Feb  2 10:18:36 207 2118 - - ---- 755/713/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/personal/ HTTP/1.1"
Feb  2 10:18:37 401 1200 - - ---- 755/716/2/3/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"
Feb  2 10:18:37 207 1264 - - ---- 754/716/2/3/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"
Feb  2 10:18:37 401 1200 - - ---- 760/718/2/3/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"
Feb  2 10:18:38 207 1447 - - ---- 757/716/3/4/0 0/0 "PROPFIND /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"
Feb  2 10:18:38 401 1200 - - ---- 762/721/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"
Feb  2 10:18:38 207 2482 - - ---- 764/722/2/3/0 0/0 "REPORT /remote.php/dav/calendars/$username/inbox/ HTTP/1.1"

No such requests are logged when the Calendar app is not opened. I would expect this behaviour when syncing in the background is disabled, or fetching is set to manually, but this is not the case.

What I’ve tried / checked:

  • The iPhone is not set to Low Power Mode.
  • The ‘Fetch’ setting under Settings → Calendar → Accounts → Fetch New Data is set to ‘Automatic’. I tried setting it to every 15 minutes, but that doesn’t work either.
  • The ‘select schedule’ setting under Settings → Calendar → Accounts → Fetch New Data → the NextCloud account is set to ‘Fetch’.
  • The Calendar app is not in the app list under ‘Background App Refresh’, but the ‘Background App Refresh’ setting itself is set to ‘Wi-Fi & Cellular Data’.
  • I’ve also configured the NextCloud calendar in the iCal application on macOS (11.6). ‘Refresh Calendars’ is set to every minute there, which works: events are synced even when the application is closed.
  • The issue is not fixed by removing and re-creating the CalDAV account in iOS.

I’m running NextCloud version 23.0.0, but I experienced the issue with 21.x as well. The NextCloud health check does not report any problems.

I am aware that this issue may very well have nothing to do with NextCloud, as it works well on the Mac. I hope someone else using NextCloud/CalDAV with iOS has any pointers.

Hi there,

The issue is not on Nextcloud side but within iOS. The device simply does not initiate a refresh in the background, only opening the Calendar (or Contacts in case of CardDAV) initiates a sync.

I have the same issue on multiple iOS devices since at least 3 years.
It started with iOS 11, or maybe even 10.

On my old iPod touch with iOS 9.0.2 it still works perfectly, just tested a few minutes ago to a Nextcloud 22.

All devices I had were new setups from scratch, I never restored from backup, so the problem is not “messy old settings” or “migration issues” or whatever.

Hints like “you have to erase your network settings” do not apply.

Today I installed a test device (iPhone 6S, iOS 15.3.1, no SIM inserted), no apps installed, just 1 Calendar account and 1 Contact account to my Nextcloud and connected to a Mac with Xcode to see the device console log for troubleshooting.

Settings “fetch, 15 minutes”, connected to stable WiFi and I am monitoring on my Nextcloud server.

The devices shows up around every hour to check CardDAV (for the contacts), but nothing shows up for CalDAV.

As soon as I open Calendar however, connections are made and data is refreshed.

Very frustrating indeed.

I’m going to cycle through the different settings (push/fetch/manually/15/30/1 hour) on that device to see if one combination will work.

Since the problem exists since years, Apple does not seem to care or nobody but us two uses CalDAV calendars…