xcode CUICatalog:无效请求:请求子类型而不指定习语

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33686413/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:11:55  来源:igfitidea点击:

CUICatalog: Invalid Request: requesting subtype without specifying idiom

iosxcodesprite-kit

提问by mhillsman

Whenever I run my sprite kit app this error is logged constantly. It makes it really hard to debug because the log is filled with these messages. They don't seem to effect how the app runs, so simply suppressing the error would be sufficient. Anyone have any idea how to fix this?

每当我运行我的精灵套件应用程序时,都会不断记录此错误。这使得调试变得非常困难,因为日志中充满了这些消息。它们似乎不会影响应用程序的运行方式,因此只需抑制错误就足够了。任何人都知道如何解决这个问题?

回答by Darren Branford

I think that it's just a left over debug message that hasn't been cleaned up in iPod/iPhone devices.

我认为这只是 iPod/iPhone 设备中尚未清除的遗留调试消息。

In my app, the issue seems to be related to using Sprite Atlases in an xcassets file.

在我的应用程序中,问题似乎与在 xcassets 文件中使用 Sprite Atlases 有关。

if I initialise a sprite with:

如果我初始化一个精灵:

SKTexture(imageNamed: "Sprite")

I get the message; However, using the following:

我收到消息;但是,使用以下内容:

SKTextureAtlas(named: "Atlas").textureNamed("Sprite")

I do not get the message.

我没有收到消息。

Also, any sprites created in an .sks file will display the error, as you have no opportunity (or need) to define an atlas.

此外,在 .sks 文件中创建的任何精灵都会显示错误,因为您没有机会(或需要)定义地图集。