I would treat this like any other app. Build the screen map so that you expect part of it to be off screen. Consider this image:
The blue area is a typical 16:9 phone. The pink area is tablets with a typical 4:3 aspect ratio like an iPad. On a phone, the pink will be cut off. On an iPad, the blue will be cut off. Only the green common 3:2 aspect ratio will be common to all devices. This is what the typical “letterbox” config.lua produces:
application = { content = { width = 320, height = 480, scale = "letterbox", }, }
You should build your backgrounds based on this to fit 570x360 (for the 1x size). The 570 width will make sure the background is wide enough when on a phone, understanding the part of the background in the pink area will be cut off. The 360 height will fill the pink areas understanding the blue areas will be clipped. This is called the bleed areas.
Now for your tile map, you should think about it in the same way. Extend your map with ground to the left and right past the green area, but never allow your player move there. Keep them in the green zone. If you think about Mario Bros. it did the same thing. Mario could only move so far left. At the end of the level he could move up to the flag pole, but the game extended further to the right.
Then vertically fill your map with whatever ground and sky elements that extend into the pink area so something shows, but the player will never be able to get out of the green area vertically. Doing this, your tile map should work well on all devices… well except the Samsung Galaxy S8. It has a 2:1 aspect ratio, so we need to rethink the math a bit. It would change the backgrounds/tile width to be 640x360 to completely cover it. the S8’s extra screen is in the yellow color in this version:
Rob