·
1 commit
to main
since this release
v2.0.0
This is a major release that introduces a zero-setup integration model — the SDK is now initialized entirely from JavaScript, with no boilerplate required in MainApplication or AppDelegate.
🚀 Breaking changes
- New initialization API: call
initialize(apiKey, options)from JS/TS. The old setup viaRetenoReactNativeApplicationinterface (Android) and manualReteno.start()(iOS) is removed. - Android:
RetenoReactNativeApplicationinterface removed. SDK is now initialized viaReteno.initWithConfig()inside the native module. - Android:
RetenoMessagingService(extendsRetenoFirebaseMessagingService) is now registered in the library manifest — no need to declare it in your app manifest. - iOS:
Reteno.start()andMessagingDelegateremoved fromAppDelegate. Only a singleRetenoSdk.delayedStart()call is required for cold-start in-app support.
✨ Features
- New
initialize(apiKey, options)method exposed to JS withInitializeOptionstype (lifecycle tracking, debug mode, etc.). - iOS two-phase init (
delayedStart()+delayedSetup()) for proper cold-start push → in-app handling, with auto-fallback toReteno.start()if the AppDelegate hook is absent. - Auto-detection of
@react-native-firebase/messagingat runtime — FCM tokens are bridged automatically without a customMessagingDelegate.
🐛 Fixes
setDeviceTokennow properly resolves its promise.initializegracefully handles a missingapiKey.- Removed redundant activity checks during SDK initialization.
- Default values are now set for user attributes in the
Attributescomponent. - Event handler is now properly initialized in the
Navigationcomponent. - Debug mode flag is correctly applied during Reteno initialization.
⬆️ Dependency bumps
- Reteno Android FCM:
2.9.2→2.9.4 - Reteno iOS:
2.7.0
📦 Migration
Remove from MainApplication.kt / AppDelegate.swift any Reteno setup code. From JS:
```ts
import { initialize } from 'reteno-react-native-sdk';
initialize('YOUR_API_KEY', {
isPausedInAppMessages: false,
lifecycleTrackingOptions: { /* ... */ },
});
```
For iOS cold-start in-app support, add a single line to AppDelegate.didFinishLaunchingWithOptions before RN bridge setup:
```swift
RetenoSdk.delayedStart()
```