SKView 警告日志

SKView warning logs

当 运行 我的 SwiftUI 和 SpriteKit 应用程序时,我在日志中收到以下消息:

2019-11-18 21:58:57.631912+0000 PixelBattles[2812:1215803]

SKView: ignoreRenderSyncInLayoutSubviews is NO. Call _renderSynchronouslyForTime without handler

收到此日志我做错了什么,我应该担心吗?会不会是bug?

难道 SwiftUI 不知道如何为 SKView 进行布局?

主要编辑:

需要代码的可以在之前的编辑中看到。下面我将说明为什么我认为它不再相关。

我已经向 Apple 发送了一些反馈 (FB7456217)。我已经删除了代码,因为我不再怀疑这与我的代码有关。我创建了一个空白的游戏项目,没有 SwiftUI,但仍然立即收到相同的警告日志。

所以即使使用默认的项目模板,日志仍然出现在设备和模拟器上。如果我得到有用的回复,我会更新这个问题。


我仍然没有收到任何回复 - 自从我半个多月前发布此消息以来,有人收到任何新信息吗?我仍然有这些警告!

我自己想出来了。

在您的代码更改中

if let scene = SKScene(fileNamed: "GameScene")

if let scene = GameScene(fileNamed: "GameScene")

我相信如果您有 SKView 的 UIKit 子视图,您也会收到此警告。

这是 Apple 对此问题的回应:

Hi! You don't really need to fix that. That's a log message that was left by mistake in SpriteKit framework. It was removed and will no longer appear in the future SpriteKit versions. Thanks!