Post

Replies

Boosts

Views

Activity

SpriteKit iOS 13 Swift 4 textures nil
So I have been working on a game using SpriteKit, utilizing the scene editor. Has been working very nicely, up until I was required to update to the latest SDK. I have been too busy lately and haven't gotten to work on it again until now... so it was flawless when I was running iOS 12 on my XS. My device is now iOS 13.3, which forced me to update to the latest version of Xcode (11.2?). Now, my app crashes, all textures from every SKSpriteNode in the scene are nil when getting references to them. They load just fine in the scene editor itself. In code, however, in the sceneDidLoad override, all of my childnode calls succeed in getting the SKSpriteNode reference, but texure is always nil... which then blows up my texture based PhysicsBody instansiations. The scenes entities structure also seems empty (so I'm not sure how I'm getting references to SKSpriteNodes, but I am). Just seems like GKScene fromFilename is loading an empty shell of my sks file.This a known issue with the new tools? What did Apple change to break this? Anything new introduced that I need to be initializing? Should I be forced to update the project to Swift 5 to get rid of the issue? Not the first time Apple has changed something drastic in the application lifecycle that completely breaks every one of my apps, and I have to scrounge around for a different way to initialize the various components to get things to work again. Frankly I'm getting sick of it, spending more time fixing things from the complete disregard for any semblance of backwards compatibility in these SDKs than I do creating new functionality.Thank you 🙂
15
0
4.7k
Dec ’19