1.0.1 â€ĸ Published 2 years ago

capacitor-plugin-asam v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Capacitor Plugin ASAM (Autonomous Single App Mode)

Release : 1.0.1 Last update Dependency size Repo size Downloads License

âš ī¸ Only for iOS devices

Easily integrate Autonomous Single App Mode in your ios app, allowing it to control Single App Mode sessions for focused, distraction-free user experiences. Ideal for educational, testing, or kiosk applications.

📍 Install

npm install capacitor-plugin-asam
npx cap sync

âš™ī¸ Configuration

To enable the Autonomous Single App Mode (ASAM) on iOS devices, administrators must utilize a Mobile Device Management (MDM) system or Apple Configurator.

These tools are essential for setting up and managing ASAM, as they provide the ability to create and deploy specific configuration profiles to iOS devices.

These profiles dictate which applications can run in ASAM, ensuring controlled and secure usage of the devices in environments like schools, businesses, or public kiosks. Without MDM or Apple Configurator, activating ASAM on iOS devices is not feasible.

đŸ•šī¸ Usage

// import the plugin
import {Asam} from "capacitor-plugin-asam";

// --------------------
// enable ASAM using setASAM

let r = await Asam.setASAM({enable: true});
if (!r.success)
    console.error("Failed to enable ASAM");

let isEnabled = (await Asam.isASAMEnabled()).enabled;
console.log("ASAM is enabled: " + isEnabled);

// --------------------
// another way to enable ASAM using enableASAM

r = await Asam.enableASAM();
if (!r.success)
    console.error("Failed to enable ASAM");

isEnabled = (await Asam.isASAMEnabled()).enabled;
console.log("ASAM is enabled: " + isEnabled);

// --------------------
// disable ASAM using disableASAM

r = await Asam.disableASAM();
if (!r.success)
    console.error("Failed to disable ASAM");

isEnabled = (await Asam.isASAMEnabled()).enabled;
console.log("ASAM is enabled: " + isEnabled);

// --------------------
// another way to disable ASAM using setASAM

r = await Asam.setASAM({enable: false});
if (!r.success)
    console.error("Failed to disable ASAM");

🧮 API

setASAM(...)

setASAM(options: { enable: boolean; }) => Promise<{ success: boolean; }>
ParamType
options{ enable: boolean; }

Returns: Promise<{ success: boolean; }>


enableASAM()

enableASAM() => Promise<{ success: boolean; }>

Returns: Promise<{ success: boolean; }>


disableASAM()

disableASAM() => Promise<{ success: boolean; }>

Returns: Promise<{ success: boolean; }>


isASAMEnabled()

isASAMEnabled() => Promise<{ enabled: boolean; }>

Returns: Promise<{ enabled: boolean; }>


enableASAM()

enableASAM(): Promise<{ success: boolean }>;

Enable Autonomous Single App Mode (ASAM) on the device.

Returns: Promise<{ success: boolean; }>


disableASAM()

disableASAM(): Promise<{ success: boolean }>;

Disable Autonomous Single App Mode (ASAM) on the device.

Returns: Promise<{ success: boolean; }>


isASAMEnabled()

isASAMEnabled(): Promise<{ enabled: boolean }>;

Returns whether Autonomous Single App Mode (ASAM) is enabled on the device.

Returns: Promise<{ enabled: boolean; }>


1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago