Conversion from Swift 3 to Swift 4 issues

I have recently updated my code from Swift 3 to Swift 4. The game does not work properly anymore because the number of frames per second are really low. How can I fix this?

Replies

What device and OS are you using to test?

Are you sure it's the update from Swift 3 to Swift 4 that's causing the slowdowns? Did you update Xcode at the same time? I had horrible issues with framerates on all iOS 11 simulators (not on any earlier simulators though) with Xcode 9. I had to download (and I'm currently exclusively using) Xcode 9.1 beta (9B46), which fixed it. Got me pretty scared personally, as I wasn't able to test iPhone X on the simulators and I have apps to deliver. Everything is all good with the beta version, however.

Good rule of thumb: Never use the Simulator for Sprite Kit. You'll have a frame rate drop as soon as you do anything. Its like the value of a new car dropping as soon as you drive off the lot.


Just test on your devices.