objective c - Can't send Video to MFMessageComposeViewController -
I have to send a video through the message I attached a video of 30 KB in size but warns that "the video is too long "I mentioned the code to send the video through the message below.
NSString * message = [NSString stringWithFormat: @ "Download This Video!"]; MFMessageComposeViewController * messaging controller = [[MFMessageComposeViewController alloc] init]; MessageController.messageComposeDelegate = self; [Message controller set-up: message]; If ([MFMessageComposeViewController canSendAttachments]) {NSLog (@ "attachments may be sent to."); NSString * file path = [mURL absoluteString]; NSDTa * VideoData = [NSDATA DATAVITY content of URL: [NSD URL URL with string: FilePath]]; BOOL didAttachVideo = [messageControllerAddachmentData: videoData typeIdentifier: @ "public.movie" file name: filePath]; If (That is Etch Video) {NSLog (@ "Video Attachment."); } Other {nslog (@ "video could not be attached"); }} [Self-present ViewController: Animated Message Controller: Yes Completed: Zero];
Comments
Post a Comment