I have an exchange code that works great for iOS 7, but doesn't work with iOS 8 anymore.
@IBAction func onShareButton(sender: UIButton) { let movie = NSBundle.mainBundle().URLForResource("IMG_0564", withExtension: "mp4")! let items = [movie] let activity = UIActivityViewController(activityItems: items, applicationActivities: nil) if activity.respondsToSelector("popoverPresentationController") { activity.popoverPresentationController?.sourceView = sender } self.presentViewController(activity, animated: true, completion: nil) }
As I said, this works fine in iOS 7, but with iOS 8 the video clip is no longer attached to the message (or displayed on the sharing panel) when I decided to share it with Facebook. All other work options, Mail, Save to video, AirDrop, etc., It seems to work fine.
I also tried passing items as AVAssets:
let items = [movie].map { AVAsset.assetWithURL($0) }
and NSData:
let items = [movie].map { NSData(contentsOfURL: $0) }
None of them affected the problem.
The problem also arises if I use the moral equivalent in Objective-C, it is an agnostic language.
source share