Import fails for Apple (iOS) vCard format
Describe the bug
Apple uses additional fields to provide a more detailed contact info. Ideally these fields could be mapped to Nextcloud so all information is preserved. Alternatively these fields could be sanitized.
Here are the troublesome fields: X-MS-IMADDRESS;OTHER: ADR;<HOME/WORK/OTHER>: EMAIL;<WORK/OTHER>: TEL;<PREF/OTHER/VOICE>;<MOBILE/VOICE/HOME>: URL;OTHER:
Steps to reproduce
- Connect iPhone to PC
- Use 3uTools to export contacts
- Try to import the contacts to Nextcloud Contacts
- See error for contacts with the aforementioned attributes
Expected behavior
Handle the import gracefully.
Actual behavior
Import fails for contacts with aforementioned attributes.
Contact version
6.1.0
Operating system
Debian 12
PHP engine version
PHP 8.3
Web server
Nginx
Database
MariaDB
Additional info
According to https://www.rfc-editor.org/rfc/rfc6350 only the X-name attributes are not official and should not be used. Attributes like "TEL;VALUE=uri;PREF=1;TYPE="voice,home":tel:+1-555-555-5555;ext=5555" and "TEL;VALUE=uri;TYPE=home:tel:+33-01-23-45-67" are explicitly mentioned in the RFC and should be supported by the Contacts app.
It looks like the TEL;VALUE=uri;TYPE=cell:tel:+33-01-23-45-67 is not correctly working in NextCloud 30.0.5, the contact gets created with: Telephone: Mobile tel:+33-01-23-45-67
When manually removing the tel: part from the vCard, it works. But as you mentioned, the RFC for version 4 expects type VALUE=uri and therefore tel: needs to be included in the value.
However, I have also seen some online vCard checkers to make the same mistake. Not sure why.