Skip to content

Entry point

FRVR.entrypoint tells you why this session started: a normal launch, a shared context from a friend, a challenge invite, a push‑notification deep link, etc.

Use it to jump the player straight into the relevant screen instead of the main menu.

const name = await FRVR.entrypoint.getName();
// 'home', 'invite', 'challenge', 'notification', …
const data = await FRVR.entrypoint.getData();
// arbitrary payload — who invited, which challenge, custom metadata…

Payload shape varies by channel and entry point; treat the object as opaque and validate the fields you care about.

Handy when a channel exposes debugging knobs or overrides:

const overrideFlag = FRVR.entrypoint.getProperty?.('force_challenge');
const name = await FRVR.entrypoint.getName();

switch (name) {
  case 'challenge': {
    const { challengeId } = await FRVR.entrypoint.getData();
    game.loadChallenge(challengeId);
    break;
  }
  case 'notification': {
    game.openInbox();
    break;
  }
  default:
    game.mainMenu();
}

Entrypoint: read name + data

loading SDK…