Go to Project - Project Settings...
On the first tab called General, go to Display > Window.
Set Width and Height at the top to your desired resolution. Find Handheld orientation and set it to portrait.
Then scroll to the bottom, set Mode to Viewport and Aspect to keep_height, leave Shrink as 1.
Best of luck :)