Class Application

Represents an installed application (game) on the console.

Hierarchy

  • Application

Properties

author: string

The author or publisher of the application.

The raw JPEG data for the cover art of the application. Can be decoded with the Image class.

id: bigint

The 64-bit unique identifier of the application.

The raw NACP data of the application. Use the @tootallnate/nacp module to parse this data.

name: string

The name of the application.

type: number

The "type" of application.

Methods

  • Creates the Save Data for this Application for the provided user profile.

    Parameters

    Returns void

    Example

    const profile = Switch.currentProfile({ required: true });
    app.createSaveData(profile);
  • Launches the application.

    Returns never

  • Mounts the save data for this application such that filesystem operations may be used.

    Parameters

    • name: string

      The name of the device mount for filesystem paths.

    • profile: Profile

      The Profile which the save data belongs to.

    Returns FsDev

    Example

    const profile = Switch.currentProfile({ required: true });
    const device = app.mountSaveData('save', profile);

    // Use the filesystem functions to do operations on the save mount
    console.log(Switch.readDirSync('save:/'));

    // Make sure to use `device.commit()` after any write operations
    Switch.writeFileSync('save:/state', 'your app stateā€¦');
    device.commit();

Generated using TypeDoc