This project is a simple example of moving a player around the screen in a SpriteKit using GCVirtualController, an Apple class in the Game Controller framework to create virtual game controllers on an iOS touch screen. Use the virtual joystick on the left side of the screen to move the sprite.
This project accompanies the following article: Using Virtual Controllers in an iOS Game
iOS 15+
The Player.swift file has the code for working with the virtual controller. Look at the connectVirtualController function.