6

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.

Vishal
  • 8,246
  • 6
  • 37
  • 52
  • I don't think the UIPasteboard API allows for storing videos and audio, only images. However, I could be wrong. – simonbs Dec 24 '12 at 15:04

1 Answers1

0

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

Community
  • 1
  • 1
Nils Munch
  • 8,805
  • 11
  • 51
  • 103