Hello I am using WebKit and a WKWebView to load a YouTube video into my SwiftUI application. Whenever the YouTube video plays or pauses I get this message printed in the console as a warning. I think it is due to a lack of permissions or capabilities added to my app. Another SO thread said to add the BackGround Modes capability and check the background fetch and background processing boxes. I did so and I still get this message. I'd appreciate any help in clearing this warning.
你好,我正在使用WebKit和WKWebView将YouTube视频加载到我的SwiftUI应用程序中。每当YouTube视频播放或暂停时,我都会在控制台中打印这条消息作为警告。我认为这是因为我的应用程序缺乏添加的权限或功能。另一个SO帖子说,增加了后台模式功能,并选中了后台获取和后台处理框。我这样做了,但我仍然收到了这条消息。如果您能帮助我清除这一警告,我将不胜感激。
ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=12858, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}*
更多回答
优秀答案推荐
While this thread suggests it is a warning message you could ignore, this one adds:
虽然这条帖子暗示这是一条你可以忽略的警告消息,但这条帖子补充道:
I had set webView.navigationDelegate
, but not the setting mentioned above. But adding Background fetch
and Background Processing
capabilities stopped the messages. I didn't need to add Remote Notifications
.
Since you already did that, check if you have any version discrepancies regarding WebKit or iOS SDK (between your development environment and your execution environment, ie. where you are running your application).
既然您已经这样做了,请检查您是否有关于WebKit或iOS SDK的任何版本差异(在您的开发环境和您的执行环境之间,即。您正在运行应用程序的位置)。
And review the configuration settings of your WKWebView
instance (WKWebViewConfiguration
).
并查看您的WKWebView实例(WKWebViewConfiguration)的配置设置。
更多回答
Von it was already answered, thanks anyways. Maybe you would know how to set maxWidth and maxHeight instead for intrinsicSize.
冯,已经有人接了,不管怎样,谢谢。也许您应该知道如何为veninsicSize设置MaxWidth和MaxHeight。
@ahmed I have seen your last comment just got answered as well!
@艾哈迈德,我也看到了你的上一条评论也得到了回复!
Not quite its still a working progress, having trouble with the preview stretching to the maximum frame.
这并不完全是一个工作进度,预览拉伸到最大帧时遇到了问题。
我是一名优秀的程序员,十分优秀!