@dreamhorizonorg/raven-sdk-react-native
v0.1.0
Published
React Native bridge for Raven: initialize the native Raven SDK on iOS and Android, manage user profile updates, and logout from JavaScript.
Readme
@dreamhorizonorg/raven-sdk-react-native
React Native Turbo Module that bridges Raven to your app: initialize the native Raven stack on iOS and Android, call updateUserProfile, and logout from JavaScript with one API surface.
Repository: github.com/dream-horizon-org/raven-sdk-react-native
Features
initialize— Configure FCM/API endpoints and global props (user, device, app metadata).updateUserProfile— Sync user profile fields with the backend.logout— Clear session / tear down as implemented by the native SDKs.
Native work is delegated to raven-ios-sdk (CocoaPods) and the Android communications SDK; this package exposes a stable JS API and types.
Requirements
- React Native 0.83+ (aligned with this repo’s dev dependency; check peer ranges in
package.jsonfor your app). - iOS: CocoaPods, Firebase /
GoogleService-Info.plistwhere required (seeexample/iosdocs). - Android: Gradle setup compatible with the library’s
build.gradle(GitHub Packages / Maven as documented for Raven Android artifacts).
Installation
yarn add @dreamhorizonorg/raven-sdk-react-native
# or
npm install @dreamhorizonorg/raven-sdk-react-nativeFollow native setup for iOS (pod install) and Android (Gradle repositories, google-services.json, etc.) using the example app and docs as reference.
Usage
import {
initialize,
updateUserProfile,
logout,
} from '@dreamhorizonorg/raven-sdk-react-native';
await initialize({
fcmBaseUrl: 'https://your-api.example.com/',
apiKey: 'your-api-key',
globalProps: {
deviceId: 'device-123',
appVersion: '1.0.0',
appPackageName: 'com.example.app',
userId: 'user-123',
},
});
await updateUserProfile({
userId: 'user-123',
firstName: 'Jane',
lastName: 'Doe',
});
await logout();Publishing (maintainers)
Releases are automated with GitHub Actions when you push a tag raven-sdk-vMAJOR.MINOR.PATCH (see .github/workflows/publish.yml). The package is published to the npm registry as @dreamhorizonorg/raven-sdk-react-native (the name field in package.json).
Contributing
License
MIT — see LICENSE.
Made with create-react-native-library
