WhatsApp的已更新其不允許要與圖片或URL或文檔沿共享簡單的文本的政策是。
您可以將圖像是這樣的:
NSMutableArray *activityItems= [NSMutableArray arrayWithObjects:img, nil];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityViewController.excludedActivityTypes = @[UIActivityTypePostToWeibo,UIActivityTypePrint, UIActivityTypeCopyToPasteboard,UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll,UIActivityTypeAddToReadingList, UIActivityTypePostToFlickr,UIActivityTypePostToVimeo, UIActivityTypePostToTencentWeibo,UIActivityTypeAirDrop];
[self presentViewController:activityViewController animated:YES completion:nil];
你也需要設置在plist文件權限iOS9
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
</array>
我也面臨這個問題。任何工作? – pkc456
我也面臨這個問題,對此有任何更新。 –