I have shared an image on Whatsapp from an iOS app using UIDocumentInteractionController. But, right now, I need to share an image without using UIDocumentInteractionController. Is it possible?
            Asked
            
        
        
            Active
            
        
            Viewed 3,068 times
        
    1
            
            
        - 
                    hey refer the following link: https://stackoverflow.com/questions/22894757/ios-share-image-text-to-whatsapp/47056129#47056129 – Mr.Javed Multani Nov 01 '17 at 13:36
 
2 Answers
4
            
            
        It's not possible, since all apps are sandboxed the UIDocumentInteractionController is the only way to share files among apps.
Read the FAQ on integrate WhatsApp it only mentions UIDocumentInteractionController for sharing files (images, video and audio). You can if you only want WhatsApp to show up change the extension to of the file to:
- images - .wai which is of type net.whatsapp.image
 - videos - .wam which is of type net.whatsapp.movie
 - audio files - .waa which is of type net.whatsapp.audio
 
        Chintan Patel
        
- 3,175
 - 3
 - 30
 - 36
 
        rckoenes
        
- 69,092
 - 8
 - 134
 - 166
 
0
            
            
        I don't see why you would not want to use the UIDocumentInteractionController. Maybe a temporary fix like this can help:
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]])
{
}
        iOSAaronDavid
        
- 140
 - 15