Configuration

Configure the hosted SDK or opt into custom endpoints.

Edit

Hosted NitroPush

For NitroPush Cloud, call the no-argument API once at module scope:

import { configure } from '@nitropush/react-native';
 
const client = configure();

The SDK reads NITROPUSH_DEPLOYMENT_KEY from native configuration. Hosted API and CDN endpoints are supplied by the native SDK.

If bundle signing is enabled in the dashboard, also compile the full base64 DER public key into NITROPUSH_BUNDLE_PUBLIC_KEY. Expo apps should set bundlePublicKey and requireBundleSigning: true in the config plugin. The SDK validates a configured key immediately and then fails closed on missing, legacy, malformed, or context-mismatched release signatures.

Self-hosted or custom endpoints

Only self-hosted installations should use configureWith():

import { configureWith } from '@nitropush/react-native';
 
const client = configureWith({
  serverUrl: 'https://updates.example.com',
  deploymentKey: 'PROD-XXXXXX',
  storageBaseUrl: 'https://cdn.example.com/bundles',
  bundlePublicKey: 'BASE64_DER_PUBLIC_KEY', // required when that project uses signing
});

Both endpoints must use HTTPS. Plain HTTP is accepted only for loopback development (localhost, 127.0.0.1, or ::1). Do not use configureWith() for the hosted service.

On this page