iOS Tutorial Icons and Launch Images

This tutorial is relevant for B4i v4.40+.

App icons

iOS apps require a wide range of icon sizes. Starting from 20x20 and up to 1024x1024.

B4i will create all icons automatically based on the large icon (icon-store-1024.png).

Start by putting your own image in <project>\Files\Special.
The file name should be icon-store-1024.png (all lowercase) and its size should be 1024x1024.

When you run the project all icons will be created under <project>\Objects\src\Images.xcassets\AppIcon.appiconset

SS-2017-10-03_17.54.04.jpg


If the icons look good then you don't need to do anything more. If you do want to set one or more of the icons yourself then create the icon with the correct name and size and put it in <project>\Files\Special.

Launch images

Launch images appear while your app loads. By default B4i adds white launch images. You can see the launch images in <project>\Objects\src\Images.xcassets\LaunchImage.launchimage

If you like to override the white images then create new images with the exact same names and sizes and put them in <project>\Files\Special.
 

cooperlegend

Active Member
Licensed User
Longtime User
Works fine, except it creates the icon as read only as icon.png and when you compile release again it complains "Access to the path 'C:\Code\Project\Objects\src\icon.png' is denied." How can I get around this without needing to keep deleting this file?
 

sorex

Expert
Licensed User
Longtime User
If you like to override the white images then create new images with the exact same names and sizes and put them in <project>\Files\Special.

it would be nice if it took the [email protected] one and resized it to the other sizes if they don't exist.

I thought it did it like that just like the icons but when my app was waiting for review I noticed that only one had the right color.
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
is it possible to use a different name from icon-store-1024.png?
this is needed for multiple build configurations for different app versions
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
as a workaround i'm currently using

B4X:
#CustomBuildAction: 1, c:\windows\system32\cmd.exe, /c "copy ..\Files\Special\icon-store-1024-pcr.png ..\Files\Special\icon-store-1024.png"
 
D

Deleted member 103

Guest
as a workaround i'm currently using

B4X:
#CustomBuildAction: 1, c:\windows\system32\cmd.exe, /c "copy ..\Files\Special\icon-store-1024-pcr.png ..\Files\Special\icon-store-1024.png"

You can also use something like this:
B4X:
    #If lite
        #ApplicationLabel: App-Lite
          #CustomBuildAction: 1, c:\windows\system32\cmd.exe, /c copy ..\Special-Lite\*.* ..\Files\Special\*.*
    #End If

    #If Pro
        #ApplicationLabel: App-Pro
          #CustomBuildAction: 1, c:\windows\system32\cmd.exe, /c copy ..\Special-Pro\*.* ..\Files\Special\*.*
    #End If
 
Top