SDK API Reference
Complete API reference for the @silverbullet-ota/react-native package.
SilverOTA
The main API object for interacting with SilverOTA updates.
typescript
import { SilverOTA } from '@silverbullet-ota/react-native';getAppVersion()
Gets the native app version (not the bundle version).
Signature:
typescript
getAppVersion(): Promise<string>Returns:
Promise<string>containing the app version
Example:
typescript
const appVersion = await SilverOTA.getAppVersion();
console.log('App version:', appVersion);
// Output: "1.0.0"getChannel()
Gets the currently configured OTA channel.
Signature:
typescript
getChannel(): Promise<string>Returns:
Promise<string>containing the channel name
Example:
typescript
const channel = await SilverOTA.getChannel();
console.log('Current channel:', channel);
// Output: "production"