ios - Unknown activity items supplied for ActivityViewController -
I am trying to share videos from my app using UIActivityViewController. Below is the code I used:
var url = NSURL (string: path!)! VariantViewController = UIActivityViewController (activityItems: [url], applicationActivities: Zero) self.presentViewController (activityViewController, animated: true, complete: {() -> in ZERO}) Valid .mov indicates file, so there is no problem when I present the Activity View Controller, I get an error:. supply of unknown activity items with the path of the .mov file and the sharing options show only the airdrops.
The app is running on iOS 8.
Any thoughts?
Edit I came to know that when I save the video to the Camera Roll, users can share it with the Photos app, I think that the video format There is nothing wrong with.
Do you have init? (FileURLWithPath) Path: string, isDirectory isDir: Bool) If the movie resource is in the bundle
If you use the Image Picture Controller to select the video, then You can get the URL from the information dictionary by using the key UIImagePickerControllerMediaURL , the related representative method didFinishPickingMediaWithInfo .
Comments
Post a Comment