Spoiler Alert… All you have to do is navigate to your Player Settings
Select the target platform from the list, I have used Android for this demo but iOS is the same way of setting. Expand the Resolution and Presentation section, and set the “Allowed Orientation for Auto Rotation” to landscape left and landscape right. If you want portrait mode only, you will be selecting the Portrait and Portrait Upside Down.

I hope that helps.
Happy programming!!

Xybernetics Unity Allowed Orientation for Auto Rotation Landscape Mode Only In Unity Portrait Mode Only In Unity