You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android, iOS and HarmonyOS now expose native-host configure and checkAndUpdate APIs (#641). Hosts can configure Pushy before JavaScript or the React Native bridge starts, then check and download through the existing native update pipeline after normal launch bundle resolution.
Android: PushyNativeUpdate.configure(Context, JSONObject, ConfigurationCallback) and checkAndUpdate(Context, Callback). iOS: +[RCTPushy configure:completion:] and +[RCTPushy checkAndUpdateWithCompletion:], available to Swift as configure(_:completion:) and checkAndUpdate(completion:). HarmonyOS: PushyFileJSBundleProvider.configure(...) and checkAndUpdate() with exported configuration/result types.
Configuration validates appKey, endpoints, discovery URLs and activation policy before replacing the existing settings. Native-first provisioning creates a stable installation identifier. Configuration changes invalidate stale response caches and pending native decisions.
The new nativeConfigSource: 'native' JS option prevents JavaScript initialization and setOptions from overwriting native-owned settings. The default remains 'javascript' for existing integrations; native configuration is not automatically mirrored into JS options.
Results distinguish skipped, noUpdate, downloaded, failed and cancelled. Concurrent native callers share one round; completed rounds are reused. Missing configuration no longer consumes the process's first real check opportunity.
Compatibility and integration
Rebuild and distribute the native application. A JS-only hot update cannot add these native APIs. Source-based HarmonyOS integrations must rebuild the HAR; the npm package includes the updated HAR.
Configuration can run before JS, but checking still requires the application's real launch bundle resolution. Do not resolve the bundle again merely to initialize checking.
afterDownload defaults to none; use setNeedUpdate to select an ordinary downloaded update for the next launch. activated: true means selected for the next launch, not an immediate React Native reload. Existing server forceBoot and crash-rescue rules remain in effect.
Each process performs at most one real native update round, including failed rounds. Reconfiguration invalidates old results but does not grant another round. Native calls do not display update dialogs or invoke JS lifecycle hooks.