I managed to solve the problem,
To achieve this, I used an example code using the augmented reality available in Apple Developer Resources:
pARk
The idea was to first transform the spherical coordinates of the Sun into Cartesian coordinates in order to get its position in the sky as a simple vector: {x, y, z}. The formula is available on Wikipedia: Spherical coordinates . Since the distance from the Sun (radius in spherical coordinates) does not matter here, I used 1.
CoreMotion, iPhone.
pARk . , .
. UIView x y, , .
Github, !