Application
Represents an installed application (game) on the console,
or a homebrew application (.nro file).
Can be used as an iterator to retrieve the list of installed applications.
Example
Constructors
new Application()
new Application(id): Application
Creates an Application instance from the ID of an
installed application.
Parameters
| Parameter | Type | Description | 
|---|---|---|
id | bigint | The ID of the installed application. | 
Returns
Example
new Application()
new Application(path): Application
Creates an Application instance from the string path
containing the contents of a .nro homebrew application.
Parameters
| Parameter | Type | Description | 
|---|---|---|
path | string | URL | The path of the .nro file. | 
Returns
Example
new Application()
new Application(nro): Application
Creates an Application instance from an ArrayBuffer
containing the contents of a .nro homebrew application.
Parameters
| Parameter | Type | Description | 
|---|---|---|
nro | ArrayBuffer | The contents of the .nro file. | 
Returns
Example
Properties
| Property | Modifier | Type | Description | 
|---|---|---|---|
author | readonly | string | The author or publisher of the application. | 
icon? | readonly | ArrayBuffer | The raw JPEG data for the cover art of the application. Can be decoded with the Image class. | 
id | readonly | bigint | The 64-bit unique identifier of the application (PresenceGroupId). | 
nacp | readonly | ArrayBuffer | The raw NACP data of the application. Use the @tootallnate/nacp module to parse this data. | 
name | readonly | string | The name of the application. | 
version | readonly | string | The version of the application. | 
Accessors
self
get static self(): Application
An Application instance representing the currently running application.
Returns
Methods
createCacheSaveDataSync()
createCacheSaveDataSync(index, info?): SaveData
Creates the Cache storage for this Application for the specified save index ID.
Parameters
| Parameter | Type | Default value | Description | 
|---|---|---|---|
index | number | 0 | The save index ID. Defaults to 0. | 
info? | Partial<SaveDataCreationInfoWithNacp> | undefined | - | 
Returns
createProfileSaveDataSync()
createProfileSaveDataSync(profile, info?): SaveData
Creates the Save Data for this Application for the provided user profile.
Parameters
| Parameter | Type | Description | 
|---|---|---|
profile | Profile | The Profile to create the save data for. | 
info? | Partial<SaveDataCreationInfoWithNacp> | - | 
Returns
Example
createSaveDataSync()
createSaveDataSync(info): SaveData
Parameters
| Parameter | Type | 
|---|---|
info | SaveDataCreationInfoWithNacp | 
Returns
filterSaveData()
filterSaveData(fn?): IteratorObject<SaveData, undefined, unknown>
Parameters
| Parameter | Type | 
|---|---|
fn? | (saveData) => boolean | 
Returns
IteratorObject<SaveData, undefined, unknown>
findSaveData()
findSaveData(fn?): undefined | SaveData
Parameters
| Parameter | Type | 
|---|---|
fn? | (saveData) => boolean | 
Returns
undefined | SaveData
launch()
launch(...args): never
Launches the installed title or homebrew application.
Parameters
| Parameter | Type | Description | 
|---|---|---|
...args | string[] | The arguments to pass to the application (only for homebrew applications). | 
Returns
never
[iterator]()
static [iterator](): Generator<Application, void, unknown>
Returns
Generator<Application, void, unknown>