death7eater
death7eater

Reputation: 1134

Integration of WhatsApp into an iOS application

I successfully integrated WhatsApp into my application. What I am doing is basically opening the WhatsApp application from my application and set the message body according to the text parameter I am passing.

I use below code and it is working perfectly:

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

My problem is: I want to go back to my application if I press the "Cancel" button in WhatsApp. However, once I go to WhatsApp, I stuck in there.

Is it possible to do this?

Thanks in advance...

Upvotes: 0

Views: 568

Answers (1)

Dan Loughney
Dan Loughney

Reputation: 4677

You can't do this in iOS 8, but read the MacRumors article below. I believe what you are looking for is the forthcoming Back to App feature.

http://www.macrumors.com/2015/06/26/hidden-features-in-ios-9-and-os-x-el-capitan/

Upvotes: 1

Related Questions