iOS and Android handles images differently. iOS use 1x..3x format and Android uses xxhdpi, hdpi format and so on. To overcome those quirks and seamlessly handle image handling for both OS, Smartface has auto image generation feature embedded in the Cloud IDE.
Create automated folder on /images
directory if it doesn't exist
Upload your highest resolution image to /images/automated
folder. It will compress and resize the image accordingly.
Right click on the image
Select Generate auto-resized images
Images for different resolutions for both platforms will be generated.
You can use generated images on your project, like images://yourimage.png
. For further information about how to use images, refer the document below:
You can also use CLI tool sfImageProcessor to accomplish image generation.
Multiple image selection is not supported at the moment. For bulk image generation, you can use the script mentioned below or generate them one by one.
Name of launch image must be either
LaunchImage.png
LaunchImage.ios.png
LaunchImage.android.png
If LaunchImage.png is being used, then launch images for both platforms are generated
LaunchImage.ios.png or LaunchImage.android.png is being used then launch images for that specific platform are generated
Developers must edit original launch image to make it square sized so that our image processor module can perform resizing & cropping accordingly
For Launch image, to handle different screen sizes better on Android, the developer should create a 9-patch image. The steps are explained below.
It is recommended for your launch image to have at least 2208x2208 resolution
Exact same rules apply for generating application icons
Name of the app icon must be either
AppIcon.png
AppIcon.ios.png
AppIcon.android.png
​
It is recommended for your app icon to have 1024x1024 resolution