Hi, I’m back... and yesterday i was recalling this forum, i just came by to tell you my experience.
*Now it works and was easy to solve but difficult to get it there, because it seems is some app issue. I had to close and re-open the app as if it needs to refresh all variables or objects, idk.
I noticed it when i was working on this code, it worked okay and then i took a 15mins break, but when i was back to Pythonista; it suddenly stop working... <<why?! If it was already working just fine>> Well i debugged it and i could see ‘contacts.Person()’ fields being changed and ‘saved’ correctly, BUT those updates only showed up within Pythonista, and not in My Contacts app. It was like if Pythonista retrieved all my contacts from a different app or memory.
Well, after trying changing the code here and there without any success, i just closed the app(slide up) and re-open it, and voila, my code was working again, all contacts’ updates were mirrored in my contacts app.
Now, the code i was testing and worked fine as example. (You can use get_all_people() instead of find() )
primer_valor_de_lista = 0
curr_cb = clipboard.get()
temp_contact = contacts.find('Temporal')
person = temp_contact[primer_valor_de_lista]
#converted = int(curr_cb)
person.phone = [(contacts.MAIN_PHONE, curr_cb)]
Insert Code Here