O'Reilly logo

Learning iOS 8 Game Development Using Swift by Siddharth Shekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding sound effects

As I mentioned earlier, adding sounds and effects in SpriteKit is very simple. It is really one line of code that needs to be added to create the desired sound effect.

First, we will import all the files to the project. So, select all the .mp3 files in the folder you created earlier, and drag them into the project.

Adding sound effects

Make sure that you check Copy items if needed and your project is selected as the target.

Adding sound effects

Also, make sure that the files exist under Copy Bundle Resources in the Build Phases, as the files sometimes don't get copied, even ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required