Question

Currently, I am developing an App in which I have to send photo/video via IMessage. Photo

sending code is proper working but when I am sending video via IMessage I am only getting

a icon make in composer no video is display like below:

enter image description here

I am using this code to display video in IMessage for sending:

if (ver_float < 6.0)
        {
            UIPasteboard *pasteboard;
            pasteboard = [UIPasteboard generalPasteboard];
            NSString *filePath =pathToVideo;
            NSData *datavideo = [NSData dataWithContentsOfFile:filePath ];
            [pasteboard setData:datavideo forPasteboardType:[UIPasteboardTypeListImage objectAtIndex:0]];
        }
        else
        {
            UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
            NSString *filePath =pathToVideo;
            NSData *videoData = [NSData dataWithContentsOfFile:filePath];
            [pasteboard setData:videoData forPasteboardType:[UIPasteboardTypeListImage objectAtIndex:0]];

        }
    NSURL *urlstr = [NSURL URLWithString:@"sms:"];
    [[UIApplication sharedApplication] openURL:urlstr];

How can I solve this? Thanx in advance.

Was it helpful?

Solution

Sadly, (as simonbs suggested) the UIPasteboard SDK will not be able to help you with this, it does not support video and audio at this moment. Sadly, I might add.

Possible duplicate : copy video to uipasteboard

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top