I've been trying to create a contact and assign it a default pic for the past hour.
-
I use the normal contacts module to create and save a person, newPerson with basic fields and a middle name thats like "tmpId" that i use as an identifier for the next step.
-
I use basically this code to get that person by a unique middle name identifier and set their contact image to the last taken image on the device. i reset the middle name to blank. https://github.com/tdamdouni/Pythonista/blob/master/module/contacts-module-access-profile-picture.py
what i'm seeing is exactly the behavior i want: normal person, empty middle name, and a contact pic. however, after about 10 seconds, the contact gets modified to have the middle name set to my identifier and the contact image gone. almost like the mutations get erased. precisely what I don't want.
data points:
* iphone 6s latest os
* all contacts are synced to cloud on google
* manually editing the contact and setting the image works fine
* latest pythonista version
any ideas on how to just create a contact using the CNContact like in the link i shared (rather than just for the mutation step) rather than this two step process?