Plugin EcosystemSystem & OS
OTA (Over-The-Air) Updates
Seamlessly deploy updates to your app without app store submission.
The OTA plugin allows you to deliver JavaScript bundle updates directly to your users' devices, bypassing standard App Store review times for critical hotfixes.
Installation
npm install @easycord/otaAPI Reference
checkForUpdate()
Queries the update server for a new bundle release.
downloadUpdate()
Downloads the update and prepares it for installation.
import { OTA } from '@easycord/ota';
import { useState } from 'react';
export function UpdateManager() {
const [status, setStatus] = useState('Idle');
const handleUpdate = async () => {
try {
setStatus('Checking...');
const hasUpdate = await OTA.checkForUpdate();
if (hasUpdate) {
setStatus('Downloading...');
await OTA.downloadUpdate();
setStatus('Installing...');
await OTA.applyUpdate();
} else {
setStatus('Up to date');
}
} catch (err) {
setStatus('Failed to update');
}
};
return (
<div>
<p>Status: {status}</p>
<button onClick={handleUpdate}>Check for Updates</button>
</div>
);
}