提问人:krishna yadav 提问时间:11/14/2023 最后编辑:mattkrishna yadav 更新时间:11/14/2023 访问量:33
UIActivityController 不适用于消息和社交平台
UIActivityController is not working for message and social platforms
问:
let shareMesage = "\(StringUtils.getTranslationWithKey("checknow")) \(package_name)\n\n\(urlString)"
let activityViewController = UIActivityViewController(activityItems: [shareMesage], applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.custom_navigationBar
activityViewController.excludedActivityTypes = [ UIActivity.ActivityType.airDrop, UIActivity.ActivityType.postToFacebook ]
self.present(activityViewController, animated: true)
点击任何平台时出现 iOS 17 错误
Attempt to present <SLComposeViewController: 0x12283ba00> on <UINavigationController: 0x122816000> (from <SHSheetSceneViewController: 0x11f258f00>) whose view is not in the window hierarchy.
Trying to perform <UISocialActivity: 0x282e18b00> activityType:net.whatsapp.WhatsApp.ShareExtension activityTitle:UISocialActivity but there is already an activity performing:<SHSheetActivityPerformer: 0x2839638e0>
显示活动控制器,单击什么是应用程序和消息,但活动控制器未关闭并显示错误
Attempt to present <SLComposeViewController: 0x12283ba00> on <UINavigationController: 0x122816000> (from <SHSheetSceneViewController: 0x11f258f00>) whose view is not in the window hierarchy.
Trying to perform <UISocialActivity: 0x282e18b00> activityType:net.whatsapp.WhatsApp.ShareExtension activityTitle:UISocialActivity but there is already an activity performing:<SHSheetActivityPerformer: 0x2839638e0>
答: 暂无答案
下一个:菜单中的 SwiftUI 选取器
评论