Using the example code for contact picker and added a catch to see what the error is. I'm getting the error TypeError: undefined is not an object(evaluating 'data.name'). Appears that the data variable is null after selecting a contact. I'm testing on my iphone using the Q2 Developer total access app and have given the app permission to access my contacts.
<script>
window.tecton.connected.then(function(tecton) {
tecton.sources.pickContact().then((data) => {
document.querySelector('#recipient-name').value = data.name;
document.querySelector('#recipient-phone').value = data.phone[0];
document.querySelector('#recipient-email').value = data.email[0];
}).catch((err) => {
document.getElementById("demo2").innerHTML = err;
});
});
</script>