在 iOS17 上点击共享按钮时 UIPrintInteractionController 和 UIDocumentInteractionController 崩溃

问题描述 投票:0回答:1

我正在呈现 NSData 类型的打印视图项(这是生成的 pdf),我可以在打印预览中正确查看它。我也尝试使用 UIDocumentInteractionController 执行此操作,我可以成功查看文档。但是,当用户点击共享按钮时,我收到以下错误:

error fetching file provider domain for URL:file:///private/var/mobile/Containers/Data/.../tmp//PrintPreviewPDF/A0F77118-DC26-4682-98FB-159D3B01915F/Testing.pdf : (null)

Collaboration: error loading metadata for documentURL

Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)"

Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}

*** Terminating app due to uncaught exception 

'NSInternalInconsistencyException', reason: 'Cannot register subclasses in a bundle that hasn't been loaded!'

这在 iOS17 发布之前运行得非常好。我尝试不将打印屏幕显示为工作表,而是将其推送到导航堆栈。没有帮助。

编辑:发生在 UIDocumentInteractionController 和 UIActivityViewController 中。同样的崩溃,同样的错误。

pdf printing ios17
1个回答
0
投票

您找到该错误的解决方案了吗?

© www.soinside.com 2019 - 2024. All rights reserved.