Hello, you are welcome to take a look closer at Sunlitt: an app that helps you keep track of the sunlight direction and sun events any time of the day, any day of the year, anywhere in the world.
Sunlitt is build using the latest Apple first-party frameworks. However, its core is SunKit: a Swift library that uses common math and trigonometry to compute several information about the sun. Even though Sunlitt is not meant to be open source, we try to be as transparent as possible and we are happy to help anyone to get easy access to sun data. This is why SunKit is totally open source and free for you to explore and expand.
We also provide free access to MoonKit, which instead computes moon data.