Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xCode 8.x crashes with "GameScene.sks" file

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.

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

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).

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

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

like image 774
Lucas Avatar asked Dec 01 '16 13:12

Lucas


1 Answers

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.

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)

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 

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)

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

Since then, it's working perfectly! :)

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:

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.

like image 158
balazs630 Avatar answered Sep 23 '22 22:09

balazs630