config/ruby_native.yml is the whole native configuration. Your app fetches it as JSON from /native/config.json on every launch, so a change reaches people on their next start with no rebuild. An app that has loaded your config before opens from its saved copy, checks for a newer one in the background, and restarts once if it changed.
Setup walks through writing the file for the first time, and each feature page documents its own block in context. This page is the list of everything the file accepts, and of which mistakes stop the app from starting.
A minimal file looks like this. rails generate ruby_native:install writes a longer version, with every option commented out and tabs proposed from your routes:
app:
name: My App
mode: normal
appearance:
tint_color: "#007AFF"
background_color: "#FFFFFF"
tabs:
- title: Home
path: /
icon: house
- title: Profile
path: /profile
icon: person
The file is evaluated as ERB before it is parsed, so a value can come from a Rails helper. The motivating case is the navigation bar logo, where image_url gives you a fingerprinted URL the app caches until the image changes. See Appearance.
| Key | Configures | See |
|---|---|---|
app |
Launch URL and navigation mode | Advanced Mode |
appearance |
Colors, theme, orientation, bar branding, splash | Appearance |
tabs |
The native tab bar | Tabs |
auth |
OAuth authorize paths | OAuth |
errors |
The native error screen | Error screen |
analytics |
Whether the app reports its launch | Setup |
ios |
Bundle ID and team ID | Linked domains |
android |
Package name and signing certificate | Linked domains |
linked_paths |
Narrow universal links to some paths | Linked domains |
ruby_native |
Holds app_id, written by deploy |
CLI |
Every block is optional. A key the app does not recognize is ignored, at this level and every level below it.
| Key | Values | Default |
|---|---|---|
name |
Your app's name | None |
mode |
normal or advanced |
normal |
entry_path |
The path the app opens on launch | The first tab's path |
| Key | Values | Default |
|---|---|---|
tint_color |
A color | The system tint |
background_color |
A color | White |
theme |
auto, light, dark |
auto |
landscape |
true or false |
false |
navbar |
A block, below | None |
splash |
A block, below | None |
android |
Android-only bar colors. See Appearance | None |
A color is a six-digit hex string like "#007AFF", or a mapping with both light and dark for a per-theme pair. Three-digit shorthand does not work.
| Key | Values |
|---|---|
logo |
An image URL, shown instead of the page title, or a mapping with light and dark URLs |
background_color |
A color |
foreground_color |
A color |
status_bar |
light or dark |
| Key | Values | Default |
|---|---|---|
enabled |
true or false |
false |
spinner_color |
A color | Picked for contrast |
status_bar |
light or dark |
Picked for contrast |
A list. Each entry:
| Key | Values | Default |
|---|---|---|
title |
The tab's label | From key and your locale files |
path |
Where the tab goes. Required | None |
icon |
An icon name. Required, unless icons is set |
None |
icons |
ios: and android: icon names, when they differ |
None |
key |
Names this tab's copy in your locale files | None |
eager |
Load on launch instead of on first visit | false |
search |
Show a search field in the navigation bar | false |
badge |
Allow a notification badge | false |
auto_route |
false, or a list of path prefixes that switch to this tab |
Prefix match on path |
| Key | Values |
|---|---|
oauth_paths |
A list of authorize paths, each triggering a native sign-in session |
List only the authorize path for each provider. Callbacks are handled automatically, and a listed one is dropped.
Per-state icons for the native error screen: offline for no connectivity, generic for any other load failure. Each takes an icon, or icons with ios: and android:. The copy comes from your own locale files under ruby_native.errors.*, not from this file. See Error screen.
| Key | Sub-keys |
|---|---|
ios |
bundle_id, team_id |
android |
package, cert_fingerprint |
linked_paths |
A list of path prefixes, when you do not want your whole domain linked |
Your app serves /.well-known/apple-app-site-association only once both ios keys are set, and /.well-known/assetlinks.json only once both android keys are set.
The app decodes this file into a fixed shape, and anything that does not fit stops the decode. Someone opening the app for the first time gets the error screen instead of your app, and the failure is reported to your dashboard, which Debugging covers. An app that has loaded your config before keeps running on its last good copy.
These stop the app from starting:
pathlandscape, splash.enabled, or a tab's eager, search, or badge set to something other than true or falseauto_route: true, which is rejected outright. Use false, or a list of prefixeslight or darkThese are ignored, with nothing said anywhere:
theme that is not auto, light, or dark, or a status_bar that is not light or dark, which falls back to the defaulticon and no icons, which shows its title alone on iOS and a placeholder icon on Androidmode that is not normal or advanced, which runs Normal Modeanalytics set to anything other than true or false, including the string "false", which leaves reporting ontitle and no key, which renders as "Untitled"key, which then share their translationsBuilds made before 0.21 are stricter. On iOS an unrecognized theme or status_bar, or a tab with no icon, stops the app from starting. On Android a config that fails to load shows the error screen on the next launch, saved copy or not. Keep the file valid for those builds until your users have updated.
A coding agent can check the file against all of this before a build. See validate_config.