1

I would like to be able to place a call using a WhatsApp number from my iOS app. How can I do that?

tobygriffin
  • 5,339
  • 4
  • 36
  • 61
Kisoth Srinathan
  • 115
  • 2
  • 10
  • 2
    I don't think its possible to make a voice call via whatsapp from your own application. Here is WhatsApp documentation on what you can do: https://www.whatsapp.com/faq/en/iphone/23559013 – Hodson Feb 02 '17 at 10:35
  • mm. I tried a lot and gave up finally. :( – Kisoth Srinathan Feb 07 '17 at 10:48
  • It is posible in andoid .. https://stackoverflow.com/questions/38655458/android-make-whatsapp-call. please let me know anyone has the update for the same .. – Vivek Gajbe Jul 21 '20 at 11:05

1 Answers1

-2

You should ask WhatsApp how to do so. The solution lies in URL Schema: https://www.whatsapp.com/faq/de/iphone/23559013

Here the code copied from their site, in Objective-C. I'll keep it as an exercise to do so in Swift:

NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
    [[UIApplication sharedApplication] openURL: whatsappURL];
}

And just to make it sure: They won't let you send messages directly to someone, and even more: They won't let you send you messages silently, without WhatsApp being opened before.

Andreas Oetjen
  • 9,889
  • 1
  • 24
  • 34