UnityAds forces keyboard orientation to be portrait.

After adding UnityAds they keyboard shows sideways(portrait), when it should be landscape mode.

The work around now is to make the game change orientation at run time and then back again to original orientation. That will fix the keyboard orientation. However when unity ads should show, the following message appears and not show ads:

Warning: Attempt to present <UnityAdsMainViewController: 0x1b841810> on <UnityLandscapeLeftOnlyViewController: 0x1a374e30> whose view is not in the window hierarchy!

This is now confirmed. Before UnityAds is initialized they KB is fine. Once UnityAds is initialized the KB will be portrait.

To fix this keyboard issue we first call
Screen.orientation = ScreenOrientation.LandscapeRight;
then call the following in the next game loop
Screen.orientation = ScreenOrientation.LandscapeLeft;

Then the keyboard will be in the proper orientation. Then you can init unity ads.