I know this is a core iPhone question but I thought someone here may have solved this for his Nextcloud setup:
Using the setup described at https://docs.nextcloud.com/server/13/user_manual/pim/sync_ios.html all contacts from all address books shown under the Nextcloud contacts app are downloaded but there is no possibility to select to which address book new addresses should be written to. Is this a known Apple restriction?
thanks for giving this a try but your information was already known and refers to select one from multiple accounts one may have (Apple, Google, Nextcloud). But this is not the level I had ask. If one such account has multiple address books, e.g. one personal and one shared with others, one can not select on iOS to which to write new addresses to.
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:
open contacts app in iOS
tap “groups”
select only the address book where the contact shall be saved to
tap “done”
tap + and add a contact and check in Nextcloud where it was saved to. It should be the selected address book
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:
delete carddav account from iOS device
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)
in Nextcloud add some contacts to the address book of user E and share this address book (editable) with you
add your carddav account to iOS
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.