The most common solution is to build your game for one display ratio and use "Scale Outer" mode to support devices with different screens.
Set "Scale Outer" mode in project properties and stretch backgrounds by about 100px from each side on all layouts.
Say, if you choose 16:9, and your game is run on iphone X in landscape mode, it will show more of the background on the left and right (instead of black bars). If it's run on an iPad, it will show more background at the top and bottom. Make sure to enable Unbounded Scrolling for all layouts, and you can use Anchor for your UI elements.
scirra.com/tutorials/73/supporting-multiple-screen-sizes