OneScript
Foundation

app

App information and interactive views API.

app.show

app.show(view) presents an interactive view in the app and action contexts. The returned promise remains pending for the lifetime of the view session.

import { app } from "onescript"
import { Text } from "onescript/views"

await app.show(<Text>Hello OneScript</Text>)

The view is presented with a navigation bar that contains Close and Console buttons and uses the project name as the default title. Use NavigationStack as the root view to push pages, and navigationTitle and toolbar to customize the navigation bar.

app.getInfo

The asynchronous app.getInfo() method returns information about the app.

import { app } from "onescript";

console.log(await app.getInfo());

output:

{
  "bundleID": "app.onescript",
  "version": "0.0.305",
  "build": "305"
}

How is this guide?

Last updated on

On this page