1

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

Akhilrajtr
  • 5,170
  • 3
  • 19
  • 30
jescabias
  • 33
  • 1
  • 8

1 Answers1

0

Official Whatsapp API solution

I believe you should solve your need with the new Whatsapp official solution I mentioned in THIS OTHER ANSWER (because S.O. policies I had to put a link to the solution, no duplicates).

DavidTaubmann
  • 3,223
  • 2
  • 34
  • 43