此代码在XCode 7.3和IOS 9.3的最后一次更新之前一直工作正常,我尝试在互联网上搜索但什么都没有,所以如果有人能帮助我,这将是一个很大的帮助。谢谢
我用来在Swift中分享文本的代码是: -
let objectsToShare = [TextToShare]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
//New Excluded Activities Code
activityVC.excludedActivityTypes = [UIActivityTypeAirDrop, UIActivityTypeAddToReadingList]
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.Phone) {
self.presentViewController(activityVC, animated: true, completion: nil)
} else { //if iPad
// Change Rect to position Popover
let popoverCntlr = UIPopoverController(contentViewController: activityVC)
popoverCntlr.presentPopoverFromRect(CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0), inView: self.view, permittedArrowDirections: UIPopoverArrowDirection.Any, animated: true)
}
控制台显示此错误: -
plugin net.whatsapp.WhatsApp.ShareExtension interrupted
plugin net.whatsapp.WhatsApp.ShareExtension invalidated
虽然在Whats App上分享显示了这一点:
答案 0 :(得分:0)
显然,这是WhatsApp方面的一个问题。它现在已经修复了最新的更新。我刚刚确认它正在使用我的应用程序。所以,只需更新WhatsApp就可以了。