@capillarytech/react-native-hydra-lib 1.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +252 -0
- package/DEPRECATION_POLICY.md +220 -0
- package/LICENSE +20 -0
- package/MIGRATION.md +361 -0
- package/README.md +491 -0
- package/RELEASE_NOTES.md +528 -0
- package/android/build.gradle +565 -0
- package/android/generated/java/com/hydralib/NativeHydraLibSpec.java +185 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNHydraLibSpec-generated.cpp +248 -0
- package/android/generated/jni/RNHydraLibSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ComponentDescriptors.cpp +24 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ComponentDescriptors.h +26 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/EventEmitters.cpp +18 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/EventEmitters.h +37 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/Props.cpp +39 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/Props.h +47 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/RNHydraLibSpecJSI-generated.cpp +283 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/RNHydraLibSpecJSI.h +395 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ShadowNodes.cpp +19 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/ShadowNodes.h +54 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNHydraLibSpec/States.h +53 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/AndroidManifestNew.xml +16 -0
- package/android/src/main/AndroidManifestNoFirebaseIcon.xml +5 -0
- package/android/src/main/java/com/hydralib/delegates/HydraActivityCallbacks.kt +90 -0
- package/android/src/main/java/com/hydralib/delegates/NonHydraNotificationActivity.kt +43 -0
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventEmitter.kt +150 -0
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventType.kt +44 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationBannerViewManager.kt +121 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationEmbedViewManager.kt +153 -0
- package/android/src/main/java/com/hydralib/gamification/GamificationLoyaltyViewManager.kt +95 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraCore.kt +860 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraExtenstions.kt +331 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInAppMessages.kt +136 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInbox.kt +70 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraInboxUI.kt +54 -0
- package/android/src/main/java/com/hydralib/hydrasdk/HydraPushNotification.kt +299 -0
- package/android/src/main/java/com/hydralib/nativeapis/Hydra.kt +28 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraFirebaseRemoteConfigKeys.kt +76 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraInitializer.kt +130 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraNativeMessaging.kt +18 -0
- package/android/src/main/java/com/hydralib/nativeapis/HydraRemoteConfig.kt +59 -0
- package/android/src/main/java/com/hydralib/utils/RNHydraPreferencesManager.kt +154 -0
- package/android/src/main/java/com/hydralib/utils/ResourceUtil.kt +10 -0
- package/android/src/newarch/HydraLibModule.kt +218 -0
- package/android/src/oldarch/HydraLibModule.kt +258 -0
- package/android/src/rn72OrLess/HydraLibPackage.kt +43 -0
- package/android/src/rn73OrMore/HydraLibPackage.kt +53 -0
- package/ios/Delegates/HydraApplicationDelegate.swift +196 -0
- package/ios/Delegates/HydraFirebaseMessagingDelegate.swift +20 -0
- package/ios/Delegates/HydraUNUserNotificationCenterDelegate.swift +26 -0
- package/ios/EventEmitter/HydraEventEmitter.swift +98 -0
- package/ios/EventEmitter/HydraEventType.swift +28 -0
- package/ios/EventEmitter/HydraNativeEmitterBrigde.h +15 -0
- package/ios/EventEmitter/HydraNativeEmitterBrigde.mm +48 -0
- package/ios/GamificationViews/GamificationBannerViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationBannerViewComponentView.mm +125 -0
- package/ios/GamificationViews/GamificationEmbedViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationEmbedViewComponentView.mm +131 -0
- package/ios/GamificationViews/GamificationLoyaltyViewComponentView.h +14 -0
- package/ios/GamificationViews/GamificationLoyaltyViewComponentView.mm +120 -0
- package/ios/HydraLib.h +16 -0
- package/ios/HydraLib.mm +207 -0
- package/ios/HydraSDK/HydraInAppMessages.swift +93 -0
- package/ios/HydraSDK/HydraInbox.swift +97 -0
- package/ios/HydraSDK/HydraInboxUI.swift +105 -0
- package/ios/HydraSDK/HydraPushNotification.swift +476 -0
- package/ios/HydraSDK/HydraSDKCore.swift +707 -0
- package/ios/NativeAPIs/Hydra.h +34 -0
- package/ios/NativeAPIs/Hydra.mm +47 -0
- package/ios/NativeAPIs/HydraNativeFirebaseRemoteConfigKeys.h +23 -0
- package/ios/NativeAPIs/HydraNativeFirebaseRemoteConfigKeys.mm +80 -0
- package/ios/NativeAPIs/HydraNativeInitializer.h +16 -0
- package/ios/NativeAPIs/HydraNativeInitializer.mm +39 -0
- package/ios/NativeAPIs/HydraNativeMessaging.h +24 -0
- package/ios/NativeAPIs/HydraNativeMessaging.mm +53 -0
- package/ios/NativeAPIs/HydraNativeRemoteConfig.h +27 -0
- package/ios/NativeAPIs/HydraNativeRemoteConfig.mm +89 -0
- package/ios/Utils/HydraExtensions.swift +322 -0
- package/ios/Utils/HydraRNConstants.swift +13 -0
- package/ios/Utils/RNHydraLogger.swift +31 -0
- package/ios/generated/RNHydraLibSpec/ComponentDescriptors.cpp +24 -0
- package/ios/generated/RNHydraLibSpec/ComponentDescriptors.h +26 -0
- package/ios/generated/RNHydraLibSpec/EventEmitters.cpp +18 -0
- package/ios/generated/RNHydraLibSpec/EventEmitters.h +37 -0
- package/ios/generated/RNHydraLibSpec/Props.cpp +39 -0
- package/ios/generated/RNHydraLibSpec/Props.h +47 -0
- package/ios/generated/RNHydraLibSpec/RCTComponentViewHelpers.h +28 -0
- package/ios/generated/RNHydraLibSpec/RNHydraLibSpec-generated.mm +291 -0
- package/ios/generated/RNHydraLibSpec/RNHydraLibSpec.h +167 -0
- package/ios/generated/RNHydraLibSpec/ShadowNodes.cpp +19 -0
- package/ios/generated/RNHydraLibSpec/ShadowNodes.h +54 -0
- package/ios/generated/RNHydraLibSpec/States.cpp +16 -0
- package/ios/generated/RNHydraLibSpec/States.h +53 -0
- package/ios/generated/RNHydraLibSpecJSI-generated.cpp +283 -0
- package/ios/generated/RNHydraLibSpecJSI.h +395 -0
- package/lib/commonjs/GamificationBannerViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationBannerViewNativeComponent.js.map +1 -0
- package/lib/commonjs/GamificationEmbedViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationEmbedViewNativeComponent.js.map +1 -0
- package/lib/commonjs/GamificationLoyaltyViewNativeComponent.js +10 -0
- package/lib/commonjs/GamificationLoyaltyViewNativeComponent.js.map +1 -0
- package/lib/commonjs/NativeHydraLib.js +11 -0
- package/lib/commonjs/NativeHydraLib.js.map +1 -0
- package/lib/commonjs/components/GamificationBannerView.js +15 -0
- package/lib/commonjs/components/GamificationBannerView.js.map +1 -0
- package/lib/commonjs/components/GamificationEmbedView.js +15 -0
- package/lib/commonjs/components/GamificationEmbedView.js.map +1 -0
- package/lib/commonjs/components/GamificationLoyaltyView.js +15 -0
- package/lib/commonjs/components/GamificationLoyaltyView.js.map +1 -0
- package/lib/commonjs/hydra-apis/Hydra.js +43 -0
- package/lib/commonjs/hydra-apis/Hydra.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraCore.js +42 -0
- package/lib/commonjs/hydra-apis/HydraCore.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInAppMessaging.js +24 -0
- package/lib/commonjs/hydra-apis/HydraInAppMessaging.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInbox.js +29 -0
- package/lib/commonjs/hydra-apis/HydraInbox.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraInboxUI.js +18 -0
- package/lib/commonjs/hydra-apis/HydraInboxUI.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js +133 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js.map +1 -0
- package/lib/commonjs/hydra-apis/HydraPushNotification.js +21 -0
- package/lib/commonjs/hydra-apis/HydraPushNotification.js.map +1 -0
- package/lib/commonjs/index.js +230 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/models/HydraAccountConfig.js +41 -0
- package/lib/commonjs/models/HydraAccountConfig.js.map +1 -0
- package/lib/commonjs/models/HydraFirebaseRemoteConfigKeys.js +40 -0
- package/lib/commonjs/models/HydraFirebaseRemoteConfigKeys.js.map +1 -0
- package/lib/commonjs/models/HydraGeoConfig.js +24 -0
- package/lib/commonjs/models/HydraGeoConfig.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppButtonComponent.js +26 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppButtonComponent.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppComponentStyle.js +26 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppComponentStyle.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js +39 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppMessage.js +60 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppMessage.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTemplateType.js +66 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTemplateType.js.map +1 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTextComponent.js +21 -0
- package/lib/commonjs/models/HydraInAppMessage/HydraInAppTextComponent.js.map +1 -0
- package/lib/commonjs/models/HydraLogLevel.js +16 -0
- package/lib/commonjs/models/HydraLogLevel.js.map +1 -0
- package/lib/commonjs/models/HydraNativeEvent.js +27 -0
- package/lib/commonjs/models/HydraNativeEvent.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotification.js +70 -0
- package/lib/commonjs/models/HydraNotification/HydraNotification.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationBody.js +25 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationBody.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCta.js +23 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCta.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCtaType.js +62 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationCtaType.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationExpandedDetails.js +25 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationExpandedDetails.js.map +1 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationGateway.js +13 -0
- package/lib/commonjs/models/HydraNotification/HydraNotificationGateway.js.map +1 -0
- package/lib/commonjs/models/HydraPushPreferences.js +20 -0
- package/lib/commonjs/models/HydraPushPreferences.js.map +1 -0
- package/lib/commonjs/models/HydraUserDetails.js +26 -0
- package/lib/commonjs/models/HydraUserDetails.js.map +1 -0
- package/lib/commonjs/models/HydraVisitorInfo.js +19 -0
- package/lib/commonjs/models/HydraVisitorInfo.js.map +1 -0
- package/lib/commonjs/models/NonHydraNotification.js +18 -0
- package/lib/commonjs/models/NonHydraNotification.js.map +1 -0
- package/lib/commonjs/models/UserState.js +41 -0
- package/lib/commonjs/models/UserState.js.map +1 -0
- package/lib/module/GamificationBannerViewNativeComponent.js +5 -0
- package/lib/module/GamificationBannerViewNativeComponent.js.map +1 -0
- package/lib/module/GamificationEmbedViewNativeComponent.js +5 -0
- package/lib/module/GamificationEmbedViewNativeComponent.js.map +1 -0
- package/lib/module/GamificationLoyaltyViewNativeComponent.js +5 -0
- package/lib/module/GamificationLoyaltyViewNativeComponent.js.map +1 -0
- package/lib/module/NativeHydraLib.js +7 -0
- package/lib/module/NativeHydraLib.js.map +1 -0
- package/lib/module/components/GamificationBannerView.js +10 -0
- package/lib/module/components/GamificationBannerView.js.map +1 -0
- package/lib/module/components/GamificationEmbedView.js +10 -0
- package/lib/module/components/GamificationEmbedView.js.map +1 -0
- package/lib/module/components/GamificationLoyaltyView.js +10 -0
- package/lib/module/components/GamificationLoyaltyView.js.map +1 -0
- package/lib/module/hydra-apis/Hydra.js +37 -0
- package/lib/module/hydra-apis/Hydra.js.map +1 -0
- package/lib/module/hydra-apis/HydraCore.js +36 -0
- package/lib/module/hydra-apis/HydraCore.js.map +1 -0
- package/lib/module/hydra-apis/HydraInAppMessaging.js +18 -0
- package/lib/module/hydra-apis/HydraInAppMessaging.js.map +1 -0
- package/lib/module/hydra-apis/HydraInbox.js +23 -0
- package/lib/module/hydra-apis/HydraInbox.js.map +1 -0
- package/lib/module/hydra-apis/HydraInboxUI.js +12 -0
- package/lib/module/hydra-apis/HydraInboxUI.js.map +1 -0
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js +127 -0
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js.map +1 -0
- package/lib/module/hydra-apis/HydraPushNotification.js +15 -0
- package/lib/module/hydra-apis/HydraPushNotification.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/models/HydraAccountConfig.js +36 -0
- package/lib/module/models/HydraAccountConfig.js.map +1 -0
- package/lib/module/models/HydraFirebaseRemoteConfigKeys.js +35 -0
- package/lib/module/models/HydraFirebaseRemoteConfigKeys.js.map +1 -0
- package/lib/module/models/HydraGeoConfig.js +19 -0
- package/lib/module/models/HydraGeoConfig.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppButtonComponent.js +21 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppButtonComponent.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppComponentStyle.js +21 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppComponentStyle.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js +35 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppMessage.js +55 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppMessage.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTemplateType.js +62 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTemplateType.js.map +1 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTextComponent.js +16 -0
- package/lib/module/models/HydraInAppMessage/HydraInAppTextComponent.js.map +1 -0
- package/lib/module/models/HydraLogLevel.js +12 -0
- package/lib/module/models/HydraLogLevel.js.map +1 -0
- package/lib/module/models/HydraNativeEvent.js +23 -0
- package/lib/module/models/HydraNativeEvent.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotification.js +65 -0
- package/lib/module/models/HydraNotification/HydraNotification.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationBody.js +20 -0
- package/lib/module/models/HydraNotification/HydraNotificationBody.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationCta.js +18 -0
- package/lib/module/models/HydraNotification/HydraNotificationCta.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationCtaType.js +58 -0
- package/lib/module/models/HydraNotification/HydraNotificationCtaType.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationExpandedDetails.js +20 -0
- package/lib/module/models/HydraNotification/HydraNotificationExpandedDetails.js.map +1 -0
- package/lib/module/models/HydraNotification/HydraNotificationGateway.js +9 -0
- package/lib/module/models/HydraNotification/HydraNotificationGateway.js.map +1 -0
- package/lib/module/models/HydraPushPreferences.js +15 -0
- package/lib/module/models/HydraPushPreferences.js.map +1 -0
- package/lib/module/models/HydraUserDetails.js +21 -0
- package/lib/module/models/HydraUserDetails.js.map +1 -0
- package/lib/module/models/HydraVisitorInfo.js +14 -0
- package/lib/module/models/HydraVisitorInfo.js.map +1 -0
- package/lib/module/models/NonHydraNotification.js +13 -0
- package/lib/module/models/NonHydraNotification.js.map +1 -0
- package/lib/module/models/UserState.js +37 -0
- package/lib/module/models/UserState.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/GamificationBannerViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationBannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/GamificationEmbedViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationEmbedViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/GamificationLoyaltyViewNativeComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/GamificationLoyaltyViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeHydraLib.d.ts +46 -0
- package/lib/typescript/commonjs/src/NativeHydraLib.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationBannerView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationBannerView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationEmbedView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationEmbedView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/GamificationLoyaltyView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/GamificationLoyaltyView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/Hydra.d.ts +15 -0
- package/lib/typescript/commonjs/src/hydra-apis/Hydra.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraCore.d.ts +18 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraCore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInAppMessaging.d.ts +8 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInAppMessaging.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInbox.d.ts +9 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInboxUI.d.ts +5 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraInboxUI.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts +35 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraPushNotification.d.ts +6 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraPushNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +37 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraAccountConfig.d.ts +14 -0
- package/lib/typescript/commonjs/src/models/HydraAccountConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraFirebaseRemoteConfigKeys.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraFirebaseRemoteConfigKeys.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraGeoConfig.d.ts +14 -0
- package/lib/typescript/commonjs/src/models/HydraGeoConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts +16 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts +10 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppMessage.d.ts +29 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppMessage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts +15 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts +11 -0
- package/lib/typescript/commonjs/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraLogLevel.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/HydraLogLevel.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts +20 -0
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotification.d.ts +32 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationBody.d.ts +19 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationBody.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCta.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCta.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCtaType.d.ts +13 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationCtaType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts +19 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationGateway.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/HydraNotification/HydraNotificationGateway.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraPushPreferences.d.ts +10 -0
- package/lib/typescript/commonjs/src/models/HydraPushPreferences.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraUserDetails.d.ts +16 -0
- package/lib/typescript/commonjs/src/models/HydraUserDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/HydraVisitorInfo.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/HydraVisitorInfo.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/NonHydraNotification.d.ts +9 -0
- package/lib/typescript/commonjs/src/models/NonHydraNotification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/models/UserState.d.ts +11 -0
- package/lib/typescript/commonjs/src/models/UserState.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/GamificationBannerViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationBannerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/GamificationEmbedViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationEmbedViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/GamificationLoyaltyViewNativeComponent.d.ts +7 -0
- package/lib/typescript/module/src/GamificationLoyaltyViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeHydraLib.d.ts +46 -0
- package/lib/typescript/module/src/NativeHydraLib.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationBannerView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationBannerView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationEmbedView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationEmbedView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/GamificationLoyaltyView.d.ts +6 -0
- package/lib/typescript/module/src/components/GamificationLoyaltyView.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/Hydra.d.ts +15 -0
- package/lib/typescript/module/src/hydra-apis/Hydra.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraCore.d.ts +18 -0
- package/lib/typescript/module/src/hydra-apis/HydraCore.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInAppMessaging.d.ts +8 -0
- package/lib/typescript/module/src/hydra-apis/HydraInAppMessaging.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInbox.d.ts +9 -0
- package/lib/typescript/module/src/hydra-apis/HydraInbox.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraInboxUI.d.ts +5 -0
- package/lib/typescript/module/src/hydra-apis/HydraInboxUI.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts +35 -0
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraPushNotification.d.ts +6 -0
- package/lib/typescript/module/src/hydra-apis/HydraPushNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +37 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraAccountConfig.d.ts +14 -0
- package/lib/typescript/module/src/models/HydraAccountConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraFirebaseRemoteConfigKeys.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraFirebaseRemoteConfigKeys.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraGeoConfig.d.ts +14 -0
- package/lib/typescript/module/src/models/HydraGeoConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts +16 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppButtonComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts +10 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppComponentStyle.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts +9 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppMessage.d.ts +29 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppMessage.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts +15 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTemplateType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts +11 -0
- package/lib/typescript/module/src/models/HydraInAppMessage/HydraInAppTextComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraLogLevel.d.ts +9 -0
- package/lib/typescript/module/src/models/HydraLogLevel.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts +20 -0
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotification.d.ts +32 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationBody.d.ts +19 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationBody.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCta.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCta.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCtaType.d.ts +13 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationCtaType.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts +19 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationExpandedDetails.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationGateway.d.ts +6 -0
- package/lib/typescript/module/src/models/HydraNotification/HydraNotificationGateway.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraPushPreferences.d.ts +10 -0
- package/lib/typescript/module/src/models/HydraPushPreferences.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraUserDetails.d.ts +16 -0
- package/lib/typescript/module/src/models/HydraUserDetails.d.ts.map +1 -0
- package/lib/typescript/module/src/models/HydraVisitorInfo.d.ts +6 -0
- package/lib/typescript/module/src/models/HydraVisitorInfo.d.ts.map +1 -0
- package/lib/typescript/module/src/models/NonHydraNotification.d.ts +9 -0
- package/lib/typescript/module/src/models/NonHydraNotification.d.ts.map +1 -0
- package/lib/typescript/module/src/models/UserState.d.ts +11 -0
- package/lib/typescript/module/src/models/UserState.d.ts.map +1 -0
- package/package.json +225 -0
- package/react-native-hydra-lib.podspec +256 -0
- package/react-native.config.js +33 -0
- package/sbom.spdx.json +544 -0
- package/scripts/HydraPods.rb +151 -0
- package/scripts/generate-sbom.js +367 -0
- package/scripts/hydra-podspecs/HydraCore.podspec +13 -0
- package/scripts/hydra-podspecs/HydraInAppMessage.podspec +15 -0
- package/scripts/hydra-podspecs/HydraInboxCore.podspec +15 -0
- package/scripts/hydra-podspecs/HydraInboxUI.podspec +15 -0
- package/scripts/hydra-podspecs/HydraPushNotification.podspec +14 -0
- package/scripts/hydra-podspecs/HydraPushNotificationServiceExtension.podspec +15 -0
- package/src/GamificationBannerViewNativeComponent.ts +10 -0
- package/src/GamificationEmbedViewNativeComponent.ts +10 -0
- package/src/GamificationLoyaltyViewNativeComponent.ts +10 -0
- package/src/NativeHydraLib.ts +81 -0
- package/src/components/GamificationBannerView.tsx +10 -0
- package/src/components/GamificationEmbedView.tsx +10 -0
- package/src/components/GamificationLoyaltyView.tsx +10 -0
- package/src/hydra-apis/Hydra.ts +52 -0
- package/src/hydra-apis/HydraCore.ts +76 -0
- package/src/hydra-apis/HydraInAppMessaging.ts +25 -0
- package/src/hydra-apis/HydraInbox.ts +33 -0
- package/src/hydra-apis/HydraInboxUI.ts +10 -0
- package/src/hydra-apis/HydraNativeEventEmitter.ts +216 -0
- package/src/hydra-apis/HydraPushNotification.ts +15 -0
- package/src/index.tsx +71 -0
- package/src/models/HydraAccountConfig.ts +45 -0
- package/src/models/HydraFirebaseRemoteConfigKeys.ts +43 -0
- package/src/models/HydraGeoConfig.ts +27 -0
- package/src/models/HydraInAppMessage/HydraInAppButtonComponent.ts +27 -0
- package/src/models/HydraInAppMessage/HydraInAppComponentStyle.ts +24 -0
- package/src/models/HydraInAppMessage/HydraInAppFeedbackSelectionType.ts +35 -0
- package/src/models/HydraInAppMessage/HydraInAppMessage.ts +89 -0
- package/src/models/HydraInAppMessage/HydraInAppTemplateType.ts +57 -0
- package/src/models/HydraInAppMessage/HydraInAppTextComponent.ts +18 -0
- package/src/models/HydraLogLevel.ts +8 -0
- package/src/models/HydraNativeEvent.ts +19 -0
- package/src/models/HydraNotification/HydraNotification.ts +97 -0
- package/src/models/HydraNotification/HydraNotificationBody.ts +23 -0
- package/src/models/HydraNotification/HydraNotificationCta.ts +20 -0
- package/src/models/HydraNotification/HydraNotificationCtaType.ts +59 -0
- package/src/models/HydraNotification/HydraNotificationExpandedDetails.ts +28 -0
- package/src/models/HydraNotification/HydraNotificationGateway.ts +5 -0
- package/src/models/HydraPushPreferences.ts +16 -0
- package/src/models/HydraUserDetails.ts +31 -0
- package/src/models/HydraVisitorInfo.ts +14 -0
- package/src/models/NonHydraNotification.ts +15 -0
- package/src/models/UserState.ts +33 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//
|
|
2
|
+
// HydraInboxUI.swift
|
|
3
|
+
// react-native-hydra-lib
|
|
4
|
+
//
|
|
5
|
+
// Created by Sandesh Kumar Jain on 01/01/25.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import HydraCore
|
|
10
|
+
import HydraInboxUI
|
|
11
|
+
import React
|
|
12
|
+
|
|
13
|
+
@objc public final class HydraInboxUI : NSObject{
|
|
14
|
+
@objc public static let shared = HydraInboxUI()
|
|
15
|
+
|
|
16
|
+
private var inboxUICore : InboxUICore? = nil
|
|
17
|
+
private var navigationController : UINavigationController? = nil
|
|
18
|
+
private var hydraNotificationController : UIViewController? = nil
|
|
19
|
+
|
|
20
|
+
private override init(){
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func setNavigationController(navController : UINavigationController){
|
|
25
|
+
self.navigationController = navController
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func initializeInboxUICore(inboxUIConfigDict : [String : Any]?){
|
|
29
|
+
let placeholderImage: UIImage? = UIImage(named: "inboxUIPlaceholder")
|
|
30
|
+
if placeholderImage == nil{
|
|
31
|
+
Logger.info("HydraLib: HydraInboxUI.initializeInboxUICore: inboxUIPlaceholder image for InboxUI not found in Images.xcassets, the image must be named \"inboxUIPlaceholder\"")
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var inboxUnreadConfig: HydraReactNativeInboxUIConfiguration? = nil
|
|
35
|
+
var inboxReadConfig: HydraReactNativeInboxUIConfiguration? = nil
|
|
36
|
+
var emptyNotificationsConfig: HydraInboxEmptyNotificationsConfiguration? = nil
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if let unreadMessageConfigDict = inboxUIConfigDict?["UNREAD_MESSAGE_CONFIG"] as? Dictionary<String, Any>{
|
|
40
|
+
inboxUnreadConfig = unreadMessageConfigDict.toHydraRNInboxUIConfiguration(InboxUIConfigurationType.unread)
|
|
41
|
+
}
|
|
42
|
+
else{
|
|
43
|
+
Logger.info("HydraLib: HydraInboxUI.initializeInboxUICore: UNREAD_MESSAGE_CONFIG missing")
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if let readMessageConfigDict = inboxUIConfigDict?["READ_MESSAGE_CONFIG"] as? Dictionary<String, Any>{
|
|
47
|
+
inboxReadConfig = readMessageConfigDict.toHydraRNInboxUIConfiguration(InboxUIConfigurationType.read)
|
|
48
|
+
}
|
|
49
|
+
else{
|
|
50
|
+
Logger.info("HydraLib: HydraInboxUI.initializeInboxUICore: READ_MESSAGE_CONFIG missing")
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if let emptyNotificationsConfigDict = inboxUIConfigDict?["EMPTY_INBOX_CONFIG"] as? Dictionary<String, Any>{
|
|
54
|
+
emptyNotificationsConfig = emptyNotificationsConfigDict.toHydraInboxEmptyNotificationsConfig()
|
|
55
|
+
}
|
|
56
|
+
else{
|
|
57
|
+
Logger.info("HydraLib: HydraInboxUI.initializeInboxUICore: EMPTY_INBOX_CONFIG missing")
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
let inboxUIConfig = HydraInboxUIConfiguration(
|
|
62
|
+
unreadMessageConfigType: inboxUnreadConfig != nil ? .customReactNativeConfiguration(inboxUnreadConfig!) : .defaultUnreadConfiguration,
|
|
63
|
+
readMessageConfigType: inboxReadConfig != nil ?.customReactNativeConfiguration(inboxReadConfig!) : .defaultReadConfiguration,
|
|
64
|
+
notificationsNotFoundConfiguration:emptyNotificationsConfig,
|
|
65
|
+
placeholderImage: placeholderImage
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
inboxUICore = InboxUICore(with: HydraInbox.shared.inboxCore!, configuration: inboxUIConfig)
|
|
69
|
+
Logger.info("HydraLib: HydraInboxUI.initializeInboxUICore: Created InboxUICore")
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@objc public func showNotificationCenter(_ resolve : RCTPromiseResolveBlock?, reject : RCTPromiseRejectBlock? ){
|
|
73
|
+
if self.inboxUICore != nil{
|
|
74
|
+
DispatchQueue.main.async{
|
|
75
|
+
guard let notificationCenter = self.inboxUICore?.getNotificationCenter() else { return}
|
|
76
|
+
self.navigationController?.pushViewController(notificationCenter, animated: true)
|
|
77
|
+
self.hydraNotificationController = notificationCenter
|
|
78
|
+
}
|
|
79
|
+
resolve?(true)
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
resolve?(false)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@objc public func hideNotificationCenterIfShowing(_ resolve : RCTPromiseResolveBlock?, reject : RCTPromiseRejectBlock? ){
|
|
86
|
+
if self.navigationController != nil && self.hydraNotificationController != nil{
|
|
87
|
+
DispatchQueue.main.async{
|
|
88
|
+
self.navigationController?.popViewController(animated: true)
|
|
89
|
+
}
|
|
90
|
+
resolve?(true)
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
resolve?(false)
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
func navigationControllerViewWillChange(_ upcomingViewController: UIViewController){
|
|
98
|
+
if hydraNotificationController != nil && upcomingViewController != hydraNotificationController{
|
|
99
|
+
hydraNotificationController = nil
|
|
100
|
+
HydraInbox.shared.setHydraInboxUIDelegate()
|
|
101
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_NOTIFICATION_CENTER_DISMISSED.rawValue, body: "")
|
|
102
|
+
}
|
|
103
|
+
navigationController?.setNavigationBarHidden(hydraNotificationController == nil || upcomingViewController != hydraNotificationController, animated: false)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
//
|
|
2
|
+
// HydraPushNotification.swift
|
|
3
|
+
// react-native-hydra-lib
|
|
4
|
+
//
|
|
5
|
+
// Created by Sandesh Kumar Jain on 01/01/25.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import HydraPushNotification
|
|
10
|
+
import HydraCore
|
|
11
|
+
import React
|
|
12
|
+
import HydraInAppMessage
|
|
13
|
+
|
|
14
|
+
@objc public final class HydraPushNotification : NSObject{
|
|
15
|
+
|
|
16
|
+
@objc public static let shared = HydraPushNotification()
|
|
17
|
+
|
|
18
|
+
private var fcmToken : String?
|
|
19
|
+
let notificationCore: NotificationCore?
|
|
20
|
+
var fcmTokenSetInNotificationCore: Bool = false
|
|
21
|
+
|
|
22
|
+
private override init() {
|
|
23
|
+
notificationCore = NotificationCore.shared
|
|
24
|
+
super.init()
|
|
25
|
+
notificationCore?.setNotificationCallbackDelagte(delegate: self)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@objc public func openExternalUrl(_ url: String, resolve: RCTPromiseResolveBlock?, reject: RCTPromiseRejectBlock?) {
|
|
29
|
+
guard let targetURL = URL(string: url) else {
|
|
30
|
+
reject?("INVALID_URL", "Invalid URL: \(url)", nil)
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
DispatchQueue.main.async {
|
|
34
|
+
UIApplication.shared.open(targetURL, options: [:], completionHandler: nil)
|
|
35
|
+
}
|
|
36
|
+
resolve?(nil)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@objc public func requestPermission(_ resolve : RCTPromiseResolveBlock?, reject : RCTPromiseRejectBlock? ) {
|
|
40
|
+
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
|
|
41
|
+
let center = UNUserNotificationCenter.current()
|
|
42
|
+
center.requestAuthorization(options: authOptions) { granted, error in
|
|
43
|
+
if let error = error {
|
|
44
|
+
// Handle the error here.
|
|
45
|
+
Logger.error("HydraPushNotification: requestPermission: Error occurred due to :\(error.localizedDescription)")
|
|
46
|
+
reject?("ERROR", "Error requesting permission", error)
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Enable or disable features based on the authorization.
|
|
51
|
+
// if granted{
|
|
52
|
+
// Logger.info("HydraPushNotification: requestPermission: Application Granted permissions:\(granted)")
|
|
53
|
+
// DispatchQueue.main.async {
|
|
54
|
+
// UIApplication.shared.registerForRemoteNotifications()
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
HydraSDKCore.shared.hydra?.update(notificationSupport: granted )
|
|
58
|
+
resolve?(granted)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@objc public func getFCMToken(_ resolve : RCTPromiseResolveBlock?, reject : RCTPromiseRejectBlock? ){
|
|
63
|
+
guard fcmToken != nil else{
|
|
64
|
+
Logger.debug("HydraPushNotification: getFCMToken: Did not receive the token yet")
|
|
65
|
+
reject?( "TOKEN_NOT_AVAILABLE", "Did not receive the token yet", nil)
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Logger.debug("HydraPushNotification: getFCMToken: returning fcm token = \(fcmToken!)")
|
|
70
|
+
resolve?(fcmToken!)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@objc public func messaging(_ messaging: Messaging, didReceiveRegistrationToken token: String?) {
|
|
75
|
+
Logger.debug("HydraPushNotification: messaging:didReceiveRegistrationToken: token registered")
|
|
76
|
+
fcmToken = token
|
|
77
|
+
if let token, HydraSDKCore.shared.hydra != nil {
|
|
78
|
+
Task{
|
|
79
|
+
await HydraSDKCore.shared.hydra?.update(interfaceID: token)
|
|
80
|
+
// HydraSDKCore.shared.hydra?.reportUserSettingsUpdate()
|
|
81
|
+
fcmTokenSetInNotificationCore = true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.8){
|
|
85
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_TOKEN_AVAILABLE.rawValue, body: self.fcmToken)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
func isCapillaryNotification(_ notification: UNNotification) -> Bool{
|
|
90
|
+
let senderSource = notification.request.content.userInfo[HydraConstants.Keys.APIRequestKeys.senderSource] as? String ?? ""
|
|
91
|
+
return senderSource.hasPrefix("capillary")
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
func canSendNotificationEventToRN(_ payload: HydraNotificationPayload) -> Bool{
|
|
95
|
+
let loggedInUserId = Hydra.getSharedUserDefaults()?.customerId() ?? ""
|
|
96
|
+
return NotificationCore.isAllowed() && payload.cuid == loggedInUserId && Hydra.isValidNotification(notification: payload)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@objc public func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void){
|
|
100
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:willPresent:withCompletionHandler received notification \n notification = \(notification)")
|
|
101
|
+
|
|
102
|
+
if isCapillaryNotification(notification){
|
|
103
|
+
let payload = HydraNotificationPayload.generate(from: notification.request.content.userInfo)
|
|
104
|
+
if canSendNotificationEventToRN(payload){
|
|
105
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_HYDRA_NOTIFICATION_RECEIVED.rawValue, body: payload.toDict())
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else{
|
|
109
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_NON_HYDRA_NOTIFICATION_RECEIVED.rawValue, body: nonHydraNotificationDict(from: notification.request.content.userInfo))
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let handler = notificationCore?.userNotification(center: center, willPresent: notification, withCompletionHandler: completionHandler)
|
|
113
|
+
if handler != nil{
|
|
114
|
+
getNotificationSettings { settings in
|
|
115
|
+
var allowedSettings = [UNNotificationPresentationOptions]()
|
|
116
|
+
if settings.soundSetting == .enabled {
|
|
117
|
+
allowedSettings.append(.sound)
|
|
118
|
+
}
|
|
119
|
+
if settings.badgeSetting == .enabled {
|
|
120
|
+
allowedSettings.append(.badge)
|
|
121
|
+
}
|
|
122
|
+
if settings.alertSetting == .enabled {
|
|
123
|
+
if #available(iOS 14.0, *) {
|
|
124
|
+
allowedSettings.append(.banner)
|
|
125
|
+
} else {
|
|
126
|
+
// Fallback on earlier versions
|
|
127
|
+
allowedSettings.append(.alert)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
switch settings.authorizationStatus {
|
|
131
|
+
case .denied:
|
|
132
|
+
handler!([])
|
|
133
|
+
case .notDetermined:
|
|
134
|
+
Logger.debug("Permission not determined")
|
|
135
|
+
fallthrough
|
|
136
|
+
default:
|
|
137
|
+
handler!(.init(allowedSettings))
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if isCapillaryNotification(notification){
|
|
143
|
+
let payload = HydraNotificationPayload.generate(from: notification.request.content.userInfo)
|
|
144
|
+
if canSendNotificationEventToRN(payload){
|
|
145
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_HYDRA_NOTIFICATION_SHOWN.rawValue, body: payload.toDict())
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@objc public func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void){
|
|
151
|
+
|
|
152
|
+
if HydraSDKCore.shared.hydra == nil{
|
|
153
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){
|
|
154
|
+
self.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
|
|
155
|
+
}
|
|
156
|
+
return
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler notification reponse = \(response)")
|
|
160
|
+
let handler = notificationCore?.userNotification(center: center, didReceive: response, withCompletionHandler: completionHandler)
|
|
161
|
+
if handler != nil{
|
|
162
|
+
handler!()
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if isCapillaryNotification(response.notification){
|
|
166
|
+
|
|
167
|
+
let payload = HydraNotificationPayload.generate(from: response.notification.request.content.userInfo)
|
|
168
|
+
|
|
169
|
+
if canSendNotificationEventToRN(payload){
|
|
170
|
+
switch response.actionIdentifier {
|
|
171
|
+
|
|
172
|
+
case UNNotificationDefaultActionIdentifier:
|
|
173
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Default action identifier Hydra")
|
|
174
|
+
|
|
175
|
+
case UNNotificationDismissActionIdentifier:
|
|
176
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Dismiss action identifier Hydra")
|
|
177
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_HYDRA_NOTIFICATION_DISMISSED.rawValue, body: payload.toDict())
|
|
178
|
+
|
|
179
|
+
default:
|
|
180
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Custom action identifier Hydra")
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else{
|
|
185
|
+
switch response.actionIdentifier {
|
|
186
|
+
|
|
187
|
+
case UNNotificationDefaultActionIdentifier:
|
|
188
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Default action identifier NonHydra")
|
|
189
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_NON_HYDRA_NOTIFICATION_CLICKED.rawValue, body: nonHydraNotificationDict(from: response.notification.request.content.userInfo))
|
|
190
|
+
|
|
191
|
+
case UNNotificationDismissActionIdentifier:
|
|
192
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Dismiss action identifier NonHydra")
|
|
193
|
+
|
|
194
|
+
default:
|
|
195
|
+
Logger.debug("HydraPushNotification: userNotificationCenter:didReceive:withCompletionHandler: Custom action identifier NonHydra")
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
func updateFcmToken() {
|
|
201
|
+
if !fcmTokenSetInNotificationCore && fcmToken != nil{
|
|
202
|
+
Task{
|
|
203
|
+
await HydraSDKCore.shared.hydra?.update(interfaceID: fcmToken!)
|
|
204
|
+
fcmTokenSetInNotificationCore = true
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
func forceUpdateFcmToken() {
|
|
210
|
+
fcmTokenSetInNotificationCore = false
|
|
211
|
+
updateFcmToken()
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
func application(
|
|
215
|
+
_ application: UIApplication,
|
|
216
|
+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
217
|
+
){
|
|
218
|
+
Logger.debug("HydraPushNotification: application:didFinishLaunchingWithOptions")
|
|
219
|
+
notificationCore?.application(application, didFinishLaunchingWithOptions:launchOptions)
|
|
220
|
+
updateFcmToken()
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@objc public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
|
|
224
|
+
Logger.debug("HydraPushNotification: application:didRegisterForRemoteNotificationsWithDeviceToken")
|
|
225
|
+
if HydraSDKCore.shared.hydra == nil{
|
|
226
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){
|
|
227
|
+
self.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
|
|
228
|
+
}
|
|
229
|
+
return
|
|
230
|
+
}
|
|
231
|
+
Messaging.messaging().apnsToken = deviceToken
|
|
232
|
+
HydraSDKCore.shared.hydra?.application(application, didRegisterForRemoteNotificationsWithToken: deviceToken)
|
|
233
|
+
// notificationCore?.application(application, didRegisterForRemoteNotificationsWithToken: deviceToken)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@objc public func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error) {
|
|
237
|
+
Logger.debug("HydraPushNotification: application:didFailToRegisterForRemoteNotificationsWithError error = \(error.localizedDescription)")
|
|
238
|
+
// if HydraSDKCore.shared.hydra == nil{
|
|
239
|
+
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){
|
|
240
|
+
// self.application(application, didFailToRegisterForRemoteNotificationsWithError: error)
|
|
241
|
+
// }
|
|
242
|
+
// return
|
|
243
|
+
// }
|
|
244
|
+
// notificationCore?.application(application, didFailToRegisterForRemoteNotificationsWithError: error)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@objc public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
|
248
|
+
Logger.debug("HydraPushNotification: application:didReceiveRemoteNotification:fetchCompletionHandler: userInfo = \(userInfo) ")
|
|
249
|
+
// if HydraSDKCore.shared.hydra == nil{
|
|
250
|
+
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){
|
|
251
|
+
// self.application(application, didReceiveRemoteNotification: userInfo, fetchCompletionHandler: completionHandler)
|
|
252
|
+
// }
|
|
253
|
+
// return
|
|
254
|
+
// }
|
|
255
|
+
Messaging.messaging().appDidReceiveMessage(userInfo)
|
|
256
|
+
let _ = InAppMessagingCore.application(application, didReceiveRemoteNotification: userInfo, fetchCompletionHandler: completionHandler)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
func nonHydraNotificationDict(from rawUserInfo : [AnyHashable : Any] ) -> [String: Any]{
|
|
260
|
+
var message : [String: Any] = [:]
|
|
261
|
+
var data : [String: Any] = [:]
|
|
262
|
+
var notification : [String: Any] = [:]
|
|
263
|
+
var notificationIOS : [String: Any] = [:]
|
|
264
|
+
|
|
265
|
+
let userInfo = Dictionary(uniqueKeysWithValues: rawUserInfo.compactMap { k, v -> (String, Any)? in
|
|
266
|
+
if let ks = k as? String {
|
|
267
|
+
return (ks, v)
|
|
268
|
+
}
|
|
269
|
+
return nil
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
// message.data
|
|
273
|
+
userInfo.forEach{ key, value in
|
|
274
|
+
// message.messageId
|
|
275
|
+
if key == "gcm.message_id" || key == "google.message_id" ||
|
|
276
|
+
key == "message_id" {
|
|
277
|
+
message["messageId"] = userInfo[key]
|
|
278
|
+
return
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// message.messageType
|
|
282
|
+
if key == "message_type" {
|
|
283
|
+
message["messageType"] = userInfo[key]
|
|
284
|
+
return
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// message.collapseKey
|
|
288
|
+
if key == "collapse_key" {
|
|
289
|
+
message["collapseKey"] = userInfo[key]
|
|
290
|
+
return
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// message.from
|
|
294
|
+
if key == "from" {
|
|
295
|
+
message["from"] = userInfo[key]
|
|
296
|
+
return
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// message.sentTime
|
|
300
|
+
if key == "google.c.a.ts" {
|
|
301
|
+
message["sentTime"] = userInfo[key]
|
|
302
|
+
return
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// message.to
|
|
306
|
+
if key == "to" || key == "google.to" {
|
|
307
|
+
message["to"] = userInfo[key]
|
|
308
|
+
return
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// build data dict from remaining keys but skip keys that shouldn't be included in data
|
|
312
|
+
if key == "aps" || key.hasPrefix("gcm.") || key.hasPrefix("google.") {
|
|
313
|
+
return
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// message.apple.imageUrl
|
|
317
|
+
if key == "fcm_options" {
|
|
318
|
+
if userInfo[key] != nil && (userInfo[key] as! [String : Any])["image"] != nil {
|
|
319
|
+
notificationIOS["imageUrl"] = (userInfo[key] as! [String : Any])["image"]
|
|
320
|
+
}
|
|
321
|
+
return
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
data[key] = userInfo[key];
|
|
325
|
+
}
|
|
326
|
+
message["data"] = data;
|
|
327
|
+
|
|
328
|
+
if userInfo["aps"] != nil {
|
|
329
|
+
let apsDict : [String : Any] = userInfo["aps"] as! [String : Any]
|
|
330
|
+
// message.category
|
|
331
|
+
if apsDict["category"] != nil {
|
|
332
|
+
message["category"] = apsDict["category"]
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// message.threadId
|
|
336
|
+
if apsDict["thread-id"] != nil {
|
|
337
|
+
message["threadId"] = apsDict["thread-id"]
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// message.contentAvailable
|
|
341
|
+
if apsDict["content-available"] != nil {
|
|
342
|
+
message["contentAvailable"] = (apsDict["content-available"] as! Bool)
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// message.mutableContent
|
|
346
|
+
if apsDict["mutable-content"] != nil && apsDict["mutable-content"] as! Int == 1 {
|
|
347
|
+
message["mutableContent"] = (apsDict["mutable-content"] as! Int) == 1
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// message.notification.*
|
|
351
|
+
if apsDict["alert"] != nil {
|
|
352
|
+
// can be a string or dictionary
|
|
353
|
+
if apsDict["alert"] is String {
|
|
354
|
+
// message.notification.title
|
|
355
|
+
notification["title"] = apsDict["alert"]
|
|
356
|
+
} else if apsDict["alert"] is [String:Any] {
|
|
357
|
+
let apsAlertDict = apsDict["alert"] as! [String:Any]
|
|
358
|
+
|
|
359
|
+
// message.notification.title
|
|
360
|
+
if apsAlertDict["title"] != nil {
|
|
361
|
+
notification["title"] = apsAlertDict["title"]
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// message.notification.titleLocKey
|
|
365
|
+
if apsAlertDict["title-loc-key"] != nil {
|
|
366
|
+
notification["titleLocKey"] = apsAlertDict["title-loc-key"]
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// message.notification.titleLocArgs
|
|
370
|
+
if apsAlertDict["title-loc-args"] != nil {
|
|
371
|
+
notification["titleLocArgs"] = apsAlertDict["title-loc-args"]
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// message.notification.body
|
|
375
|
+
if apsAlertDict["body"] != nil {
|
|
376
|
+
notification["body"] = apsAlertDict["body"]
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// message.notification.bodyLocKey
|
|
380
|
+
if apsAlertDict["loc-key"] != nil {
|
|
381
|
+
notification["bodyLocKey"] = apsAlertDict["loc-key"]
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// message.notification.bodyLocArgs
|
|
385
|
+
if apsAlertDict["loc-args"] != nil {
|
|
386
|
+
notification["bodyLocArgs"] = apsAlertDict["loc-args"]
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// Apple only
|
|
390
|
+
// message.notification.apple.subtitle
|
|
391
|
+
if apsAlertDict["subtitle"] != nil {
|
|
392
|
+
notificationIOS["subtitle"] = apsAlertDict["subtitle"]
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Apple only
|
|
396
|
+
// message.notification.apple.subtitleLocKey
|
|
397
|
+
if apsAlertDict["subtitle-loc-key"] != nil {
|
|
398
|
+
notificationIOS["subtitleLocKey"] = apsAlertDict["subtitle-loc-key"]
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Apple only
|
|
402
|
+
// message.notification.apple.subtitleLocArgs
|
|
403
|
+
if apsAlertDict["subtitle-loc-args"] != nil {
|
|
404
|
+
notificationIOS["subtitleLocArgs"] = apsAlertDict["subtitle-loc-args"]
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Apple only
|
|
408
|
+
// message.notification.apple.badge
|
|
409
|
+
if apsDict["badge"] != nil {
|
|
410
|
+
notificationIOS["badge"] = "\(apsDict["badge"] ?? "")"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
notification["apple"] = notificationIOS;
|
|
415
|
+
message["notification"] = notification;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// message.notification.apple.sound
|
|
419
|
+
if apsDict["sound"] != nil {
|
|
420
|
+
if apsDict["sound"] is String {
|
|
421
|
+
// message.notification.apple.sound
|
|
422
|
+
notification["sound"] = [
|
|
423
|
+
"name" : apsDict["sound"],
|
|
424
|
+
"critical" : false,
|
|
425
|
+
"volume" : 1,
|
|
426
|
+
];
|
|
427
|
+
} else if apsDict["sound"] is Dictionary<String, Any> {
|
|
428
|
+
let apsSoundDict = apsDict["sound"] as! [String:Any]
|
|
429
|
+
var notificationIOSSound : [String:Any] = [:]
|
|
430
|
+
|
|
431
|
+
// message.notification.apple.sound.name String
|
|
432
|
+
if apsSoundDict["name"] != nil {
|
|
433
|
+
notificationIOSSound["name"] = apsSoundDict["name"]
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// message.notification.apple.sound.critical Boolean
|
|
437
|
+
if apsSoundDict["critical"] != nil {
|
|
438
|
+
notificationIOSSound["critical"] = (apsSoundDict["critical"] as! Bool)
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// message.notification.apple.sound.volume Number
|
|
442
|
+
if apsSoundDict["volume"] != nil {
|
|
443
|
+
notificationIOSSound["volume"] = apsSoundDict["volume"]
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// message.notification.apple.sound
|
|
447
|
+
notificationIOS["sound"] = notificationIOSSound
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
notification["apple"] = notificationIOS
|
|
451
|
+
message["notification"] = notification
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return message;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
fileprivate func getNotificationSettings(completionHandler: @escaping (UNNotificationSettings) -> Void) {
|
|
459
|
+
UNUserNotificationCenter.current().getNotificationSettings { settings in
|
|
460
|
+
completionHandler(settings)
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
extension HydraPushNotification : HydraNotificationCallbackDelegate{
|
|
466
|
+
public func process(cta: CTA, notificationPayload payload: Any) -> Bool {
|
|
467
|
+
var notificationDict: [String:Any] = [:]
|
|
468
|
+
notificationDict["cta"] = cta.toDict()
|
|
469
|
+
if payload is HydraNotificationPayload{
|
|
470
|
+
notificationDict["payload"] = (payload as? HydraNotificationPayload)!.toDict()
|
|
471
|
+
}
|
|
472
|
+
Logger.debug("HydraPushNotification: processCta: Hydra Notification Clicked: notification = \(notificationDict)")
|
|
473
|
+
HydraEventEmitter.shared.sendEvent(HydraEventType.ON_HYDRA_NOTIFICATION_CLICKED.rawValue, body: notificationDict)
|
|
474
|
+
return true
|
|
475
|
+
}
|
|
476
|
+
}
|