iOS build has black borders on the sides (SOLVED)


#1

Hello.
Game has 2 profiles (vertical and horizontal) i use custom gui matrix to position elements based on the center of the screen.

There is no any issue on local pc build. as well as on android

Here is screenshots (from android)

and this is from my iPhone 5


Display issues on iPhone 8
#2

Hi,

I have this problem with other software, maybe you need add in defold an img in project setting with 640x1136 for loader screen.

sorry for my english.

Regards.
Maxi.


#3

Yes, on iOS you must supply a splash screen to get the correct screen resolution.


#4

Correct. You need to add Launch Images for all sizes, otherwise iOS will fallback to compatibility mode: [SOLVED] Black bars in iPhone 6 Display


#5

Thanks everyone. Probably need to create some jpg files with a small size. or it doesn’t matter for final size of application?

upd. I’ll make blank pages with one color. to make size even smaller. game size is quite tiny so i don’t even see this loading image


#6

Here is a dirty solution on macos how quickly fix this problem

  1. create separated directory in your project. like “ios resources”
  2. You need image magic installed on your mac
  3. in console run
read -r -a array <<< "320x480 640x960 640x1136 750x1334 768x1024 1536x2048 1024x768 1242x2208 2208x1242 2048x1536 2048x2732 2732x2048"; for i in "${array[@]}";do convert -size $i xc:#5B94AA launch_image_$i.png;done
  1. in your project open game.project in text edit and add following lines to [ios] section
[ios]
bundle_identifier = your bundle here
pre_renderered_icons = 0
launch_image_320x480 = /ios resources/launch_image_320x480.png
launch_image_640x960 = /ios resources/launch_image_640x960.png
launch_image_640x1136 = /ios resources/launch_image_640x1136.png
launch_image_750x1334 = /ios resources/launch_image_750x1334.png
launch_image_768x1024 = /ios resources/launch_image_768x1024.png
launch_image_1536x2048 = /ios resources/launch_image_1536x2048.png
launch_image_1024x768 = /ios resources/launch_image_1024x768.png
launch_image_1242x2208 = /ios resources/launch_image_1242x2208.png
launch_image_2208x1242 = /ios resources/launch_image_2208x1242.png
launch_image_2048x1536 = /ios resources/launch_image_2048x1536.png
launch_image_2048x2732 = /ios resources/launch_image_2048x2732.png
launch_image_2732x2048 = /ios resources/launch_image_2732x2048.png

#7

Check out sips, it can do a lot of image manipulations and is included in OS X.

https://developer.apple.com/library/content/technotes/tn2035/_index.html#//apple_ref/doc/uid/DTS10003071-CH1-SECTION60


#8

There are also several online tools that can generate app icons, launch images and app store images:

http://appicon.build/
http://zeppelindev.com/splash.html#none
http://ticons.fokkezb.nl/


#9

Only a single 640x1136 image is needed to get rid of the borders.