Pong like game as iPad SWIFT Playground

Last week on WWDC Apple showed a short demo about a Swift Playground for iOS, which was part of iOS 10 on iPads. They focused on using playgrounds to teach kids and students coding. That seems a little bit unspectacular and is a great understatement. Swift Playground support a lot of advanced iOS libraries like SpriteKit, SceneKit, UIKit

I was wondering if this can really replace a Mac with XCode to develop for my favorite platform. In fact I’m dreaming about only carrying my iPad with me and develop directly on an iPad.


So here we are: My first game SWIFT Playground completely written  on an iPad: Pong (updated for iOS 10 Beta 5)


1. Open the Playground App on your iPad:


2. Create a new SWIFT Playground:

IMG_2575iPad Create a new Playground


3. Here is the SourceCode. Just copy it in your playground and hit start. I’ll not introduce the basics of SpriteKit. You can check my other posts to get an introduction.


You can also download the sample directly from my GitHub repository.


My personal conclusion: You can really write advanced Playground Apps completely on your iPad. The editor offers some intelligent solutions to choose the next needed code snippet without typing, but for bigger projects an external keypad improves the coding experience a lot. A possibility to upload the playgrounds as an App to the AppStore is missing. So a kind of Swift Playground Store would be nice for the future. Maybe this will come with the final release of iOS 10.


That’s all for today.

If you want to support me, please download my Apps from the Apple AppStore.

AppStore Stefan



Apple TV
Quick Tip: How to use the Apple TV remote to control a sprite in your TVOS Apps
Quick Tip: Endless scrolling with SpriteKit and SWIFT (Part 1 of 2)
AdSense and Admob
Quick Tip: Implement the new Google AdMob / AdSense Cookie Policy