Different methods of animating shape along custom path?

I'm trying to animate a shape (e.g. a circle) to follow a custom path, and struggling to find the best way of doing this.

I've had a look at the animation options from SwiftUI, UIKit and SpriteKit and all seem very limited in what paths you can provide. Given the complexity of my path, I was hoping there'd be a way of providing a set of coordinates in some input file and have the shape follow that, but maybe that's too ambitious.

I was wondering if this were even possible, and assuming not, if there were other options I could consider.

You can use a CAKeyframeAnimation to animate along a path. This API allows you to use a Bezier path for specifying your animation path. Please see Core Animation: CAKeyframeAnimation: path https://developer.apple.com/documentation/quartzcore/cakeyframeanimation/1412474-path

Different methods of animating shape along custom path?
 
 
Q