I'm trying to get the abid on the new apple's Contacts Framework
.
I want to create an whatsapp scheme URL to open an specific contact's conversation and found at the documentation that CNContact
has a constant called CNContactIdentifierKey
but it's seems not works.
NSURL *whatsappURL = [NSURL URLWithString:[NSString stringWithFormat:@"whatsapp://send?text=%@&abid=%@",text ,mc.abid]];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
NSLog(@"%@", whatsappURL);
}
mc.abid is giving to me a string like this: 86BA6C28-74E5-4A32-A270-5D18C2DFCD3B
.
any help will be appreciated. Thanks