Also worth noting Apple has a free Swift Playgrounds app available on iPadOS. Although it's primarily designed for helping people learn how to program, it's a completely capable Swift environment where you can create multi-file projects and even build interfaces using native UIKit objects.