How to get device current orientation in an App Extension, I have tried below two methods but no success.
It always return UIDeviceOrientationUnknown
You could take a look at this library and its forks. It uses CoreMotion to detect the device orientation so it may work on App Extension's restricted environment.