├── .editorconfig ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── build-and-quality-checks.yml │ ├── build-android-checks.yml │ ├── build-ios-checks.yml │ ├── check-compatibility-of-native-sdks.yml │ ├── check_pr_title.yml │ ├── create-hotfix-branch.yml │ ├── deploy-npm.yml │ ├── draft-new-release.yml │ ├── housekeeping.yaml │ ├── notion-pr-sync.yml │ ├── publish-new-release.yml │ ├── test.yml │ └── update-minimum-android-and-ios-sdk.yml ├── .gitignore ├── .husky ├── .gitignore ├── commit-msg └── pre-commit ├── .npmignore ├── .nvmrc ├── .nxignore ├── .prettierignore ├── .prettierrc ├── .ruby-version ├── .vscode └── extensions.json ├── CHANGELOG.md ├── CODEOWNERS ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── SECURITY.md ├── apps ├── example │ ├── .env.sample │ ├── .eslintrc.json │ ├── .ruby-version │ ├── CHANGELOG.md │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.md │ ├── android │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── MainApplication.kt │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ │ └── xml │ │ │ │ └── network_security_config.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.json │ ├── ios │ │ ├── .ruby-version │ │ ├── .xcode.env │ │ ├── Example-Bridging-Header.h │ │ ├── Example.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Example.xcscheme │ │ ├── Example.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── Example │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.mm │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── PrivacyInfo.xcprivacy │ │ │ └── main.m │ │ ├── ExampleTests │ │ │ ├── ExampleTests.m │ │ │ └── Info.plist │ │ ├── FBSDKInit.swift │ │ ├── Podfile │ │ └── Podfile.lock │ ├── jest.config.ts │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ ├── project.json │ ├── src │ │ ├── app │ │ │ ├── App.spec.tsx │ │ │ ├── App.tsx │ │ │ └── RudderEvents.tsx │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main-web.tsx │ │ ├── main.tsx │ │ └── test-setup.ts │ ├── test-setup.ts │ ├── tsconfig.app.json │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── webpack.config.js └── expo-example │ ├── .gitattributes │ ├── .gitignore │ ├── App.js │ ├── README.md │ ├── RudderStackAPIs.js │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── expoexample │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ └── splashscreen_logo.png │ │ │ ├── drawable-mdpi │ │ │ └── splashscreen_logo.png │ │ │ ├── drawable-xhdpi │ │ │ └── splashscreen_logo.png │ │ │ ├── drawable-xxhdpi │ │ │ └── splashscreen_logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ └── splashscreen_logo.png │ │ │ ├── drawable │ │ │ ├── ic_launcher_background.xml │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ ├── .gitignore │ ├── .xcode.env │ ├── Podfile │ ├── Podfile.lock │ ├── Podfile.properties.json │ ├── expoexample.xcodeproj │ │ └── project.pbxproj │ ├── expoexample.xcworkspace │ │ └── contents.xcworkspacedata │ └── expoexample │ │ ├── AppDelegate.swift │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── PrivacyInfo.xcprivacy │ │ ├── SplashScreen.storyboard │ │ ├── Supporting │ │ └── Expo.plist │ │ └── expoexample-Bridging-Header.h │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ └── screenshots │ ├── rosetta-simulator.png │ └── show-all-run-destinations.png ├── babel.config.json ├── commitlint.config.js ├── jest.config.ts ├── jest.preset.js ├── libs ├── plugins │ └── rudder-plugin-db-encryption-react-native │ │ ├── .eslintrc.json │ │ ├── CHANGELOG.md │ │ ├── CHANGELOG_LATEST.md │ │ ├── README.md │ │ ├── __tests__ │ │ └── Dummy.spec.ts │ │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── rudderstack │ │ │ └── plugin │ │ │ └── reactnative │ │ │ └── dbencryption │ │ │ ├── RudderPluginDBEncryptionReactNativeModule.java │ │ │ └── RudderPluginDBEncryptionReactNativePackage.java │ │ ├── babel.config.json │ │ ├── ios │ │ ├── RudderPluginDBEncryption.xcodeproj │ │ │ └── project.pbxproj │ │ ├── RudderPluginDBEncryption.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── RudderPluginDBEncryptionReactNative.h │ │ └── RudderPluginDBEncryptionReactNative.m │ │ ├── jest.config.ts │ │ ├── package.json │ │ ├── project.json │ │ ├── rudder-plugin-db-encryption-react-native.podspec │ │ ├── src │ │ ├── bridge.ts │ │ ├── dbEncryptionPlugin.ts │ │ └── index.ts │ │ ├── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json ├── rudder-integration-amplitude-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── rudderstack │ │ │ └── integration │ │ │ └── reactnative │ │ │ └── amplitude │ │ │ ├── RudderIntegrationAmplitudeReactNativeModule.java │ │ │ └── RudderIntegrationAmplitudeReactNativePackage.java │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationAmplitude.xcodeproj │ │ │ └── project.pbxproj │ │ ├── RudderIntegrationAmplitude.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── RudderIntegrationAmplitudeReactNative.h │ │ └── RudderIntegrationAmplitudeReactNative.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-amplitude-react-native.podspec │ ├── src │ │ ├── amplitude.ts │ │ ├── bridge.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-appcenter-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── rudderstack │ │ │ └── integration │ │ │ └── reactnative │ │ │ └── appcenter │ │ │ ├── RudderIntegrationAppcenterReactNativeModule.java │ │ │ └── RudderIntegrationAppcenterReactNativePackage.java │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationAppcenterReactNative.h │ │ ├── RudderIntegrationAppcenterReactNative.m │ │ ├── RudderIntegrationAppcenterReactNative.xcodeproj │ │ │ └── project.pbxproj │ │ └── RudderIntegrationAppcenterReactNative.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-appcenter-react-native.podspec │ ├── src │ │ ├── appcenter.ts │ │ ├── bridge.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-appsflyer-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── appsflyer │ │ │ │ ├── RudderIntegrationAppsflyerReactNativeModule.java │ │ │ │ └── RudderIntegrationAppsflyerReactNativePackage.java │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── AppsFlyerAttribution.h │ │ ├── AppsFlyerAttribution.m │ │ ├── AppsFlyerDeepLink.h │ │ ├── AppsFlyerDeepLinkResult.h │ │ ├── RudderIntegrationAppsflyerReactNative.h │ │ ├── RudderIntegrationAppsflyerReactNative.m │ │ ├── RudderIntegrationAppsflyerReactNative.xcodeproj │ │ │ └── project.pbxproj │ │ └── RudderIntegrationAppsflyerReactNative.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-appsflyer-react-native.podspec │ ├── src │ │ ├── appsflyer.ts │ │ ├── bridge.ts │ │ ├── index.ts │ │ └── util.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-braze-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── braze │ │ │ │ ├── RudderIntegrationBrazeReactNativeModule.java │ │ │ │ └── RudderIntegrationBrazeReactNativePackage.java │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationBraze.xcodeproj │ │ │ └── project.pbxproj │ │ ├── RudderIntegrationBraze.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── RudderIntegrationBrazeReactNative.h │ │ └── RudderIntegrationBrazeReactNative.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-braze-react-native.podspec │ ├── src │ │ ├── braze.ts │ │ ├── bridge.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-clevertap-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── clevertap │ │ │ │ ├── RudderIntegrationCleverTapReactNativeModule.java │ │ │ │ └── RudderIntegrationCleverTapReactNativePackage.java │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationCleverTapReactNative.h │ │ ├── RudderIntegrationCleverTapReactNative.m │ │ ├── RudderIntegrationCleverTapReactNative.xcodeproj │ │ │ └── project.pbxproj │ │ └── RudderIntegrationCleverTapReactNative.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-clevertap-react-native.podspec │ ├── src │ │ ├── bridge.ts │ │ ├── clevertap.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-facebook-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── facebook │ │ │ │ ├── RudderIntegrationFacebookReactNativeModule.java │ │ │ │ └── RudderIntegrationFacebookReactNativePackage.java │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationFacebookReactNative.h │ │ ├── RudderIntegrationFacebookReactNative.m │ │ ├── RudderIntegrationFacebookReactNative.xcodeproj │ │ │ └── project.pbxproj │ │ └── RudderIntegrationFacebookReactNative.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-facebook-react-native.podspec │ ├── src │ │ ├── bridge.ts │ │ ├── facebook.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-firebase-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── android │ │ ├── build.gradle │ │ ├── gradle.properties │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── firebase │ │ │ │ ├── RNRudderFirebaseIntegrationModuleImpl.java │ │ │ │ └── RNRudderFirebaseIntegrationPackage.kt │ │ │ ├── newarch │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── firebase │ │ │ │ └── RNRudderFirebaseIntegrationModule.java │ │ │ └── oldarch │ │ │ └── java │ │ │ └── com │ │ │ └── rudderstack │ │ │ └── integration │ │ │ └── reactnative │ │ │ └── firebase │ │ │ └── RNRudderFirebaseIntegrationModule.java │ ├── babel.config.json │ ├── ios │ │ ├── RNRudderFirebaseIntegrationModule.h │ │ ├── RNRudderFirebaseIntegrationModule.mm │ │ ├── RNRudderFirebaseIntegrationModuleImpl.h │ │ └── RNRudderFirebaseIntegrationModuleImpl.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-firebase-react-native.podspec │ ├── src │ │ ├── NativeFirebaseBridge.ts │ │ ├── bridge.ts │ │ ├── firebase.ts │ │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-moengage-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── moengage │ │ │ │ ├── RudderIntegrationMoengageReactNativeModule.java │ │ │ │ └── RudderIntegrationMoengageReactNativePackage.java │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationMoengage.xcodeproj │ │ │ └── project.pbxproj │ │ ├── RudderIntegrationMoengage.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── RudderIntegrationMoengageReactNative.h │ │ └── RudderIntegrationMoengageReactNative.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-moengage-react-native.podspec │ ├── src │ │ ├── bridge.ts │ │ ├── index.ts │ │ └── moengage.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── rudder-integration-singular-react-native │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── __tests__ │ │ └── Dummy.spec.ts │ ├── android │ │ ├── README.md │ │ ├── build.gradle │ │ ├── common_task.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rudderstack │ │ │ │ └── integration │ │ │ │ └── reactnative │ │ │ │ └── singular │ │ │ │ ├── RudderIntegrationSingularReactNativeModule.java │ │ │ │ └── RudderIntegrationSingularReactNativePackage.java │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── babel.config.json │ ├── ios │ │ ├── RudderIntegrationSingular.xcodeproj │ │ │ └── project.pbxproj │ │ ├── RudderIntegrationSingular.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── RudderIntegrationSingularReactNative.h │ │ └── RudderIntegrationSingularReactNative.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── rudder-integration-singular-react-native.podspec │ ├── src │ │ ├── bridge.ts │ │ ├── index.ts │ │ └── singular.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json └── sdk │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── README.md │ ├── RNRudderSdk.podspec │ ├── __tests__ │ └── Dummy.spec.ts │ ├── android │ ├── build.gradle │ ├── gradle.properties │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── rudderstack │ │ │ └── react │ │ │ └── android │ │ │ ├── AppVersion.java │ │ │ ├── LifeCycleEvents.java │ │ │ ├── RNLifeCycleEventListener.java │ │ │ ├── RNParamsConfigurator.java │ │ │ ├── RNPreferenceManager.java │ │ │ ├── RNRudderAnalytics.java │ │ │ ├── RNRudderSdkModuleImpl.java │ │ │ ├── RNRudderSdkPackage.kt │ │ │ ├── RNUserSessionPlugin.java │ │ │ ├── SessionTrackingParams.java │ │ │ └── Utility.java │ │ ├── newarch │ │ └── java │ │ │ └── com │ │ │ └── rudderstack │ │ │ └── react │ │ │ └── android │ │ │ └── RNRudderSdkModule.java │ │ └── oldarch │ │ └── java │ │ └── com │ │ └── rudderstack │ │ └── react │ │ └── android │ │ └── RNRudderSdkModule.java │ ├── babel.config.json │ ├── ios │ ├── RNApplicationLifeCycleManager.h │ ├── RNApplicationLifeCycleManager.m │ ├── RNBackGroundModeManager.h │ ├── RNBackGroundModeManager.m │ ├── RNParamsConfigurator.h │ ├── RNParamsConfigurator.m │ ├── RNPreferenceManager.h │ ├── RNPreferenceManager.m │ ├── RNRudderAnalytics.h │ ├── RNRudderAnalytics.m │ ├── RNRudderSdkModule.h │ ├── RNRudderSdkModule.mm │ ├── RNRudderSdkModuleImpl.h │ ├── RNRudderSdkModuleImpl.m │ ├── RNSessionTrackingParams.h │ ├── RNSessionTrackingParams.m │ ├── RNUIViewController+RNScreen.h │ ├── RNUIViewController+RNScreen.m │ ├── RNUserSessionPlugin.h │ ├── RNUserSessionPlugin.m │ ├── RNWKInterfaceController+RNScreen.h │ └── RNWKInterfaceController+RNScreen.m │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── src │ ├── Constants.ts │ ├── FilterNaN.ts │ ├── IDBEncryption.ts │ ├── IRudderContext.ts │ ├── Logger.ts │ ├── NativeRudderBridge.ts │ ├── RudderClient.ts │ ├── RudderConfiguration.ts │ └── index.ts │ ├── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── nx.json ├── package-lock.json ├── package.json ├── scripts ├── generate-last-release-changelog.sh ├── sync-tags-in-nx-projects.sh └── update-rn-sdk-version-in-constants-file.sh ├── sonar-project.properties ├── tools └── tsconfig.tools.json └── tsconfig.base.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": ["**/*"], 4 | "plugins": ["@nrwl/nx"], 5 | "overrides": [ 6 | { 7 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 8 | "rules": { 9 | "@nrwl/nx/enforce-module-boundaries": [ 10 | "error", 11 | { 12 | "enforceBuildableLibDependency": true, 13 | "allow": [], 14 | "depConstraints": [ 15 | { 16 | "sourceTag": "*", 17 | "onlyDependOnLibsWithTags": ["*"] 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | }, 24 | { 25 | "files": ["*.ts", "*.tsx"], 26 | "extends": ["plugin:@nrwl/nx/typescript"], 27 | "rules": {} 28 | }, 29 | { 30 | "files": ["*.js", "*.jsx"], 31 | "extends": ["plugin:@nrwl/nx/javascript"], 32 | "rules": {} 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: 'Feature Request: ' 5 | labels: open source 6 | assignees: "@rudderlabs/sdk-rn" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Describe alternatives you've considered** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Additional context** 19 | Add any other context or screenshots about the feature request here. 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'github-actions' 4 | directory: '/' 5 | schedule: 6 | interval: 'weekly' 7 | -------------------------------------------------------------------------------- /.github/workflows/build-and-quality-checks.yml: -------------------------------------------------------------------------------- 1 | name: Build & Code Quality Checks 2 | 3 | on: 4 | pull_request: 5 | branches: ['develop', 'master'] 6 | types: ['opened', 'reopened', 'synchronize'] 7 | 8 | jobs: 9 | build: 10 | name: Build & Code Quality Checks 11 | runs-on: macos-latest 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v4 16 | 17 | - name: Setup Java 18 | uses: actions/setup-java@v4 19 | with: 20 | distribution: 'zulu' 21 | java-version: '17' 22 | 23 | - name: Setup Ruby 24 | uses: ruby/setup-ruby@28233a011b6bb8633ea908d76c6d23aab6518b5c #v1.233.0 25 | 26 | - name: Setup Node 27 | uses: actions/setup-node@v4 28 | with: 29 | node-version-file: '.nvmrc' 30 | cache: 'npm' 31 | 32 | - name: Install node_modules 33 | env: 34 | HUSKY: 0 35 | run: | 36 | npm run setup:ci 37 | 38 | - name: Execute security checks 39 | run: | 40 | npm run check:security 41 | 42 | - name: Bundle apps 43 | run: | 44 | npm run bundle:ci 45 | -------------------------------------------------------------------------------- /.github/workflows/check_pr_title.yml: -------------------------------------------------------------------------------- 1 | name: Check PR title 2 | 3 | on: 4 | pull_request: 5 | branches: ['develop', 'master'] 6 | types: ['opened', 'reopened', 'edited', 'synchronize'] 7 | 8 | jobs: 9 | check_pr_title: 10 | name: Check PR title 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout source branch 15 | uses: actions/checkout@v4 16 | 17 | - name: Check PR title 18 | uses: rudderlabs/github-action-check-pr-title@v1.0.11 19 | -------------------------------------------------------------------------------- /.github/workflows/create-hotfix-branch.yml: -------------------------------------------------------------------------------- 1 | name: Create new hotfix branch 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | hotfix_name: 7 | description: Hotfix branch name 8 | required: true 9 | 10 | jobs: 11 | create-branch: 12 | name: Create new branch 13 | runs-on: ubuntu-latest 14 | if: github.ref == 'refs/heads/master' 15 | steps: 16 | - name: Create branch 17 | uses: peterjgrainger/action-create-branch@v3.0.0 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | with: 21 | branch: 'hotfix/${{ github.event.inputs.hotfix_name }}' 22 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/.husky/.gitignore -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run commit-msg 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run pre-commit 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | integrations/ 2 | Example/ 3 | ios/Pods/ 4 | RNRudderSdk.xcworkspace 5 | 6 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20.15.1 -------------------------------------------------------------------------------- /.nxignore: -------------------------------------------------------------------------------- 1 | .eslintrc.json 2 | babel.config.json 3 | CHANGELOG.md 4 | jest.config.ts 5 | README.md 6 | test-setup.ts 7 | tsconfig.json 8 | tsconfig.lib.json 9 | tsconfig.spec.json 10 | package.json 11 | package-lock.json 12 | sonar-project.properties 13 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /reports 5 | build/ 6 | .gradle/ 7 | CHANGELOG.md 8 | node_modules/ 9 | *.jar 10 | gradlew* 11 | *.lock 12 | *.xcodeproj/ 13 | *.xcworkspace/ 14 | Pods/ 15 | /.nx/cache 16 | /.nx/workspace-data -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": true, 6 | "printWidth": 100 7 | } 8 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "esbenp.prettier-vscode", 5 | "firsttris.vscode-jest-runner", 6 | "dbaeumer.vscode-eslint", 7 | "ms-playwright.playwright" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/CHANGELOG.md -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @rudderlabs/sdk-rn -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Reporting 2 | 3 | Thank you in advance for helping us keep RudderStack secure! 4 | 5 | Please report any security issues or vulnerabilities to [security@rudderstack.com](mailto:security@rudderstack.com), before proceeding to post them publicly as issues on GitHub or any other public channel like the RudderStack community Slack. These issues might also affect other users, and security vulnerabilities need to be handled quickly and sometimes privately. 6 | 7 | We will triage the issue, contact you for further instructions and make sure to take any necessary measures as needed. 8 | 9 | ## Supported versions 10 | 11 | We will fix any security bugs for the latest major.minor version of the SDK. 12 | 13 | | Version | Supported | 14 | | :--------- | :-------- | 15 | | Latest 1.x | ✅ | 16 | | Older 1.x | ❌ | 17 | | < 1.0 | ❌ | 18 | 19 | We may fix the vulnerabilities in the older versions depending on the severity of the issue and the age of the release, but we are only committing to the latest version released. 20 | -------------------------------------------------------------------------------- /apps/example/.env.sample: -------------------------------------------------------------------------------- 1 | TEST_DATAPLANE_URL= 2 | TEST_WRITE_KEY= 3 | APPSFLYER_DEV_KEY= 4 | APPSFLYER_APPLE_ID= 5 | MOENGAGE_ANDROID_APP_ID= -------------------------------------------------------------------------------- /apps/example/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /apps/example/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /apps/example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.7.0" 5 | 6 | gem 'cocoapods', '1.13.0' 7 | gem 'activesupport', '6.1.7' 8 | gem 'concurrent-ruby', '1.2.2' -------------------------------------------------------------------------------- /apps/example/README.md: -------------------------------------------------------------------------------- 1 | ## Pre-requisites to run the Example app: 2 | 3 | - Make a copy of the `.env.sample` and rename it as `.env` 4 | - Replace the values with the actual values from your Rudderstack Dashboard 5 | -------------------------------------------------------------------------------- /apps/example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/debug.keystore -------------------------------------------------------------------------------- /apps/example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /apps/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 | xmlns:tools="http://schemas.android.com/tools"> 4 | 5 | <application 6 | android:usesCleartextTraffic="true" 7 | tools:targetApi="28" 8 | android:networkSecurityConfig="@xml/network_security_config" 9 | tools:ignore="GoogleAppIndexingWarning"> 10 | <service 11 | android:name="com.moengage.firebase.MoEFireBaseMessagingService" 12 | android:exported="false"> 13 | <intent-filter> 14 | <action android:name="com.google.firebase.MESSAGING_EVENT" /> 15 | </intent-filter> 16 | </service> 17 | <meta-data 18 | android:name="com.google.android.gms.ads.APPLICATION_ID" 19 | android:value="ca-app-pub-4271859468376006~9737595580" /> 20 | </application> 21 | </manifest> 22 | -------------------------------------------------------------------------------- /apps/example/android/app/src/main/java/com/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "Example" 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = 21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 22 | } 23 | -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | <resources> 2 | <string name="app_name">Example</string> 3 | 4 | <!-- Refer to the Facebook doc: https://developers.facebook.com/docs/android/getting-started--> 5 | <string name="facebook_app_id">APPID</string> 6 | <string name="facebook_client_token">CLIENTOKEN</string> 7 | </resources> 8 | -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | <resources> 2 | 3 | <!-- Base application theme. --> 4 | <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> 5 | <!-- Customize your theme here. --> 6 | <item name="android:editTextBackground">@drawable/rn_edit_text_material</item> 7 | </style> 8 | 9 | </resources> 10 | -------------------------------------------------------------------------------- /apps/example/android/app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <network-security-config> 3 | <domain-config cleartextTrafficPermitted="true"> 4 | <domain includeSubdomains="true">10.0.2.2</domain> 5 | <domain includeSubdomains="true">localhost</domain> 6 | </domain-config> 7 | </network-security-config> -------------------------------------------------------------------------------- /apps/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "35.0.0" 4 | minSdkVersion = 25 5 | compileSdkVersion = 35 6 | targetSdkVersion = 35 7 | ndkVersion = "27.1.12297006" 8 | kotlinVersion = "2.0.21" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | 19 | // To use Firebase, uncomment this line: 20 | // classpath 'com.google.gms:google-services:4.4.2' 21 | } 22 | } 23 | 24 | apply plugin: "com.facebook.react.rootproject" 25 | 26 | allprojects { 27 | repositories { 28 | maven { url 'https://maven.singular.net/' } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /apps/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { includeBuild("../../../node_modules/@react-native/gradle-plugin") } 2 | plugins { id("com.facebook.react.settings") } 3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } 4 | rootProject.name = 'Example' 5 | include ':app' 6 | includeBuild('../../../node_modules/@react-native/gradle-plugin') 7 | -------------------------------------------------------------------------------- /apps/example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Example", 3 | "displayName": "Example" 4 | } 5 | -------------------------------------------------------------------------------- /apps/example/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["module:@react-native/babel-preset", { "useTransformReactJSXExperimental": true }]], 3 | "plugins": [ 4 | [ 5 | "module:react-native-dotenv", 6 | { 7 | "envName": "APP_ENV", 8 | "moduleName": "@env", 9 | "path": ".env", 10 | "safe": false, 11 | "allowUndefined": true, 12 | "verbose": false 13 | } 14 | ] 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /apps/example/ios/.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.4 2 | -------------------------------------------------------------------------------- /apps/example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | export ENTRY_FILE="${PROJECT_DIR}/../src/main.tsx" 13 | -------------------------------------------------------------------------------- /apps/example/ios/Example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /apps/example/ios/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <Workspace 3 | version = "1.0"> 4 | <FileRef 5 | location = "group:Example.xcodeproj"> 6 | </FileRef> 7 | <FileRef 8 | location = "group:Pods/Pods.xcodeproj"> 9 | </FileRef> 10 | </Workspace> 11 | -------------------------------------------------------------------------------- /apps/example/ios/Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import <RCTAppDelegate.h> 2 | #import <UIKit/UIKit.h> 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /apps/example/ios/Example/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import <React/RCTBundleURLProvider.h> 4 | #import "Example-Swift.h" 5 | 6 | @implementation AppDelegate 7 | 8 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 9 | { 10 | self.moduleName = @"Example"; 11 | // You can add your custom initial props in the dictionary below. 12 | // They will be passed down to the ViewController used by React Native. 13 | self.initialProps = @{}; 14 | 15 | [FBSDKInitializer setupFBSDKWithApplication:application launchOptions:launchOptions]; 16 | 17 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 18 | } 19 | 20 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 21 | { 22 | return [self bundleURL]; 23 | } 24 | 25 | - (NSURL *)bundleURL 26 | { 27 | #if DEBUG 28 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"src/main"]; 29 | #else 30 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 31 | #endif 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /apps/example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "iphone", 5 | "scale": "2x", 6 | "size": "20x20" 7 | }, 8 | { 9 | "idiom": "iphone", 10 | "scale": "3x", 11 | "size": "20x20" 12 | }, 13 | { 14 | "idiom": "iphone", 15 | "scale": "2x", 16 | "size": "29x29" 17 | }, 18 | { 19 | "idiom": "iphone", 20 | "scale": "3x", 21 | "size": "29x29" 22 | }, 23 | { 24 | "idiom": "iphone", 25 | "scale": "2x", 26 | "size": "40x40" 27 | }, 28 | { 29 | "idiom": "iphone", 30 | "scale": "3x", 31 | "size": "40x40" 32 | }, 33 | { 34 | "idiom": "iphone", 35 | "scale": "2x", 36 | "size": "60x60" 37 | }, 38 | { 39 | "idiom": "iphone", 40 | "scale": "3x", 41 | "size": "60x60" 42 | }, 43 | { 44 | "idiom": "ios-marketing", 45 | "scale": "1x", 46 | "size": "1024x1024" 47 | } 48 | ], 49 | "info": { 50 | "author": "xcode", 51 | "version": 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /apps/example/ios/Example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/example/ios/Example/main.m: -------------------------------------------------------------------------------- 1 | #import <UIKit/UIKit.h> 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/example/ios/ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 | <plist version="1.0"> 4 | <dict> 5 | <key>CFBundleDevelopmentRegion</key> 6 | <string>en</string> 7 | <key>CFBundleExecutable</key> 8 | <string>$(EXECUTABLE_NAME)</string> 9 | <key>CFBundleIdentifier</key> 10 | <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> 11 | <key>CFBundleInfoDictionaryVersion</key> 12 | <string>6.0</string> 13 | <key>CFBundleName</key> 14 | <string>$(PRODUCT_NAME)</string> 15 | <key>CFBundlePackageType</key> 16 | <string>BNDL</string> 17 | <key>CFBundleShortVersionString</key> 18 | <string>1.0</string> 19 | <key>CFBundleSignature</key> 20 | <string>????</string> 21 | <key>CFBundleVersion</key> 22 | <string>1</string> 23 | </dict> 24 | </plist> 25 | -------------------------------------------------------------------------------- /apps/example/ios/FBSDKInit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FBSDKInit.swift 3 | // Example 4 | // 5 | // Created by Abhishek Pandey on 19/09/24. 6 | // 7 | 8 | import Foundation 9 | import FBSDKCoreKit 10 | 11 | 12 | @objc class FBSDKInitializer: NSObject { 13 | 14 | @objc static func setupFBSDK(application: UIApplication, launchOptions: [UIApplication.LaunchOptionsKey: Any]?) { 15 | /** 16 | * This code initializes the SDK when your app launches, and allows the SDK handle logins and sharing from the native Facebook app when you perform a Login or Share action. Otherwise, the user must be logged into Facebook to use the in-app browser to login. Refer Facebook App Event doc for more info: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios 17 | */ 18 | ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/example/jest.config.ts: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | displayName: 'example', 3 | preset: 'react-native', 4 | resolver: '@nx/jest/plugins/resolver', 5 | moduleFileExtensions: ['ts', 'js', 'html', 'tsx', 'jsx'], 6 | setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], 7 | moduleNameMapper: { 8 | '.svg': '@nrwl/react-native/plugins/jest/svg-mock', 9 | '.png': '@nrwl/react-native/plugins/jest/svg-mock', 10 | }, 11 | collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/*.test.{ts,tsx}', '!**/test/*.{ts,tsx}'], 12 | coverageReporters: ['json', 'text', ['lcov', { projectRoot: '/' }], 'clover'], 13 | coverageThreshold: { 14 | global: { 15 | branches: 0, 16 | functions: 0, 17 | lines: 0, 18 | statements: 0, 19 | }, 20 | }, 21 | reporters: [ 22 | 'default', 23 | [ 24 | 'jest-sonar', 25 | { 26 | outputDirectory: 'reports/sonar', 27 | outputName: 'results-report-' + 'example' + '.xml', 28 | reportedFilePath: 'relative', 29 | relativeRootDir: './', 30 | }, 31 | ], 32 | ], 33 | cacheDirectory: '<rootDir>/node_modules/.cache/unit-tests', 34 | }; 35 | -------------------------------------------------------------------------------- /apps/example/metro.config.js: -------------------------------------------------------------------------------- 1 | const { withNxMetro } = require('@nx/react-native'); 2 | const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); 3 | 4 | const defaultConfig = getDefaultConfig(__dirname); 5 | const { assetExts, sourceExts } = defaultConfig.resolver; 6 | 7 | /** 8 | * Metro configuration 9 | * https://reactnative.dev/docs/metro 10 | * 11 | * @type {import('metro-config').MetroConfig} 12 | */ 13 | const customConfig = { 14 | resolver: { 15 | assetExts: assetExts.filter((ext) => ext !== 'svg'), 16 | sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'], 17 | }, 18 | }; 19 | 20 | module.exports = withNxMetro(mergeConfig(defaultConfig, customConfig), { 21 | // Change this to true to see debugging info. 22 | // Useful if you have issues resolving modules 23 | debug: false, 24 | // all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx', 'json' 25 | extensions: [], 26 | // Specify folders to watch, in addition to Nx defaults (workspace libraries and node_modules) 27 | watchFolders: [], 28 | }); 29 | -------------------------------------------------------------------------------- /apps/example/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/src/assets/.gitkeep -------------------------------------------------------------------------------- /apps/example/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/example/src/favicon.ico -------------------------------------------------------------------------------- /apps/example/src/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en" style="height: 100%"> 3 | <head> 4 | <meta charset="utf-8" /> 5 | <title>Example 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/example/src/main-web.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react'; 2 | import * as ReactDOM from 'react-dom/client'; 3 | 4 | import App from './app/App'; 5 | 6 | const root = ReactDOM.createRoot(document.getElementById('root')); 7 | root.render( 8 | 9 | 10 | , 11 | ); 12 | -------------------------------------------------------------------------------- /apps/example/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './app/App'; 3 | 4 | AppRegistry.registerComponent('Example', () => App); 5 | -------------------------------------------------------------------------------- /apps/example/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /apps/example/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /apps/example/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": ["node"] 6 | }, 7 | "files": ["../../node_modules/@nx/react-native/typings/svg.d.ts"], 8 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.spec.tsx", "src/test-setup.ts"], 9 | "include": [ 10 | "../../libs/**/src/**.ts", 11 | "src/**/*.ts", 12 | "src/**/*.tsx", 13 | "src/**/*.js", 14 | "src/**/*.jsx", 15 | "src/app/App.spec.tsx" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /apps/example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "allowSyntheticDefaultImports": true, 5 | "jsx": "react-native", 6 | "lib": ["dom", "esnext"], 7 | "moduleResolution": "node", 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true, 10 | "composite": true, 11 | "declaration": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.app.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /apps/example/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": [ 10 | "../../libs/**/src/**.ts", 11 | "**/*.ts", 12 | "**/*.tsx", 13 | "**/*.js", 14 | "**/*.jsx", 15 | "jest.config.ts", 16 | "src/**/*.test.ts", 17 | "src/**/*.spec.ts", 18 | "src/**/*.test.tsx", 19 | "src/**/*.spec.tsx", 20 | "src/**/*.test.js", 21 | "src/**/*.spec.js", 22 | "src/**/*.test.jsx", 23 | "src/**/*.spec.jsx", 24 | "src/**/*.d.ts", 25 | "src/app/App.spec.tsx" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /apps/example/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { composePlugins, withNx } = require('@nx/webpack'); 2 | const { withReact } = require('@nx/react'); 3 | 4 | // Nx plugins for webpack. 5 | module.exports = composePlugins( 6 | withNx(), 7 | withReact({ 8 | // Uncomment this line if you don't want to use SVGR 9 | // See: https://react-svgr.com/ 10 | // svgr: false 11 | }), 12 | (config) => { 13 | // Update the webpack config as needed here. 14 | // e.g. `config.plugins.push(new MyPlugin())` 15 | 16 | config.resolve.alias = { 17 | ...(config.resolve.alias ?? {}), 18 | 'react-native$': 'react-native-web', 19 | }; 20 | config.resolve.extensions = [ 21 | '.web.tsx', 22 | '.web.ts', 23 | '.web.jsx', 24 | '.web.js', 25 | ...config.resolve.extensions, 26 | ]; 27 | config.module.rules.push({ 28 | test: /\.(js|jsx)$/, 29 | include: /react-native-vector-icons/, 30 | loader: 'babel-loader', 31 | options: { 32 | presets: ['@babel/preset-env', ['@babel/preset-react', { runtime: 'automatic' }]], 33 | }, 34 | }); 35 | 36 | return config; 37 | }, 38 | ); 39 | -------------------------------------------------------------------------------- /apps/expo-example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /apps/expo-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | expo-env.d.ts 11 | 12 | # Native 13 | *.orig.* 14 | *.jks 15 | *.p8 16 | *.p12 17 | *.key 18 | *.mobileprovision 19 | 20 | # Metro 21 | .metro-health-check* 22 | 23 | # debug 24 | npm-debug.* 25 | yarn-debug.* 26 | yarn-error.* 27 | 28 | # macOS 29 | .DS_Store 30 | *.pem 31 | 32 | # local env files 33 | .env*.local 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | -------------------------------------------------------------------------------- /apps/expo-example/App.js: -------------------------------------------------------------------------------- 1 | import { StatusBar } from 'expo-status-bar'; 2 | import React from 'react'; 3 | import { StyleSheet, Text, View } from 'react-native'; 4 | import RudderStackAPIs from './RudderStackAPIs'; 5 | 6 | export default function App() { 7 | return ( 8 | 9 | Open up App.js to start working on your app! 10 | 11 | 12 | 13 | ); 14 | } 15 | 16 | const styles = StyleSheet.create({ 17 | container: { 18 | flex: 1, 19 | backgroundColor: '#fff', 20 | alignItems: 'center', 21 | justifyContent: 'center', 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /apps/expo-example/android/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Android/IntelliJ 6 | # 7 | build/ 8 | .idea 9 | .gradle 10 | local.properties 11 | *.iml 12 | *.hprof 13 | .cxx/ 14 | 15 | # Bundle artifacts 16 | *.jsbundle 17 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/debug.keystore -------------------------------------------------------------------------------- /apps/expo-example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # react-native-reanimated 11 | -keep class com.swmansion.reanimated.** { *; } 12 | -keep class com.facebook.react.turbomodule.** { *; } 13 | 14 | # Add any project specific keep options here: 15 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | expo-example 3 | 4 | -------------------------------------------------------------------------------- /apps/expo-example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /apps/expo-example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath('com.android.tools.build:gradle') 10 | classpath('com.facebook.react:react-native-gradle-plugin') 11 | classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') 12 | } 13 | } 14 | 15 | def reactNativeAndroidDir = new File( 16 | providers.exec { 17 | workingDir(rootDir) 18 | commandLine("node", "--print", "require.resolve('react-native/package.json')") 19 | }.standardOutput.asText.get().trim(), 20 | "../android" 21 | ) 22 | 23 | allprojects { 24 | repositories { 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url(reactNativeAndroidDir) 28 | } 29 | 30 | google() 31 | mavenCentral() 32 | maven { url 'https://www.jitpack.io' } 33 | maven { url 'https://maven.singular.net/' } 34 | } 35 | } 36 | 37 | apply plugin: "expo-root-project" 38 | apply plugin: "com.facebook.react.rootproject" 39 | -------------------------------------------------------------------------------- /apps/expo-example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /apps/expo-example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "expo-example", 4 | "slug": "expo-example", 5 | "version": "1.0.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/expo-example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | plugins: [ 6 | [ 7 | 'module:react-native-dotenv', 8 | { 9 | moduleName: '@env', 10 | }, 11 | ], 12 | ], 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /apps/expo-example/index.js: -------------------------------------------------------------------------------- 1 | import { registerRootComponent } from 'expo'; 2 | 3 | import App from './App'; 4 | 5 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 6 | // It also ensures that whether you load the app in Expo Go or in a native build, 7 | // the environment is set up appropriately 8 | registerRootComponent(App); 9 | -------------------------------------------------------------------------------- /apps/expo-example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | .xcode.env.local 25 | 26 | # Bundle artifacts 27 | *.jsbundle 28 | 29 | # CocoaPods 30 | /Pods/ 31 | -------------------------------------------------------------------------------- /apps/expo-example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /apps/expo-example/ios/Podfile.properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo.jsEngine": "hermes", 3 | "EX_DEV_CLIENT_NETWORK_INSPECTOR": "true" 4 | } 5 | -------------------------------------------------------------------------------- /apps/expo-example/ios/expoexample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/expo-example/ios/expoexample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "platform": "ios", 6 | "size": "1024x1024" 7 | } 8 | ], 9 | "info": { 10 | "version": 1, 11 | "author": "expo" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/expo-example/ios/expoexample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "expo" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/expo-example/ios/expoexample/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /apps/expo-example/ios/expoexample/expoexample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /apps/expo-example/metro.config.js: -------------------------------------------------------------------------------- 1 | // Learn more https://docs.expo.io/guides/customizing-metro 2 | const { getDefaultConfig } = require('expo/metro-config'); 3 | 4 | /** @type {import('expo/metro-config').MetroConfig} */ 5 | const config = getDefaultConfig(__dirname); 6 | 7 | module.exports = config; 8 | -------------------------------------------------------------------------------- /apps/expo-example/screenshots/rosetta-simulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/screenshots/rosetta-simulator.png -------------------------------------------------------------------------------- /apps/expo-example/screenshots/show-all-run-destinations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/apps/expo-example/screenshots/show-all-run-destinations.png -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "babelrcRoots": ["*"] 3 | } 4 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'header-max-length': [0, 'always', 120], 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nrwl/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.4.1](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-plugin-db-encryption-react-native@1.4.0...rudder-plugin-db-encryption-react-native@1.4.1) (2025-06-05) 2 | 3 | ### Bug Fixes 4 | 5 | - add dummy commit to trigger changelog generation ([#452](https://github.com/rudderlabs/rudder-sdk-react-native/issues/452)) ([80fd898](https://github.com/rudderlabs/rudder-sdk-react-native/commit/80fd898f084ee9290cbeb72fad6b852127aabf21)) 6 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-plugin-db-encryption-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-plugin-db-encryption-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-plugin-db-encryption-react-native` 10 | 11 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-plugin-db-encryption-react-native` to your project. 12 | 13 | ## Usage 14 | 15 | ```javascript 16 | import RudderIntegrationAppcenterReactNative from '@rudderstack/rudder-plugin-db-encryption-react-native'; 17 | ``` 18 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('DBEncryption Plugin Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 7 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/android/src/main/java/com/rudderstack/plugin/reactnative/dbencryption/RudderPluginDBEncryptionReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.plugin.reactnative.dbencryption; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | 12 | public class RudderPluginDBEncryptionReactNativePackage implements ReactPackage { 13 | @Override 14 | public List createNativeModules(ReactApplicationContext reactContext) { 15 | return Arrays.asList(new RudderPluginDBEncryptionReactNativeModule(reactContext)); 16 | } 17 | 18 | @Override 19 | public List createViewManagers(ReactApplicationContext reactContext) { 20 | return Collections.emptyList(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/ios/RudderPluginDBEncryption.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/ios/RudderPluginDBEncryptionReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderPluginDBEncryptionReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/ios/RudderPluginDBEncryptionReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderPluginDBEncryptionReactNative.h" 2 | #import 3 | 4 | #if __has_include() 5 | #import 6 | #else 7 | @import RudderDatabaseEncryption; 8 | #endif 9 | 10 | 11 | @implementation RudderPluginDBEncryptionReactNative 12 | 13 | RCT_EXPORT_MODULE() 14 | 15 | RCT_EXPORT_METHOD(setup:(NSString *)key enable:(BOOL)enable resolve:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 16 | { 17 | RSDBEncryption *dbEncryption = [[RSDBEncryption alloc] initWithKey:key enable:enable databaseProvider:[RSEncryptedDatabaseProvider new]]; 18 | [RNRudderAnalytics setDBEncryption:dbEncryption]; 19 | resolve(nil); 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-plugin-db-encryption-react-native", 3 | "title": "Rudder Plugin DBEncryption React Native", 4 | "version": "1.4.1", 5 | "description": "Rudder React Native DBEncryption Plugin support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "db-encryption" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/rudder-plugin-db-encryption-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-plugin-db-encryption-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-plugin-db-encryption-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | 21 | s.dependency "React" 22 | s.dependency 'RudderDatabaseEncryption' 23 | s.dependency 'RNRudderSdk' 24 | s.dependency 'Rudder', '>= 1.24.1', '< 2.0.0' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderPluginDBEncryptionReactNative } = NativeModules; 4 | 5 | if (!RudderPluginDBEncryptionReactNative) { 6 | throw new Error('Unable to import Rudder DBEncryption plugin'); 7 | } 8 | 9 | export default RudderPluginDBEncryptionReactNative; 10 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/src/dbEncryptionPlugin.ts: -------------------------------------------------------------------------------- 1 | import { IDBEncryption } from '@rudderstack/rudder-sdk-react-native'; 2 | import bridge from './bridge'; 3 | 4 | class DBEncryption implements IDBEncryption { 5 | key: string; 6 | enable: boolean; 7 | constructor(key: string, enable: boolean) { 8 | this.key = key; 9 | this.enable = enable; 10 | } 11 | 12 | // Add the encryption plugin. 13 | async addDBEncryptionPlugin(key: string, enable: boolean): Promise { 14 | await bridge.setup(key, enable); 15 | } 16 | } 17 | 18 | export default DBEncryption; 19 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import DBEncryption from './dbEncryptionPlugin'; 2 | 3 | export default DBEncryption; 4 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/plugins/rudder-plugin-db-encryption-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-amplitude-react-native@1.1.0...rudder-integration-amplitude-react-native@1.2.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-amplitude-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-amplitude-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-amplitude-react-native` 10 | 11 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-amplitude-react-native` to your project. 12 | 13 | ## Usage 14 | 15 | ```javascript 16 | import RudderIntegrationAppcenterReactNative from '@rudderstack/rudder-integration-amplitude-react-native'; 17 | ``` 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('Amplitude Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-amplitude-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/android/src/main/java/com/rudderstack/integration/reactnative/amplitude/RudderIntegrationAmplitudeReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.amplitude; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RudderIntegrationAmplitudeReactNativePackage implements ReactPackage { 14 | @Override 15 | public List createNativeModules(ReactApplicationContext reactContext) { 16 | return Arrays.asList(new RudderIntegrationAmplitudeReactNativeModule(reactContext)); 17 | } 18 | 19 | @Override 20 | public List createViewManagers(ReactApplicationContext reactContext) { 21 | return Collections.emptyList(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/ios/RudderIntegrationAmplitude.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/ios/RudderIntegrationAmplitudeReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationAmplitudeReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/ios/RudderIntegrationAmplitudeReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationAmplitudeReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_Amplitude; 7 | #endif 8 | 9 | @implementation RudderIntegrationAmplitudeReactNative 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 14 | { 15 | [RNRudderAnalytics addIntegration:[RudderAmplitudeFactory instance]]; 16 | resolve(nil); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-amplitude-react-native", 3 | "title": "Rudder Integration Amplitude React Native", 4 | "version": "1.2.0", 5 | "description": "Rudder React Native SDK Amplitude Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "amplitude" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/rudder-integration-amplitude-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-amplitude-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-amplitude-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | 21 | s.dependency "React" 22 | s.dependency "Rudder-Amplitude" 23 | s.dependency 'RNRudderSdk' 24 | 25 | end 26 | 27 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/src/amplitude.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationAmplitudeReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationAmplitudeReactNative) { 6 | throw new Error('Unable to import Rudder-Amplitude native module'); 7 | } 8 | 9 | export default RudderIntegrationAmplitudeReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import amplitude from './amplitude'; 2 | 3 | export default amplitude; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-amplitude-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-appcenter-react-native@1.1.1...rudder-integration-appcenter-react-native@1.2.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-appcenter-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-appcenter-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-appcenter-react-native` 10 | 11 | {% hint style="info" %} 12 | Make sure the `minSdkVersion` of your `build.gradle` in the root of `android` directory is atleast `21` 13 | {% endhint %} 14 | 15 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-appcenter-react-native` to your project. 16 | 17 | ## Usage 18 | 19 | ```javascript 20 | import RudderIntegrationAppcenterReactNative from '@rudderstack/rudder-integration-appcenter-react-native'; 21 | 22 | // TODO: What to do with the module? 23 | RudderIntegrationAppcenterReactNative; 24 | ``` 25 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('AppCenter Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-appcenter-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/android/src/main/java/com/rudderstack/integration/reactnative/appcenter/RudderIntegrationAppcenterReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.appcenter; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RudderIntegrationAppcenterReactNativePackage implements ReactPackage { 14 | @Override 15 | public List createNativeModules(ReactApplicationContext reactContext) { 16 | return Arrays.asList(new RudderIntegrationAppcenterReactNativeModule(reactContext)); 17 | } 18 | 19 | @Override 20 | public List createViewManagers(ReactApplicationContext reactContext) { 21 | return Collections.emptyList(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/ios/RudderIntegrationAppcenterReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationAppcenterReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/ios/RudderIntegrationAppcenterReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationAppcenterReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_AppCenter; 7 | #endif 8 | 9 | @import AppCenterAnalytics; 10 | @implementation RudderIntegrationAppcenterReactNative 11 | 12 | RCT_EXPORT_MODULE() 13 | 14 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 15 | { 16 | [RNRudderAnalytics addIntegration:[RudderAppCenterFactory instance]]; 17 | resolve(nil); 18 | } 19 | 20 | RCT_EXPORT_METHOD(enableAnalytics) 21 | { 22 | [MSACAnalytics setEnabled:true]; 23 | } 24 | 25 | RCT_EXPORT_METHOD(disableAnalytics) 26 | { 27 | [MSACAnalytics setEnabled:false]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/ios/RudderIntegrationAppcenterReactNative.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/ios/RudderIntegrationAppcenterReactNative.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-appcenter-react-native", 3 | "title": "Rudder Integration Appcenter React Native", 4 | "version": "1.2.0", 5 | "description": "Rudder React Native SDK Appcenter Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "appcenter" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/rudder-integration-appcenter-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-appcenter-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-appcenter-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-AppCenter" 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/src/appcenter.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | async function enableAnalytics() { 9 | await bridge.enableAnalytics(); 10 | } 11 | 12 | async function disableAnalytics() { 13 | await bridge.disableAnalytics(); 14 | } 15 | 16 | export { enableAnalytics, disableAnalytics }; 17 | export default setup; 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationAppcenterReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationAppcenterReactNative) { 6 | throw new Error('Unable to import Rudder-Appcenter native module'); 7 | } 8 | 9 | export default RudderIntegrationAppcenterReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import appcenter from './appcenter'; 2 | 3 | export { enableAnalytics, disableAnalytics } from './appcenter'; 4 | 5 | export default appcenter; 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-appcenter-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.7.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-appsflyer-react-native@1.6.1...rudder-integration-appsflyer-react-native@1.7.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-appsflyer-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-appsflyer-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-appsflyer-react-native` 10 | 11 | ## Usage 12 | 13 | ```javascript 14 | import RudderIntegrationAppsflyerReactNative from '@rudderstack/rudder-integration-appsflyer-react-native'; 15 | 16 | // TODO: What to do with the module? 17 | RudderIntegrationAppsflyerReactNative; 18 | ``` 19 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('AppsFlyer Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-appsflyer-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/src/main/java/com/rudderstack/integration/reactnative/appsflyer/RudderIntegrationAppsflyerReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.appsflyer; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | 12 | public class RudderIntegrationAppsflyerReactNativePackage implements ReactPackage { 13 | @Override 14 | public List createNativeModules(ReactApplicationContext reactContext) { 15 | return Arrays.asList(new RudderIntegrationAppsflyerReactNativeModule(reactContext)); 16 | } 17 | 18 | @Override 19 | public List createViewManagers(ReactApplicationContext reactContext) { 20 | return Collections.emptyList(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-appsflyer-react-native/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/ios/AppsFlyerAttribution.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppsFlyerAttribution.h 3 | // Pods 4 | // 5 | // Created by Amit Kremer on 11/02/2021. 6 | // 7 | #ifndef AppsFlyerAttribution_h 8 | #define AppsFlyerAttribution_h 9 | #endif /* AppsFlyerAttribution_h */ 10 | #import 11 | 12 | @interface AppsFlyerAttribution : NSObject 13 | @property BOOL RNAFBridgeReady; 14 | 15 | + (instancetype _Nonnull )shared; 16 | - (void) continueUserActivity:(NSUserActivity *_Nonnull)userActivity restorationHandler:(void (^_Nullable)(NSArray *_Nullable))restorationHandler; 17 | - (void) handleOpenUrl:(NSURL *_Nonnull)url options:(NSDictionary *_Nullable)options; 18 | - (void) handleOpenUrl:(NSURL *_Nonnull)url sourceApplication:(NSString *_Nullable)sourceApplication annotation:(id _Nullable)annotation; 19 | 20 | @end 21 | 22 | static NSString * _Nonnull const RNAFBridgeInitializedNotification = @"bridgeInitialized"; 23 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/ios/AppsFlyerDeepLinkResult.h: -------------------------------------------------------------------------------- 1 | // 2 | // AFSDKDeeplinkResult.h 3 | // AppsFlyerLib 4 | // 5 | // Created by Andrii Hahan on 20.08.2020. 6 | // 7 | 8 | #import 9 | 10 | @class AppsFlyerDeepLink; 11 | 12 | typedef NS_CLOSED_ENUM(NSUInteger, AFSDKDeepLinkResultStatus) { 13 | AFSDKDeepLinkResultStatusNotFound, 14 | AFSDKDeepLinkResultStatusFound, 15 | AFSDKDeepLinkResultStatusFailure, 16 | } NS_SWIFT_NAME(DeepLinkResultStatus); 17 | 18 | NS_SWIFT_NAME(DeepLinkResult) 19 | @interface AppsFlyerDeepLinkResult : NSObject 20 | 21 | - (nonnull instancetype)init NS_UNAVAILABLE; 22 | + (nonnull instancetype)new NS_UNAVAILABLE; 23 | 24 | @property(readonly) AFSDKDeepLinkResultStatus status; 25 | 26 | @property(readonly, nullable) AppsFlyerDeepLink *deepLink; 27 | @property(readonly, nullable) NSError *error; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/ios/RudderIntegrationAppsflyerReactNative.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-appsflyer-react-native", 3 | "title": "Rudder Integration Appsflyer React Native", 4 | "version": "1.7.0", 5 | "description": "Rudder React Native SDK Appsflyer Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "appsflyer" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/rudder-integration-appsflyer-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-appsflyer-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-appsflyer-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.author = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "10.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-Appsflyer", ">= 2.2.0" 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationAppsflyerReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationAppsflyerReactNative) { 6 | throw new Error('Unable to import Rudder-Appsflyer native module'); 7 | } 8 | 9 | export default RudderIntegrationAppsflyerReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import appsflyer from './appsflyer'; 2 | export { 3 | onDeepLink, 4 | onInstallConversionData, 5 | onInstallConversionFailure, 6 | onAppOpenAttribution, 7 | onAttributionFailure, 8 | setOptions, 9 | updateServerUninstallToken, 10 | setCustomerUserId, 11 | setOneLinkCustomDomains, 12 | getAppsFlyerId, 13 | } from './appsflyer'; 14 | 15 | export default appsflyer; 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/src/util.ts: -------------------------------------------------------------------------------- 1 | function isStringArray(elements: any) { 2 | if (!Array.isArray(elements)) return false; 3 | return elements.every((element) => isString(element)); 4 | } 5 | 6 | function isString(element: any) { 7 | return typeof element === 'string'; 8 | } 9 | 10 | function getStringArray(element: any) { 11 | if (isStringArray(element)) return element; 12 | if (isString(element)) return [element]; 13 | return null; 14 | } 15 | 16 | export { isString, isStringArray, getStringArray }; 17 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-appsflyer-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [2.0.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-braze-react-native@1.3.0...rudder-integration-braze-react-native@2.0.0) (2025-04-29) 2 | 3 | ### ⚠ BREAKING CHANGES 4 | 5 | - update the braze integration to the latest version (#419) 6 | 7 | ### Features 8 | 9 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 10 | - update the braze integration to the latest version ([#419](https://github.com/rudderlabs/rudder-sdk-react-native/issues/419)) ([5f6b715](https://github.com/rudderlabs/rudder-sdk-react-native/commit/5f6b715150f86b513282297584a70841ea6c7377)) 11 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-braze-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-braze-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-braze-react-native` 10 | 11 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-braze-react-native` to your project. 12 | 13 | ## Usage 14 | 15 | ```javascript 16 | import RudderIntegrationAppcenterReactNative from '@rudderstack/rudder-integration-braze-react-native'; 17 | ``` 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('Braze Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-braze-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/src/main/java/com/rudderstack/integration/reactnative/braze/RudderIntegrationBrazeReactNativeModule.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.braze; 2 | 3 | import com.facebook.react.bridge.Promise; 4 | import com.facebook.react.bridge.ReactApplicationContext; 5 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 6 | import com.facebook.react.bridge.ReactMethod; 7 | import com.rudderstack.android.integration.braze.BrazeIntegrationFactory; 8 | import com.rudderstack.react.android.RNRudderAnalytics; 9 | 10 | public class RudderIntegrationBrazeReactNativeModule 11 | extends ReactContextBaseJavaModule { 12 | 13 | private final ReactApplicationContext reactContext; 14 | 15 | public RudderIntegrationBrazeReactNativeModule( 16 | ReactApplicationContext reactContext 17 | ) { 18 | super(reactContext); 19 | this.reactContext = reactContext; 20 | } 21 | 22 | @Override 23 | public String getName() { 24 | return "RudderIntegrationBrazeReactNative"; 25 | } 26 | 27 | @ReactMethod 28 | public void setup(Promise promise) { 29 | RNRudderAnalytics.addIntegration(BrazeIntegrationFactory.FACTORY); 30 | promise.resolve(null); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/src/main/java/com/rudderstack/integration/reactnative/braze/RudderIntegrationBrazeReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.braze; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RudderIntegrationBrazeReactNativePackage implements ReactPackage { 14 | @Override 15 | public List createNativeModules(ReactApplicationContext reactContext) { 16 | return Arrays.asList(new RudderIntegrationBrazeReactNativeModule(reactContext)); 17 | } 18 | 19 | @Override 20 | public List createViewManagers(ReactApplicationContext reactContext) { 21 | return Collections.emptyList(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-braze-react-native/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/ios/RudderIntegrationBraze.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/ios/RudderIntegrationBrazeReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationBrazeReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/ios/RudderIntegrationBrazeReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationBrazeReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_Braze; 7 | #endif 8 | 9 | @implementation RudderIntegrationBrazeReactNative 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 14 | { 15 | [RNRudderAnalytics addIntegration:[RudderBrazeFactory instance]]; 16 | resolve(nil); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-braze-react-native", 3 | "title": "Rudder Integration Braze React Native", 4 | "version": "2.0.0", 5 | "description": "Rudder React Native SDK Braze Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "braze" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/rudder-integration-braze-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-braze-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-braze-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "13.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-Braze", '~> 4.0' 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/src/braze.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | async function setup() { 4 | await bridge.setup(); 5 | } 6 | 7 | export default setup; 8 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationBrazeReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationBrazeReactNative) { 6 | throw new Error('Unable to import Rudder-Braze native module'); 7 | } 8 | 9 | export default RudderIntegrationBrazeReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import braze from './braze'; 2 | 3 | export default braze; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-braze-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-clevertap-react-native@1.1.0...rudder-integration-clevertap-react-native@1.2.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-clevertap-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-clevertap-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-clevertap-react-native` 10 | 11 | ## Usage 12 | 13 | ```javascript 14 | import RudderIntegrationCleverTapReactNative from '@rudderstack/rudder-integration-clevertap-react-native'; 15 | 16 | // TODO: What to do with the module? 17 | RudderIntegrationCleverTapReactNative; 18 | ``` 19 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('CleverTap Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-clevertap-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/src/main/java/com/rudderstack/integration/reactnative/clevertap/RudderIntegrationCleverTapReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.clevertap; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | import java.util.Arrays; 9 | import java.util.Collections; 10 | import java.util.List; 11 | 12 | public class RudderIntegrationCleverTapReactNativePackage 13 | implements ReactPackage { 14 | 15 | @Override 16 | public List createNativeModules( 17 | ReactApplicationContext reactContext 18 | ) { 19 | return Arrays.asList( 20 | new RudderIntegrationCleverTapReactNativeModule(reactContext) 21 | ); 22 | } 23 | 24 | @Override 25 | public List createViewManagers( 26 | ReactApplicationContext reactContext 27 | ) { 28 | return Collections.emptyList(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-clevertap-react-native/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/ios/RudderIntegrationCleverTapReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationCleverTapReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/ios/RudderIntegrationCleverTapReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationCleverTapReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_CleverTap; 7 | #endif 8 | 9 | @implementation RudderIntegrationCleverTapReactNative 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 14 | { 15 | [RNRudderAnalytics addIntegration:[RudderCleverTapFactory instance]]; 16 | resolve(nil); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/ios/RudderIntegrationCleverTapReactNative.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-clevertap-react-native", 3 | "title": "Rudder Integration CleverTap React Native", 4 | "version": "1.2.0", 5 | "description": "Rudder React Native SDK CleverTap Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "clevertap" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/rudder-integration-clevertap-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-clevertap-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-clevertap-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | 21 | s.dependency "React" 22 | s.dependency "Rudder-CleverTap", "~> 1.1.2" 23 | s.dependency 'CleverTap-iOS-SDK' 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationCleverTapReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationCleverTapReactNative) { 6 | throw new Error('Unable to import Rudder-CleverTap native module'); 7 | } 8 | 9 | export default RudderIntegrationCleverTapReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/src/clevertap.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import clevertap from './clevertap'; 2 | 3 | export default clevertap; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-clevertap-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.1.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-facebook-react-native@1.0.1...rudder-integration-facebook-react-native@1.1.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-facebook-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-facebook-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-facebook-react-native` 10 | 11 | ## Usage 12 | 13 | ```javascript 14 | import RudderIntegrationFacebookReactNative from '@rudderstack/rudder-integration-facebook-react-native'; 15 | 16 | // TODO: What to do with the module? 17 | RudderIntegrationFacebookReactNative; 18 | ``` 19 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('Facebook Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/android/src/main/java/com/rudderstack/integration/reactnative/facebook/RudderIntegrationFacebookReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.facebook; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | 12 | public class RudderIntegrationFacebookReactNativePackage implements ReactPackage { 13 | @Override 14 | public List createNativeModules(ReactApplicationContext reactContext) { 15 | return Arrays.asList(new RudderIntegrationFacebookReactNativeModule(reactContext)); 16 | } 17 | 18 | @Override 19 | public List createViewManagers(ReactApplicationContext reactContext) { 20 | return Collections.emptyList(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/ios/RudderIntegrationFacebookReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationFacebookReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/ios/RudderIntegrationFacebookReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationFacebookReactNative.h" 2 | #import 3 | #import 4 | #import 5 | 6 | @implementation RudderIntegrationFacebookReactNative 7 | 8 | RCT_EXPORT_MODULE() 9 | 10 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 11 | { 12 | [RNRudderAnalytics addIntegration:[RudderFacebookFactory instance]]; 13 | resolve(nil); 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/ios/RudderIntegrationFacebookReactNative.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-facebook-react-native", 3 | "title": "RudderStack Facebook React Native Integration", 4 | "version": "1.1.0", 5 | "description": "RudderStack React Native SDK Facebook Device mode integration for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "facebook" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/rudder-integration-facebook-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-facebook-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-facebook-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-Facebook", ">=2.2.1", '<3.0.0' 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationFacebookReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationFacebookReactNative) { 6 | throw new Error('Unable to import Rudder-Facebook native module'); 7 | } 8 | 9 | export default RudderIntegrationFacebookReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/src/facebook.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import facebook from './facebook'; 2 | 3 | export default facebook; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-facebook-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [2.0.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-firebase-react-native@1.2.0...rudder-integration-firebase-react-native@2.0.0) (2025-06-05) 2 | 3 | ### ⚠ BREAKING CHANGES 4 | 5 | - **firebase:** add support for new react native architecture (#450) 6 | 7 | ### Features 8 | 9 | - **firebase:** add support for new react native architecture ([#450](https://github.com/rudderlabs/rudder-sdk-react-native/issues/450)) ([4fe8551](https://github.com/rudderlabs/rudder-sdk-react-native/commit/4fe8551a952f910c825c27be2cc5027d6803d75c)) 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-firebase-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-firebase-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-firebase-react-native` 10 | 11 | ## Usage 12 | 13 | ```javascript 14 | import firebase from '@rudderstack/rudder-integration-firebase-react-native'; 15 | 16 | const config = { 17 | dataPlaneUrl: TEST_DATAPLANE_URL, 18 | logLevel: RUDDER_LOG_LEVEL.VERBOSE, 19 | withFactories: [firebase], 20 | }; 21 | 22 | await rc.setup(TEST_WRITE_KEY, config, options); 23 | ``` 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/android/gradle.properties: -------------------------------------------------------------------------------- 1 | RNRudderFirebaseIntegrationModule_kotlinVersion=2.0.21 2 | RNRudderFirebaseIntegrationModule_minSdkVersion=19 3 | RNRudderFirebaseIntegrationModule_targetSdkVersion=34 4 | RNRudderFirebaseIntegrationModule_compileSdkVersion=35 5 | RNRudderFirebaseIntegrationModule_ndkVersion=27.1.12297006 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/android/src/main/java/com/rudderstack/integration/reactnative/firebase/RNRudderFirebaseIntegrationModuleImpl.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.firebase; 2 | 3 | import com.facebook.react.bridge.Promise; 4 | import com.rudderstack.android.integration.firebase.FirebaseIntegrationFactory; 5 | import com.rudderstack.react.android.RNRudderAnalytics; 6 | 7 | public class RNRudderFirebaseIntegrationModuleImpl { 8 | 9 | public static final String NAME = "RNRudderFirebaseIntegrationModule"; 10 | 11 | public RNRudderFirebaseIntegrationModuleImpl() { 12 | } 13 | 14 | public String getName() { 15 | return NAME; 16 | } 17 | 18 | public void setup(Promise promise) { 19 | RNRudderAnalytics.addIntegration(FirebaseIntegrationFactory.FACTORY); 20 | promise.resolve(null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/android/src/main/oldarch/java/com/rudderstack/integration/reactnative/firebase/RNRudderFirebaseIntegrationModule.java: -------------------------------------------------------------------------------- 1 | package java.com.rudderstack.integration.reactnative.firebase; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import com.facebook.react.bridge.Promise; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 8 | import com.facebook.react.bridge.ReactMethod; 9 | import com.rudderstack.integration.reactnative.firebase.RNRudderFirebaseIntegrationModuleImpl; 10 | 11 | public class RNRudderFirebaseIntegrationModule extends ReactContextBaseJavaModule { 12 | 13 | private final RNRudderFirebaseIntegrationModuleImpl moduleImpl; 14 | 15 | public RNRudderFirebaseIntegrationModule(ReactApplicationContext reactContext) { 16 | super(reactContext); 17 | this.moduleImpl = new RNRudderFirebaseIntegrationModuleImpl(); 18 | } 19 | 20 | @NonNull 21 | @Override 22 | public String getName() { 23 | return moduleImpl.getName(); 24 | } 25 | 26 | @ReactMethod 27 | public void setup(Promise promise) { 28 | moduleImpl.setup(promise); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/ios/RNRudderFirebaseIntegrationModule.h: -------------------------------------------------------------------------------- 1 | #import "RNRudderFirebaseIntegrationModuleImpl.h" 2 | 3 | // Thanks to this guard, we won't import this header when we build for the old architecture. 4 | #ifdef RCT_NEW_ARCH_ENABLED 5 | 6 | // New Architecture 7 | #import "RNRudderFirebaseIntegrationModuleSpec/RNRudderFirebaseIntegrationModuleSpec.h" 8 | @interface RNRudderFirebaseIntegrationModule : NSObject { 9 | 10 | #else 11 | 12 | // Legacy Architecture 13 | #if __has_include("RCTBridgeModule.h") 14 | #import "RCTBridgeModule.h" 15 | #else 16 | #import 17 | #endif 18 | 19 | @interface RNRudderFirebaseIntegrationModule : NSObject { 20 | 21 | #endif 22 | 23 | @private 24 | RNRudderFirebaseIntegrationModuleImpl *moduleImpl; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/ios/RNRudderFirebaseIntegrationModuleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface RNRudderFirebaseIntegrationModuleImpl : NSObject 5 | 6 | - (void)setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/ios/RNRudderFirebaseIntegrationModuleImpl.m: -------------------------------------------------------------------------------- 1 | #import "RNRudderFirebaseIntegrationModuleImpl.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_Firebase; 7 | #endif 8 | 9 | @implementation RNRudderFirebaseIntegrationModuleImpl 10 | 11 | - (void)setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject { 12 | [RNRudderAnalytics addIntegration:[RudderFirebaseFactory instance]]; 13 | resolve(nil); 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-firebase-react-native", 3 | "title": "Rudder Integration Firebase React Native", 4 | "version": "2.0.0", 5 | "description": "Rudder React Native SDK Firebase Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "firebase" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "codegenConfig": { 24 | "name": "RNRudderFirebaseIntegrationModuleSpec", 25 | "type": "modules", 26 | "jsSrcsDir": "src" 27 | }, 28 | "react-native": "./src/index.ts", 29 | "peerDependencies": { 30 | "react": ">= 16.8.0", 31 | "react-native": ">= 0.74.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/rudder-integration-firebase-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-firebase-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-firebase-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,m,mm,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-Firebase", "~> 3.6" 24 | s.dependency 'RNRudderSdk' 25 | 26 | install_modules_dependencies(s) 27 | end 28 | 29 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/src/NativeFirebaseBridge.ts: -------------------------------------------------------------------------------- 1 | import type { TurboModule } from 'react-native'; 2 | import { TurboModuleRegistry } from 'react-native'; 3 | 4 | export interface Spec extends TurboModule { 5 | setup(): Promise; 6 | } 7 | 8 | export default TurboModuleRegistry.getEnforcing('RNRudderFirebaseIntegrationModule'); 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import NativeFirebaseBridge from './NativeFirebaseBridge'; 2 | 3 | export default NativeFirebaseBridge; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/src/firebase.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import firebase from './firebase'; 2 | 3 | export default firebase; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-firebase-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-moengage-react-native@1.1.0...rudder-integration-moengage-react-native@1.2.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-moengage-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-moengage-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-moengage-react-native` 10 | 11 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-moengage-react-native` to your project. 12 | 13 | ## Usage 14 | 15 | ```javascript 16 | import RudderIntegrationAppcenterReactNative from '@rudderstack/rudder-integration-moengage-react-native'; 17 | ``` 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('MoEngage Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-moengage-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/src/main/java/com/rudderstack/integration/reactnative/moengage/RudderIntegrationMoengageReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.moengage; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RudderIntegrationMoengageReactNativePackage implements ReactPackage { 14 | @Override 15 | public List createNativeModules(ReactApplicationContext reactContext) { 16 | return Arrays.asList(new RudderIntegrationMoengageReactNativeModule(reactContext)); 17 | } 18 | 19 | @Override 20 | public List createViewManagers(ReactApplicationContext reactContext) { 21 | return Collections.emptyList(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-moengage-react-native/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/ios/RudderIntegrationMoengage.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/ios/RudderIntegrationMoengageReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationMoengageReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/ios/RudderIntegrationMoengageReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationMoengageReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_Moengage; 7 | #endif 8 | 9 | @implementation RudderIntegrationMoengageReactNative 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 14 | { 15 | [RNRudderAnalytics addIntegration:[RudderMoengageFactory instance]]; 16 | resolve(nil); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-moengage-react-native", 3 | "title": "Rudder Integration Moengage React Native", 4 | "version": "1.2.0", 5 | "description": "Rudder React Native SDK Moengage Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "moengage" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/rudder-integration-moengage-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-moengage-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-moengage-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | 21 | s.dependency "React" 22 | s.dependency "Rudder-Moengage" 23 | s.dependency 'RNRudderSdk' 24 | 25 | end 26 | 27 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationMoengageReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationMoengageReactNative) { 6 | throw new Error('Unable to import Rudder-Moengage native module'); 7 | } 8 | 9 | export default RudderIntegrationMoengageReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import moengage from './moengage'; 2 | 3 | export default moengage; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/src/moengage.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-moengage-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-integration-singular-react-native@1.1.0...rudder-integration-singular-react-native@1.2.0) (2025-04-29) 2 | 3 | ### Features 4 | 5 | - add React 19 support and resolve Snyk vulnerability ([#418](https://github.com/rudderlabs/rudder-sdk-react-native/issues/418)) ([793ae17](https://github.com/rudderlabs/rudder-sdk-react-native/commit/793ae17076d8f69404877eec07fea1b49c3ce304)) 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/README.md: -------------------------------------------------------------------------------- 1 | # rudder-integration-singular-react-native 2 | 3 | ## Getting started 4 | 5 | `$ npm install @rudderstack/rudder-integration-singular-react-native --save` 6 | 7 | ### Mostly automatic installation 8 | 9 | `$ react-native link rudder-integration-singular-react-native` 10 | 11 | Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-singular-react-native` to your project. 12 | 13 | ## Usage 14 | 15 | ```javascript 16 | import RudderIntegrationSingularReactNative from '@rudderstack/rudder-integration-singular-react-native'; 17 | ``` 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('Singular Integration Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 4 | 5 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 6 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 7 | 8 | ``` 9 | ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle 10 | sdk.dir=/Users/{username}/Library/Android/sdk 11 | ``` 12 | 13 | 3. Delete the `maven` folder 14 | 4. Run `./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-singular-react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/src/main/java/com/rudderstack/integration/reactnative/singular/RudderIntegrationSingularReactNativePackage.java: -------------------------------------------------------------------------------- 1 | package com.rudderstack.integration.reactnative.singular; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RudderIntegrationSingularReactNativePackage implements ReactPackage { 14 | @Override 15 | public List createNativeModules(ReactApplicationContext reactContext) { 16 | return Arrays.asList(new RudderIntegrationSingularReactNativeModule(reactContext)); 17 | } 18 | 19 | @Override 20 | public List createViewManagers(ReactApplicationContext reactContext) { 21 | return Collections.emptyList(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-react-native/222bd2abf1f1cdbb3e9d5554a8a19c4ad11e8867/libs/rudder-integration-singular-react-native/android/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/android/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 26 19:00:03 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/ios/RudderIntegrationSingular.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/ios/RudderIntegrationSingularReactNative.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RudderIntegrationSingularReactNative : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/ios/RudderIntegrationSingularReactNative.m: -------------------------------------------------------------------------------- 1 | #import "RudderIntegrationSingularReactNative.h" 2 | #import 3 | #if __has_include() 4 | #import 5 | #else 6 | @import Rudder_Singular; 7 | #endif 8 | 9 | @implementation RudderIntegrationSingularReactNative 10 | 11 | RCT_EXPORT_MODULE() 12 | 13 | RCT_EXPORT_METHOD(setup:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 14 | { 15 | [RNRudderAnalytics addIntegration:[RudderSingularFactory instance]]; 16 | resolve(nil); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-integration-singular-react-native", 3 | "title": "Rudder Integration Singular React Native", 4 | "version": "1.2.0", 5 | "description": "Rudder React Native SDK Singular Device mode support for Android and iOS", 6 | "keywords": [ 7 | "react-native", 8 | "rudder", 9 | "singular" 10 | ], 11 | "author": { 12 | "name": "RudderStack" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 18 | }, 19 | "bugs": { 20 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 23 | "peerDependencies": { 24 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", 25 | "react-native": ">= 0.41.2 < 0.80.0 || ^0.0.0-0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/rudder-integration-singular-react-native.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "rudder-integration-singular-react-native" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | rudder-integration-singular-react-native 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.authors = { "RudderStack" => "sdk@rudderstack.com" } 15 | s.platforms = { :ios => "9.0" } 16 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 17 | 18 | s.source_files = "ios/**/*.{h,c,m,swift}" 19 | s.requires_arc = true 20 | s.static_framework = true 21 | 22 | s.dependency "React" 23 | s.dependency "Rudder-Singular" 24 | s.dependency 'RNRudderSdk' 25 | 26 | end 27 | 28 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/src/bridge.ts: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { RudderIntegrationSingularReactNative } = NativeModules; 4 | 5 | if (!RudderIntegrationSingularReactNative) { 6 | throw new Error('Unable to import Rudder-Singular native module'); 7 | } 8 | 9 | export default RudderIntegrationSingularReactNative; 10 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | import singular from './singular'; 2 | 3 | export default singular; 4 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/src/singular.ts: -------------------------------------------------------------------------------- 1 | import bridge from './bridge'; 2 | 3 | // Setup the integration 4 | async function setup() { 5 | await bridge.setup(); 6 | } 7 | 8 | export default setup; 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true 12 | }, 13 | "files": [], 14 | "include": [], 15 | "references": [ 16 | { 17 | "path": "./tsconfig.lib.json" 18 | }, 19 | { 20 | "path": "./tsconfig.spec.json" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/rudder-integration-singular-react-native/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/sdk/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": { 8 | "@typescript-eslint/ban-ts-comment": "off" 9 | } 10 | }, 11 | { 12 | "files": ["*.ts", "*.tsx"], 13 | "rules": {} 14 | }, 15 | { 16 | "files": ["*.js", "*.jsx"], 17 | "rules": {} 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /libs/sdk/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [3.0.0](https://github.com/rudderlabs/rudder-sdk-react-native/compare/rudder-sdk-react-native@2.1.0...rudder-sdk-react-native@3.0.0) (2025-06-05) 2 | 3 | ### ⚠ BREAKING CHANGES 4 | 5 | - **sdk:** update peerDependencies for react and react-native versions (#451) 6 | - add support for new architecture (#446) 7 | 8 | ### Features 9 | 10 | - add support for new architecture ([#446](https://github.com/rudderlabs/rudder-sdk-react-native/issues/446)) ([17f381f](https://github.com/rudderlabs/rudder-sdk-react-native/commit/17f381f161f16549815c955bae85d8a10da6d130)), closes [#448](https://github.com/rudderlabs/rudder-sdk-react-native/issues/448) 11 | - **sdk:** update peerDependencies for react and react-native versions ([#451](https://github.com/rudderlabs/rudder-sdk-react-native/issues/451)) ([2a6f55d](https://github.com/rudderlabs/rudder-sdk-react-native/commit/2a6f55de4d9e3bc2c99410b26774d1d01ca88d31)) 12 | -------------------------------------------------------------------------------- /libs/sdk/RNRudderSdk.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "RNRudderSdk" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | RNRudderSdk 11 | DESC 12 | s.homepage = "https://rudderstack.com/" 13 | s.license = "MIT" 14 | s.author = { "RudderStack" => "sdk@rudderstack.com" } 15 | 16 | s.platforms = { :ios => "7.0" } 17 | s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-react-native.git", :tag => "master" } 18 | 19 | s.source_files = "ios/**/*.{h,m,mm,cpp}" 20 | s.private_header_files = "ios/**/*.h" 21 | 22 | s.ios.deployment_target = '12.0' 23 | s.tvos.deployment_target = '11.0' 24 | 25 | s.dependency "Rudder", '>= 1.31.0', '< 2.0.0' 26 | 27 | install_modules_dependencies(s) 28 | end 29 | -------------------------------------------------------------------------------- /libs/sdk/__tests__/Dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe('SDK Package', () => { 2 | it('should have test configs', () => { 3 | expect(true).toBeTruthy(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /libs/sdk/android/gradle.properties: -------------------------------------------------------------------------------- 1 | RNRudderSdkModule_kotlinVersion=2.0.21 2 | RNRudderSdkModule_minSdkVersion=19 3 | RNRudderSdkModule_targetSdkVersion=34 4 | RNRudderSdkModule_compileSdkVersion=35 5 | RNRudderSdkModule_ndkVersion=27.1.12297006 6 | -------------------------------------------------------------------------------- /libs/sdk/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /libs/sdk/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nrwl/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "entry" 8 | } 9 | ] 10 | ], 11 | "plugins": [], 12 | "env": { 13 | "test": { 14 | "presets": ["module:@react-native/babel-preset"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNApplicationLifeCycleManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNApplicationLifeCycleManager.h 3 | // Pods 4 | // 5 | // Created by Abhishek Pandey on 20/07/23. 6 | // 7 | 8 | #ifndef RNApplicationLifeCycleManager_h 9 | #define RNApplicationLifeCycleManager_h 10 | 11 | #import 12 | #import "RNPreferenceManager.h" 13 | #import "RNBackGroundModeManager.h" 14 | #import "RSUtils.h" 15 | #import "RNParamsConfigurator.h" 16 | #import "RNUserSessionPlugin.h" 17 | 18 | @interface RNApplicationLifeCycleManager : NSObject { 19 | RNPreferenceManager* preferenceManager; 20 | RNBackGroundModeManager* backGroundModeManager; 21 | BOOL trackLifecycleEvents; 22 | BOOL firstForeGround; 23 | RNUserSessionPlugin *session; 24 | } 25 | 26 | - (instancetype)initWithTrackLifecycleEvents:(BOOL)trackLifecycleEvents andBackGroundModeManager:(RNBackGroundModeManager *)backGroundModeManager withLaunchOptions:(id)launchOptions withSessionPlugin:(RNUserSessionPlugin *)session; 27 | - (void) trackApplicationLifeCycle; 28 | - (void) prepareScreenRecorder; 29 | 30 | @end 31 | 32 | 33 | 34 | #endif /* RNApplicationLifeCycleManager_h */ 35 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNBackGroundModeManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNBackGroundModeManager.h 3 | // Pods 4 | // 5 | // Created by Abhishek Pandey on 20/07/23. 6 | // 7 | 8 | #ifndef RNBackGroundModeManager_h 9 | #define RNBackGroundModeManager_h 10 | 11 | #import 12 | #import "RSLogger.h" 13 | 14 | @interface RNBackGroundModeManager : NSObject { 15 | BOOL enableBackgroundMode; 16 | BOOL isSemaphoreReleased; 17 | #if !TARGET_OS_WATCH 18 | UIBackgroundTaskIdentifier backgroundTask; 19 | #else 20 | dispatch_semaphore_t semaphore; 21 | #endif 22 | 23 | } 24 | 25 | - (instancetype)initWithEnableBackgroundMode:(BOOL) enableBackgroundMode; 26 | - (void) registerForBackGroundMode; 27 | 28 | @end 29 | 30 | #endif /* RNBackGroundModeManager_h */ 31 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNParamsConfigurator.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNParamsConfigurator.h 3 | // Pods 4 | // 5 | // Created by Abhishek Pandey on 02/08/23. 6 | // 7 | 8 | #ifndef RNParamsConfigurator_h 9 | #define RNParamsConfigurator_h 10 | #import "RSConfigBuilder.h" 11 | 12 | @interface RNParamsConfigurator : NSObject { 13 | NSDictionary *config; 14 | RSDBEncryption *dbEncryption; 15 | } 16 | 17 | @property (nonatomic, assign) BOOL trackLifeCycleEvents; 18 | @property (nonatomic, assign) BOOL recordScreenViews; 19 | @property (nonatomic, assign) long sessionTimeout; 20 | @property (nonatomic, assign) BOOL autoSessionTracking; 21 | @property (nonatomic, assign) BOOL enableBackgroundMode; 22 | @property (nonatomic, strong) NSString* writeKey; 23 | 24 | - (instancetype) initWithConfig:(NSDictionary*)config; 25 | -(RSConfigBuilder*) handleConfig; 26 | 27 | @end 28 | 29 | 30 | #endif /* RNParamsConfigurator_h */ 31 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNRudderAnalytics.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNRudderAnalytics.h 3 | // CocoaAsyncSocket 4 | // 5 | // Created by Dhawal on 28/07/20. 6 | // 7 | 8 | #import 9 | #import "RSIntegrationFactory.h" 10 | #import "RSConfig.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | 15 | @interface RNRudderAnalytics : NSObject 16 | 17 | + (void) addIntegration:(id) integration; 18 | + (RSConfig*) buildWithIntegrations:(RSConfigBuilder*)builder; 19 | + (void) setDBEncryption:(RSDBEncryption *)dbEncryption; 20 | + (RSDBEncryption *_Nullable) getDBEncryption; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNRudderAnalytics.m: -------------------------------------------------------------------------------- 1 | // 2 | // RNRudderAnalytics.m 3 | // CocoaAsyncSocket 4 | // 5 | // Created by Dhawal on 28/07/20. 6 | // 7 | 8 | #import "RNRudderAnalytics.h" 9 | 10 | NSMutableArray* integrationList; 11 | static RSDBEncryption* rsDBEncryption = nil; 12 | 13 | @implementation RNRudderAnalytics 14 | 15 | 16 | + (void) addIntegration:(id)integration { 17 | if (integrationList == nil) { 18 | integrationList = [[NSMutableArray alloc] init]; 19 | } 20 | [integrationList addObject:integration]; 21 | } 22 | 23 | + (RSConfig*) buildWithIntegrations:(RSConfigBuilder*)builder { 24 | if (integrationList != nil) { 25 | for (id integration in integrationList) { 26 | [builder withFactory:integration]; 27 | } 28 | } 29 | return [builder build]; 30 | } 31 | 32 | + (void) setDBEncryption:(RSDBEncryption *)dbEncryption { 33 | rsDBEncryption = dbEncryption; 34 | } 35 | 36 | + (RSDBEncryption *_Nullable) getDBEncryption { 37 | return rsDBEncryption; 38 | } 39 | @end 40 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNRudderSdkModule.h: -------------------------------------------------------------------------------- 1 | #import "RNRudderSdkModuleImpl.h" 2 | 3 | // Thanks to this guard, we won't import this header when we build for the old architecture. 4 | #ifdef RCT_NEW_ARCH_ENABLED 5 | 6 | // New Architecture 7 | #import "RNRudderSdkModuleSpec/RNRudderSdkModuleSpec.h" 8 | @interface RNRudderSdkModule : NSObject { 9 | 10 | #else 11 | 12 | // Legacy Architecture 13 | #if __has_include("RCTBridgeModule.h") 14 | #import "RCTBridgeModule.h" 15 | #else 16 | #import 17 | #endif 18 | 19 | @interface RNRudderSdkModule : NSObject { 20 | 21 | #endif 22 | 23 | RNRudderSdkModuleImpl *moduleImpl; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNSessionTrackingParams.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNSessionTrackingParams.h 3 | // Pods 4 | // 5 | // Created by Abhishek Pandey on 03/08/23. 6 | // 7 | 8 | #ifndef RNSessionTrackingParams_h 9 | #define RNSessionTrackingParams_h 10 | #import "RNPreferenceManager.h" 11 | #import "RSUtils.h" 12 | 13 | @interface RNSessionTrackingParams : NSObject { 14 | BOOL isAutomaticSessionTrackingStatus; 15 | BOOL isManualSessionTrackingStatus; 16 | RNPreferenceManager *preferenceManager; 17 | } 18 | 19 | @property (nonatomic, strong) NSNumber *lastEventTimeStamp; 20 | 21 | -(void)refreshSessionTrackingParams; 22 | -(BOOL)isAutomaticSessionActive; 23 | -(BOOL)wasManualSessionActive; 24 | -(BOOL)wasSessionTrackingDisabled; 25 | -(void)saveEventTimestamp; 26 | -(void)enableSessionParams:(BOOL)automatic manual:(BOOL)manual; 27 | 28 | @end 29 | 30 | #endif /* RNSessionTrackingParams_h */ 31 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNUIViewController+RNScreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNUIViewController+RNScreen.h 3 | // RNRudderSdk 4 | // 5 | // Created by Abhishek Pandey on 07/08/23. 6 | // 7 | 8 | #ifndef UIViewController_RNScreen_h 9 | #define UIViewController_RNScreen_h 10 | #import "RNUserSessionPlugin.h" 11 | 12 | #if TARGET_OS_IOS || TARGET_OS_TV 13 | 14 | #import 15 | 16 | @interface UIViewController (RNScreen) 17 | 18 | +(void)initSessionPlugin:(RNUserSessionPlugin *)sessionPlugin; 19 | +(void) rudder_rn_swizzleView; 20 | 21 | @end 22 | 23 | #endif 24 | 25 | #endif /* RNUIViewController_RNScreen_h */ 26 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNUserSessionPlugin.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNUserSessionPlugin.h 3 | // Pods 4 | // 5 | // Created by Abhishek Pandey on 03/08/23. 6 | // 7 | 8 | #ifndef RNUserSessionPlugin_h 9 | #define RNUserSessionPlugin_h 10 | #import "RSClient.h" 11 | #import "RNSessionTrackingParams.h" 12 | #import "RSLogger.h" 13 | #import "RSUtils.h" 14 | 15 | @interface RNUserSessionPlugin : NSObject { 16 | long sessionTimeout; 17 | RSClient *rudderClient; 18 | RNSessionTrackingParams *sessionParams; 19 | BOOL isAutomaticSessionTrackingEnabled; 20 | } 21 | 22 | -(instancetype)initWithAutomaticSessionTrackingStatus:(BOOL)automaticSessionTrackingStatus withLifecycleEventsTrackingStatus:(BOOL)lifecycleEventsTrackingStatus withSessionTimeout:(long)sessionTimeou; 23 | 24 | -(void)handleSessionTracking; 25 | -(void)startNewSessionIfCurrentIsExpired; 26 | -(void)saveEventTimestamp; 27 | -(void)startSession; 28 | -(void)startSession:(long)sessionId; 29 | -(void)endSession; 30 | -(NSNumber *_Nullable)getSessionId; 31 | -(void)enableManualSessionParams; 32 | 33 | @end 34 | 35 | #endif /* RNUserSessionPlugin_h */ 36 | -------------------------------------------------------------------------------- /libs/sdk/ios/RNWKInterfaceController+RNScreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // RNWKInterfaceController+RNScreen.h 3 | // RNRudderSdk 4 | // 5 | // Created by Abhishek Pandey on 07/08/23. 6 | // 7 | 8 | #ifndef RNWKInterfaceController_RNScreen_h 9 | #define RNWKInterfaceController_RNScreen_h 10 | 11 | #import "RNUserSessionPlugin.h" 12 | #include 13 | #if TARGET_OS_WATCH 14 | #import 15 | 16 | @interface WKInterfaceController (RNScreen) 17 | 18 | +(void)initSessionPlugin:(RNUserSessionPlugin *)sessionPlugin; 19 | + (void) rudder_rn_swizzleView; 20 | 21 | @end 22 | #endif 23 | 24 | #endif /* RNWKInterfaceController_RNScreen_h */ 25 | -------------------------------------------------------------------------------- /libs/sdk/jest.config.ts: -------------------------------------------------------------------------------- 1 | const libName = 'sdk'; 2 | 3 | module.exports = { 4 | displayName: libName, 5 | preset: 'react-native', 6 | resolver: '@nrwl/jest/plugins/resolver', 7 | moduleFileExtensions: ['ts', 'js', 'html', 'tsx', 'jsx'], 8 | setupFilesAfterEnv: ['/test-setup.ts'], 9 | moduleNameMapper: { 10 | '.svg': '@nrwl/react-native/plugins/jest/svg-mock', 11 | '.png': '@nrwl/react-native/plugins/jest/svg-mock', 12 | }, 13 | collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/*.test.{ts,tsx}', '!**/test/*.{ts,tsx}'], 14 | coverageReporters: ['json', 'text', ['lcov', { projectRoot: '/' }], 'clover'], 15 | coverageThreshold: { 16 | global: { 17 | branches: 0, 18 | functions: 0, 19 | lines: 0, 20 | statements: 0, 21 | }, 22 | }, 23 | reporters: [ 24 | 'default', 25 | [ 26 | 'jest-sonar', 27 | { 28 | outputDirectory: 'reports/sonar', 29 | outputName: 'results-report-' + libName + '.xml', 30 | reportedFilePath: 'relative', 31 | relativeRootDir: './', 32 | }, 33 | ], 34 | ], 35 | cacheDirectory: '/node_modules/.cache/unit-tests', 36 | }; 37 | -------------------------------------------------------------------------------- /libs/sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rudderstack/rudder-sdk-react-native", 3 | "version": "3.0.0", 4 | "description": "Rudder React Native SDK", 5 | "keywords": [ 6 | "react-native", 7 | "rudder" 8 | ], 9 | "author": { 10 | "name": "RudderStack" 11 | }, 12 | "license": "MIT", 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/rudderlabs/rudder-sdk-react-native.git" 16 | }, 17 | "bugs": { 18 | "url": "https://github.com/rudderlabs/rudder-sdk-react-native/issues" 19 | }, 20 | "homepage": "https://github.com/rudderlabs/rudder-sdk-react-native#readme", 21 | "peerDependencies": { 22 | "react": ">= 16.8.0", 23 | "react-native": ">= 0.74.0" 24 | }, 25 | "codegenConfig": { 26 | "name": "RNRudderSdkModuleSpec", 27 | "type": "modules", 28 | "jsSrcsDir": "src" 29 | }, 30 | "react-native": "./src/index.ts", 31 | "dependencies": { 32 | "async-lock": "1.4.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /libs/sdk/src/Constants.ts: -------------------------------------------------------------------------------- 1 | import { RUDDER_LOG_LEVEL } from './Logger'; 2 | 3 | export const DATA_PLANE_URL = 'https://hosted.rudderlabs.com'; 4 | export const CONTROL_PLANE_URL = 'https://api.rudderlabs.com'; 5 | export const FLUSH_QUEUE_SIZE = 30; 6 | export const DB_COUNT_THRESHOLD = 10000; 7 | export const SLEEP_TIMEOUT = 10; 8 | export const CONFIG_REFRESH_INTERVAL = 2; 9 | export const AUTO_COLLECT_ADVERT_ID = false; 10 | export const TRACK_LIFECYCLE_EVENTS = true; 11 | export const RECORD_SCREEN_VIEWS = false; 12 | export const LOG_LEVEL = RUDDER_LOG_LEVEL.ERROR; 13 | export const SDK_VERSION = '3.0.0'; 14 | export const AUTO_SESSION_TRACKING = true; 15 | export const SESSION_TIMEOUT = 300000; 16 | export const ENABLE_BACKGROUND_MODE = false; 17 | export const COLLECT_DEVICE_ID = true; 18 | export const ENABLE_GZIP = true; 19 | -------------------------------------------------------------------------------- /libs/sdk/src/IDBEncryption.ts: -------------------------------------------------------------------------------- 1 | interface IDBEncryption { 2 | key: string; 3 | enable: boolean; 4 | addDBEncryptionPlugin(key: string, enable: boolean): Promise; 5 | } 6 | 7 | export default IDBEncryption; 8 | -------------------------------------------------------------------------------- /libs/sdk/src/IRudderContext.ts: -------------------------------------------------------------------------------- 1 | interface IRudderContext { 2 | userAgent: string; 3 | screen: { 4 | width: number; 5 | height: number; 6 | density: number; 7 | }; 8 | timezone: string; 9 | os: { 10 | version: string; 11 | name: string; 12 | }; 13 | traits: Record; 14 | network: { 15 | wifi: boolean; 16 | cellular: boolean; 17 | carrier: string; 18 | bluetooth: boolean; 19 | }; 20 | locale: string; 21 | device: { 22 | id: string; 23 | type: string; 24 | name: string; 25 | manufacturer: string; 26 | model: string; 27 | advertisingId: string; 28 | adTrackingEnabled: boolean; 29 | token: string; 30 | }; 31 | library: { 32 | version: string; 33 | name: string; 34 | }; 35 | app: { 36 | namespace: string; 37 | version: string; 38 | name: string; 39 | build: string; 40 | }; 41 | externalId: Array>; 42 | customContextMap: Record; 43 | } 44 | 45 | export default IRudderContext; 46 | -------------------------------------------------------------------------------- /libs/sdk/src/Logger.ts: -------------------------------------------------------------------------------- 1 | const VERBOSE = 5; 2 | const DEBUG = 4; 3 | const INFO = 3; 4 | const WARN = 2; 5 | const ERROR = 1; 6 | const NONE = 0; 7 | 8 | let _logLevel = ERROR; 9 | export const logInit = (logLevel: number) => { 10 | _logLevel = logLevel; 11 | }; 12 | 13 | export const logVerbose = (message: string) => { 14 | if (_logLevel >= VERBOSE) { 15 | console.log(`RudderSDK: Verbose: ${message}`); 16 | } 17 | }; 18 | 19 | export const logDebug = (message: string) => { 20 | if (_logLevel >= DEBUG) { 21 | console.log(`RudderSDK: Debug: ${message}`); 22 | } 23 | }; 24 | 25 | export const logInfo = (message: string) => { 26 | if (_logLevel >= INFO) { 27 | console.log(`RudderSDK: Info: ${message}`); 28 | } 29 | }; 30 | 31 | export const logWarn = (message: string) => { 32 | if (_logLevel >= WARN) { 33 | console.log(`RudderSDK: Warn: ${message}`); 34 | } 35 | }; 36 | 37 | export const logError = (message: string) => { 38 | if (_logLevel >= ERROR) { 39 | console.log(`RudderSDK: Error: ${message}`); 40 | } 41 | }; 42 | export const RUDDER_LOG_LEVEL = { 43 | NONE, 44 | ERROR, 45 | WARN, 46 | INFO, 47 | DEBUG, 48 | VERBOSE, 49 | }; 50 | -------------------------------------------------------------------------------- /libs/sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | import rudderClient from './RudderClient'; 2 | import { RUDDER_LOG_LEVEL } from './Logger'; 3 | import IDBEncryption from './IDBEncryption'; 4 | import IRudderContext from './IRudderContext'; 5 | 6 | export { RUDDER_LOG_LEVEL, IDBEncryption, IRudderContext }; 7 | export default rudderClient; 8 | -------------------------------------------------------------------------------- /libs/sdk/test-setup.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-native/extend-expect'; 2 | -------------------------------------------------------------------------------- /libs/sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "allowJs": true, 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "noImplicitAny": true, 13 | "declaration": true 14 | }, 15 | "files": [], 16 | "include": [], 17 | "references": [ 18 | { 19 | "path": "./tsconfig.lib.json" 20 | }, 21 | { 22 | "path": "./tsconfig.spec.json" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /libs/sdk/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["node"] 5 | }, 6 | "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"], 7 | "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] 8 | } 9 | -------------------------------------------------------------------------------- /libs/sdk/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "**/*.test.ts", 11 | "**/*.spec.ts", 12 | "**/*.test.tsx", 13 | "**/*.spec.tsx", 14 | "**/*.test.js", 15 | "**/*.spec.js", 16 | "**/*.test.jsx", 17 | "**/*.spec.jsx", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /scripts/update-rn-sdk-version-in-constants-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Read the version from package.json and store it in a variable 4 | latest_version=$(jq -r '.version' libs/sdk/package.json) 5 | 6 | # Set the path to the Constant.ts file 7 | file_path="./libs/sdk/src/Constants.ts" 8 | 9 | # Replace the SDK_VERSION with the previous version 10 | # For Mac 11 | # sed -i '' -e "s/const SDK_VERSION = '.*';/const SDK_VERSION = '$latest_version';/" "$file_path" 12 | # For Linux 13 | sed -i "s/const SDK_VERSION = '.*';/const SDK_VERSION = '$latest_version';/" "$file_path" 14 | -------------------------------------------------------------------------------- /tools/tsconfig.tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc/tools", 5 | "rootDir": ".", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": ["node"], 9 | "importHelpers": false 10 | }, 11 | "include": ["**/*.ts"] 12 | } 13 | --------------------------------------------------------------------------------