I am having some trouble in sharing videos with airdrop. So, i am using the AssetLibrary
like this :
else if (conformsToVideo) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Asset Loaded" message:@"Video One Loaded"
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
self.mediaAsset = [AVAsset assetWithURL:[info objectForKey:UIImagePickerControllerMediaURL]];
UIActivityViewController * controller = [[UIActivityViewController alloc] initWithActivityItems:@[self.mediaAsset] applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];
}
Maybe this is just not the way to do it, I don't know and I didn't find any tutorial about it so if you have one, I will gladly take it.
Now my problem is that when i select a video everything works fine until the UIActivityViewController
pops out , i don't have any error but I can't use airdrop (nor any other service BTW
) the only thing I can do is press the Cancel button
of the UIAVController
.
I am using iOS 8.3
.
Thanks for your help