Reputation: 306
I want to share video in my application to wechat via "UIActivityViewController"
But I got "transfer fail" message on WeChat's transfer dialog very often (alsmost 90%)
But I try to save same video to my iPhone Photos,
then share to wechat, But I never fail on it.
Is there anything I have to do before share?
My code:
NSMutableArray *shareFile = [[NSMutableArray alloc] init];
NSURL *shared = [NSURL fileURLWithPath:file.localFilePath];
if ([[NSFileManager defaultManager] fileExistsAtPath:file.localFilePath]) {
[shareFile addObject: shared];
}
UIActivityViewController *_shareVC = [[UIActivityViewController alloc] initWithActivityItems:[shareFile copy] applicationActivities:nil];
[_shareVC setCompletionWithItemsHandler:nil];
Upvotes: 1
Views: 451
Reputation: 36
In iOS9.3,10.2,10.3 equipment on the same problem, share the video to WeChat friends, suggesting that "发布不成功", 100%, but in iOS8.4 can share success, use of UIActivityViewController.
Upvotes: 0