xCode 8.x 因“GameScene.sks"而崩溃;文件 [英] xCode 8.x crashes with "GameScene.sks" file

查看:11
本文介绍了xCode 8.x 因“GameScene.sks"而崩溃;文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了 macOS Sierra 10.12 并将其放入 VMWare 机器中.一切运行良好,但在 xCode,使用 SpriteKit,每当我尝试打开 GameScene.sks 文件(将原点 (0, 0) 放在底部,就像在 xCode 8 之前一样,程序立即崩溃.

I've downloaded macOS Sierra 10.12 and put it into an VMWare machine. Everything running well, but at xCode, using SpriteKit, whenever I try to open the GameScene.sks file (to put the origin point (0, 0) at the bottom, just like it was before xCode 8), the program crashes immediately.

使用 VMWare Pro 12;用 xCode 8.1 和 8.2 Beta 都试过了,同样的崩溃.

Using VMWare Pro 12; Tried both with xCode 8.1 and 8.2 Beta, same crash.

我知道我的情况很多,但是这没有解决方案令人讨厌.我发现 this 在我的 VERY DEEP 谷歌搜索中,但该解决方案对我来说不是解决方案,因为 VMware 不允许您将 gpu 与 VM 一起使用(我有 intel hd 4600 + gtx 960).

I know theres many cases as mine, but its just annoying that this have no solution. I found this in my VERY DEEP google search, but that solution is not a solution for me, because VMware doesn't let you put an gpu to work with the VM(I have intel hd 4600 + gtx 960).

我可以正常打开action sks文件.似乎只有 GameScene.sks 让我崩溃了,所以:

I can open action sks files normally. Seems like only GameScene.sks gives me a crash, so:

有办法解决吗?如果没有,我可以编辑 GameScene.sks 文件还是只在没有 xCode 的情况下将原点放在底部?如果两者都不是,我可以在没有开发者许可的情况下下载以前的 xCode 版本吗?

Theres a way to fix it? If not, can I edit the GameScene.sks file or just put origin point at the bottom without xCode? If not either, can I download an previous xCode version without developer license?

好吧,我能做的最后一件事就是在我的电脑上进行双启动,但我认为这并不像看起来那么容易

Well, the last thing I could do is to make an dual boot here in my PC, but I think its not so easy as it seems

推荐答案

Xcode 8:

我终于找到了解决这个问题的方法!您必须重新对 Xcode 8 和它的组件进行代码签名才能使其工作.

Finally I found a solution for this issue! You have to re-code-sign Xcode 8 and it's components to make it work.

其中一些应用程序被标记,因此它们拒绝加载未经 Apple 签名的库.Nvidia Web Driver 未由 Apple 签名,因此未加载,导致您描述的行为.(请参阅此线程)

Some of these applications are flagged so they refuse to load libraries that are not signed by Apple. The Nvidia Web Driver is not signed by Apple, so it's not loaded, resulting in the behavior you describe. (See this thread)

我只使用了 nVidia GPU,它导致了这个问题 - 至少对我来说是这样.退出 XCode 并在终端中一一运行这些命令:

I'm using an nVidia GPU only, and it caused the issue - at least for me. Quit XCode and run these commands in Terminal one by one:

sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/FileMerge.app/Contents/MacOS/FileMerge
sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/Application Loader 
sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app/Contents/MacOS/Accessibility Inspector 
sudo codesign -f -s - /Applications/Xcode.app/Contents/MacOS/Xcode 

最后一个命令对我来说需要很长时间才能完成,所以我通过退出终端终止了该过程.即便如此,它还是成功了,下次我启动 XCode 时,出现了一些弹出窗口,例如:Xcode 想要使用存储在钥匙串中的信息.我为每个对话框选择始终允许".(下次打开 XCode 时这些对话框不会出现)

The last command took ages to finish for me so I terminated the process by quiting Terminal. Even so it did the trick and next time I launched XCode some popup appeared like: Xcode wants to use your information stored in your Keychain. I choose "Always Allow" for each dialog. (next time you open XCode these dialogs won't appear)

毕竟我从项目导航器中选择了 GameScene.sks 文件,XCode 没有崩溃.

After all I selected GameScene.sks file from the project navigator and XCode didn't crash.

从那时起,它运行良好!:)

Since then, it's working perfectly! :)

如果您将 XCode 8 升级到更新的 Xcode 8 版本,则必须重做上述步骤!据报道,这种方法在 XCode 9 beta 中不起作用,如果它发生变化,将更新这篇文章..

You have to redo the steps above if you upgrade XCode 8 to a newer Xcode 8 release! This method reportedly doesn't work in XCode 9 beta, will update this post if it changes..

Xcode 9:

如果您有 hackintosh,修复这些 nVidia 错误的最简单方法是安装 NVWebDriverLibValFix.kext.如果您使用 Clover 作为引导加载程序,请将下载的 kext 文件放在 EFI/EFI/Clover/kexts/Other 中.使用 KextBeast 安装 kext 也应该可以,但我更喜欢使用 Clover 进行 kext 注入.

If you have a hackintosh, the cleanest way to fix these nVidia bugs is to install NVWebDriverLibValFix.kext. If you're using Clover as the bootloader, place the downloaded kext file in EFI/EFI/Clover/kexts/Other. Installing the kext with KextBeast should also work, but I prefer using Clover for kext injection.

这篇关于xCode 8.x 因“GameScene.sks"而崩溃;文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆