shareContactCard()
Shares your contact card in a specific chat.Parameters
The GUID of the chat where you want to share your contact card.
Returns
This method completes without returning a value.
Example
The contact card shared is your own contact information associated with the iMessage account.
Use cases
- Automatically share contact information in new conversations
- Respond to contact information requests
- Include contact details in automated workflows
shouldShareContact()
Checks whether you should share your contact card in a specific chat based on the chat’s current state.Parameters
The GUID of the chat to check contact sharing status for.
Returns
true if you should share your contact card, false otherwise.Example
Smart contact sharing workflow
Best practices
- Check
shouldShareContact()before attempting to share to avoid unnecessary API calls - Contact card sharing is typically done once per conversation
- Consider privacy implications when automatically sharing contact information