Swift 2 - Teilen Sie Videos mit UIActivityViewController

Ich versuche zu teilen, ein video aus einer URL mit UIActivityViewController. Wenn ich versuche mit einem Bild, das ich haben keine Probleme.

Teilen Bild Funktioniert:

let imageThump = NSURL(string: "https://example.com/image.png")
        let imageData = NSData(contentsOfURL: imageThump!) 
let objectsToShare = [comment!, imageData!]
            let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)

Teilen Video funktioniert nicht. Warum?

let videoShare = NSURL(string: "https://example.com/video.mp4")
        let videoData = NSData(contentsOfURL: videoShare!) 
let objectsToShare = [comment!, videoData!]
            let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
  • Würde ich mehr details hinzufügen. Was genau funktioniert nicht? Gibt es irgendwelche Fehlermeldungen, stack-traces etc. Sie zur Verfügung stellen könnte?
InformationsquelleAutor SNos | 2015-11-09
Schreibe einen Kommentar