Ios 如果没有UIactivityViewcontroller和UIDocumentInteractionController,我如何在whatsapp中直接共享gif?

Ios 如果没有UIactivityViewcontroller和UIDocumentInteractionController,我如何在whatsapp中直接共享gif?,ios,objective-c,Ios,Objective C,我想在没有UIactivityViewcontroller和UIDocumentInteractionController的whatsapp中共享gif,是否可以直接共享gif?怎么用?提前谢谢 NSString * urlWhats = [NSString stringWithFormat:@"whatsapp://send?image=%@",GIFPathToShare]; NSURL * whatsappURL = [NSURL URLWithString:[urlWhats strin

我想在没有UIactivityViewcontroller和UIDocumentInteractionController的whatsapp中共享gif,是否可以直接共享gif?怎么用?提前谢谢

NSString * urlWhats = [NSString stringWithFormat:@"whatsapp://send?image=%@",GIFPathToShare];
NSURL * whatsappURL = [NSURL URLWithString:[urlWhats stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

// this is identify if whatsapp is already install your device , if yes it open the whatsapp and share the content
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
    [[UIApplication sharedApplication] openURL: whatsappURL];
} else {

    // it shows the alert for no application found
    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"WhatsApp not installed." message:@"Your device has no WhatsApp installed." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
}

如果没有UIactivityViewcontroller和UIDocumentInteractionController,我认为这是不可能的。但我不是sure@Gokul我想与canOpenURL直接分享whatsapptrymethod@Anbu.Karthik我已经尝试过不使用UIactivityViewcontroller和UIDocumentInteractionController,我认为这是不可能的,但我不是sure@Gokul我想与canOpenURL直接分享whatsapptrymethod@Anbu.Karthik我已经试过了