vi studio

Lessons · Building apps · 25 of 36

The config block

App name, store id, version, icon and splash screen.

The app's settings live in one config: block, in src/config.vi.

config:
  name: "Tasks"
  id: com.yourname.tasks
  version: "1.2.0"
  icon: @icon.png
  splash:
    color: white
    logo: @splash.png
    text: "Tasks"
    time: 1 second

main home:
  arrange: center
  children:
    title:
      text: "Welcome to {config.name}"
Key Means
name the app's name under its icon
id the store id, like a reversed web address. Never change it after publishing, or the stores see a different app
version the version people see in the store, like "1.2.0"; raise it for each release
icon the launcher icon (a square picture, 1024 × 1024 is best)
splash the screen while the app starts: color, logo or image, text, seconds
screens changes the sizes where phone, tablet and desktop start (rarely needed)

config.name (and the other keys) can be read anywhere.

Every example here runs in Vi Studio: open it in your browser (phones too) and press Start learning on the welcome page. Each code block there has a Try it button that runs it in the phone preview.

More in Building apps

About Vi. Vi is a free, open-source programming language for building real mobile apps. You describe each screen in plain words, and Vi compiles it to React Native (Expo) for Android, iOS and the web. Its editor, Vi Studio, runs on Windows, in any browser and on your phone, with the app running live as you type. Read more about Vi.