[Help] CardDAV multiple address books on iOS - select default

I was facing the same problem and just had a closer look. I found out that the
different addressbooks are listed as groups in iOS contacts app (beside groups created in MacOS). You can choose them by opening the contacts app and tapping on groups (top left corner).

to add a contact to a specific address book:

  1. open contacts app in iOS
  2. tap “groups”
  3. select only the address book where the contact shall be saved to
  4. tap “done”
  5. tap + and add a contact and check in Nextcloud where it was saved to. It should be the selected address book
  6. in iOS contacts app tap “groups” and select all groups to let iOS contacts app display all available contacts again

I use one addressbook and one shared from another user. I played a bit around and could setup my own address book as the standard address book (where iOS stores added contacts, if all “groups” are selected in iOS contacts app) - before it was the shared one, which I didn’t like.
This approach might not be applicable in every setup and I am also not sure, if this works everywhere, but it might be worth a try:

  1. delete carddav account from iOS device
  2. create a new user in Nextcloud whose name is bigger in alphabetical order than mine (for example: mine starts with an D, new users one starts with an E)
  3. in Nextcloud add some contacts to the address book of user E and share this address book (editable) with you
  4. add your carddav account to iOS
  5. on iOS created contacts will be stored in users addressbook

It looks like iOS chooses as the main address book the first one found in alphabetical order by column principaluri stored in the database which is “/principals/users/[USERNAME]”. And this is only done when setting up the account in iOS. Changes afterwards wont help - the account needs to be deleted from iOS and readded.

Again: this might not be the standard behaviour. All I can say is that this worked for me and it might be worth a try. It would be great, if users could report here, if this approach worked for them as well.