Apple's 2D game engine framework. SpriteKit provides sprite rendering, physics simulation, and particle effects for creating 2D games and animations on iOS.
of iOS users worldwide can use SpriteKit (iOS 7+ required)
| iOS Version | Market Share | Status |
|---|---|---|
| iOS 18.7 | 30.3% | Supported |
| iOS 18.6 | 29.8% | Supported |
| iOS 26.1 | 10.7% | Supported |
| iOS 18.5 | 6.0% | Supported |
| iOS 16.7 | 2.3% | Supported |
| iOS 26.2 | 2.0% | Supported |
| iOS 18.3 | 1.8% | Supported |
| iOS 15.8 | 1.8% | Supported |
| iOS 11.0 | 1.7% | Supported |
| iOS 17.6 | 1.7% | Supported |
2D sprite rendering
Built-in physics engine
Particle effects system
Texture atlases
Actions and animations
Tile map support
Set up a basic game scene with a sprite
import SpriteKit
class GameScene: SKScene {
override func didMove(to view: SKView) {
backgroundColor = .black
// Create a sprite
let sprite = SKSpriteNode(color: .red, size: CGSize(width: 50, height: 50))
sprite.position = CGPoint(x: size.width / 2, y: size.height / 2)
addChild(sprite)
// Add physics
physicsBody = SKPhysicsBody(edgeLoopFrom: frame)
sprite.physicsBody = SKPhysicsBody(rectangleOf: sprite.size)
// Animate
let moveAction = SKAction.moveBy(x: 100, y: 0, duration: 1.0)
let sequence = SKAction.sequence([moveAction, moveAction.reversed()])
sprite.run(SKAction.repeatForever(sequence))
}
}Apple's 2D game engine framework. SpriteKit provides sprite rendering, physics simulation, and particle effects for creating 2D games and animations on iOS.
SpriteKit is available on iOS 7 and later. Currently, 99.8% of iOS users worldwide can use this framework.
Related frameworks include Scenekit, Metal. Each has different capabilities and iOS version requirements.