tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.1k stars 525 forks source link

Do not sync iOS contacts across multiple devices #6773

Open chandradeepdey opened 7 months ago

chandradeepdey commented 7 months ago

Bug in mobile app

Describe the bug When I enable contacts integration on my iPhone, the contacts show up on my iPad as well. When I enable contacts integration on the iPad as well, two copies of Tuta contacts show up on both devices.

To Reproduce Steps to reproduce the behavior:

  1. Have two iOS devices
  2. Enable contacts synchronisation

Expected behavior Only the Tuta app installed on a device should determine the contacts that show up on that device.

Smartphone (please complete the following information):

charlag commented 7 months ago

@chandradeepdey thank you for your bug report. It does seems like it's happening because of iCloud sync for some reason even though the contacts should stay local

chandradeepdey commented 7 months ago

@charlag Thanks for the reply. The contacts definitely don't seem local. They show up on iCloud.com too. It is as if they are iCloud contacts, with an extra label that puts them in the Tuta list.

In the Contacts app, Tuta contacts are part of the "All iCloud" contacts as well. If I set up Google contacts from the iOS Mail app, they are clearly separated in the app and do not show up on the iCloud list.

chandradeepdey commented 7 months ago

I checked the PR and skimmed over some Apple documentation, are you sure that the local container thing is correct? I feel like it should be an unassigned container (or carddav/exchange, even though Tuta is neither). Sorry if wrong, never wrote code for iOS

charlag commented 7 months ago

Hey, thank you for checking it, Apple docs say

"A container for contacts only stored locally on the device."

https://developer.apple.com/documentation/contacts/cncontainertype/local

Others also mention ". You are guaranteed that if the iCloud container is present, it will be of type CardDAV"

https://stackoverflow.com/questions/33509487/how-do-we-know-which-cncontainer-represents-icloud

so I'm not sure how this could go wrong

chandradeepdey commented 7 months ago

Thanks for the link.

I googled a bit more. There are some comments here stating that the local container is not used when iCloud sync is enabled.

charlag commented 7 months ago

thank you, we will check it again

chandradeepdey commented 1 month ago

https://developer.apple.com/documentation/ContactProvider 👀