xCode 8.x crashes with “GameScene.sks” file

前端 未结 3 1954
孤城傲影
孤城傲影 2020-12-16 22:57

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

相关标签:
3条回答
  • 2020-12-16 23:21

    I can't help with your crash, but you can change the Anchor Point within code like this...

    GameScene.swift

    override func viewDidLoad(){
        self.anchorPoint = CGPoint(0,0)
    }
    
    0 讨论(0)
  • 2020-12-16 23:22

    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.

    0 讨论(0)
  • 2020-12-16 23:38

    What worked for me (I ran into the problem after upgrading macOS to Mojave, and the Xcode contained therein) was to disable all of the Xcode plugins!

    :-)

    0 讨论(0)
提交回复
热议问题