@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,151 @@
|
|
|
1
|
+
HYDRA_SPM_URL = "https://github.com/Capillary/hydra-ios-sdk-spm.git"
|
|
2
|
+
HYDRA_SPM_REQUIREMENT = { kind: "exactVersion", version: "1.7.5-preprod.4" }
|
|
3
|
+
# hydra-ios-sdk-spm doesn't commit the xcframeworks into git - each pod's own
|
|
4
|
+
# podspec fetches its real content via a per-pod :http zip (matching
|
|
5
|
+
# Package.swift's binaryTarget URLs for SPM). A Podfile `:git` external
|
|
6
|
+
# source would override that s.source entirely and use the (framework-less)
|
|
7
|
+
# git clone directly, so CocoaPods needs to find these via :podspec instead -
|
|
8
|
+
# that only tells it where the .podspec *file* is, leaving its own declared
|
|
9
|
+
# :http source intact.
|
|
10
|
+
#
|
|
11
|
+
# The podspec files themselves are vendored locally (scripts/hydra-podspecs)
|
|
12
|
+
# rather than fetched from raw.githubusercontent.com at install time - a
|
|
13
|
+
# :podspec => <url> forces CocoaPods to fetch that file via Ruby's open-uri,
|
|
14
|
+
# which doesn't race IPv4/IPv6 the way curl does and can hang indefinitely on
|
|
15
|
+
# networks where that matters (unlike the actual xcframework download below,
|
|
16
|
+
# which goes through CocoaPods' curl-based :http downloader and is
|
|
17
|
+
# unaffected). Vendoring removes that network hop entirely. Each vendored
|
|
18
|
+
# file reads its version from HYDRA_SPM_REQUIREMENT below, so bumping the
|
|
19
|
+
# version here is still the only step needed for a routine release bump -
|
|
20
|
+
# only re-sync the vendored files by hand if a podspec's actual structure
|
|
21
|
+
# changes (new dependency, deployment target, etc).
|
|
22
|
+
HYDRA_PODSPEC_DIR = File.join(__dir__, "hydra-podspecs")
|
|
23
|
+
|
|
24
|
+
FIREBASE_SPM_URL = "https://github.com/firebase/firebase-ios-sdk.git"
|
|
25
|
+
FIREBASE_SPM_REQUIREMENT = { kind: "upToNextMajorVersion", minimumVersion: "12.0.0" }
|
|
26
|
+
|
|
27
|
+
GOOGLE_UTILITIES_SPM_URL = "https://github.com/google/GoogleUtilities.git"
|
|
28
|
+
# firebase-ios-sdk 12.x internally requires GoogleUtilities 8.1.0..<9.0.0 -
|
|
29
|
+
# has to match or CocoaPods' SPM resolver can't satisfy both constraints.
|
|
30
|
+
GOOGLE_UTILITIES_SPM_REQUIREMENT = { kind: "upToNextMajorVersion", minimumVersion: "8.1.0" }
|
|
31
|
+
|
|
32
|
+
# True when the consuming app explicitly opted in via $RNHydraUseSPM and the
|
|
33
|
+
# installed React Native version defines spm_dependency (>= 0.75). CocoaPods
|
|
34
|
+
# is the default - SPM only kicks in when both are true.
|
|
35
|
+
def hydra_use_spm?
|
|
36
|
+
defined?($RNHydraUseSPM) && $RNHydraUseSPM && respond_to?(:spm_dependency, true)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Routes a dependency through Swift Package Manager when the app opted in
|
|
40
|
+
# via $RNHydraUseSPM, falling back to the equivalent CocoaPods dependency
|
|
41
|
+
# otherwise (the default).
|
|
42
|
+
def spm_or_pod_dependency(spec, pod_name, url:, requirement:, spm_product: pod_name)
|
|
43
|
+
if hydra_use_spm?
|
|
44
|
+
spm_dependency(spec, url: url, requirement: requirement, products: [spm_product])
|
|
45
|
+
else
|
|
46
|
+
spec.dependency pod_name
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def hydra_dependency(spec, pod_name, spm_product = pod_name)
|
|
51
|
+
spm_or_pod_dependency(spec, pod_name,
|
|
52
|
+
url: HYDRA_SPM_URL, requirement: HYDRA_SPM_REQUIREMENT, spm_product: spm_product)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# GoogleUtilities has no single SPM product equivalent to the CocoaPods
|
|
56
|
+
# umbrella pod (only granular GUL* sub-module products, from a separate
|
|
57
|
+
# repo to firebase-ios-sdk) - route it to GULAppDelegateSwizzler, the only
|
|
58
|
+
# GoogleUtilities symbol react-native-hydra-lib's own source actually uses
|
|
59
|
+
# (see ios/Delegates/HydraApplicationDelegate.swift).
|
|
60
|
+
def firebase_dependency(spec, pod_name, spm_product: pod_name)
|
|
61
|
+
if pod_name == "GoogleUtilities"
|
|
62
|
+
return spm_or_pod_dependency(spec, pod_name,
|
|
63
|
+
url: GOOGLE_UTILITIES_SPM_URL, requirement: GOOGLE_UTILITIES_SPM_REQUIREMENT,
|
|
64
|
+
spm_product: "GULAppDelegateSwizzler")
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
spm_or_pod_dependency(spec, pod_name,
|
|
68
|
+
url: FIREBASE_SPM_URL, requirement: FIREBASE_SPM_REQUIREMENT, spm_product: spm_product)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# FirebaseAnalytics requires the -ObjC linker flag on the app target when
|
|
72
|
+
# pulled in via SPM (its Objective-C category/swizzling code otherwise gets
|
|
73
|
+
# stripped). Call this from your Podfile's own post_install block, e.g.:
|
|
74
|
+
# post_install do |installer|
|
|
75
|
+
# hydra_post_install(installer)
|
|
76
|
+
# ...
|
|
77
|
+
# end
|
|
78
|
+
def hydra_post_install(installer)
|
|
79
|
+
return unless hydra_use_spm?
|
|
80
|
+
|
|
81
|
+
# FirebaseAnalytics links onto the real app target directly (SPM
|
|
82
|
+
# products bypass the Pods project), so the flag has to go on the
|
|
83
|
+
# user project's native targets, not installer.pods_project.
|
|
84
|
+
installer.aggregate_targets.each do |aggregate_target|
|
|
85
|
+
aggregate_target.user_project.native_targets.each do |native_target|
|
|
86
|
+
native_target.build_configurations.each do |build_config|
|
|
87
|
+
flags = build_config.build_settings['OTHER_LDFLAGS']
|
|
88
|
+
if flags.nil?
|
|
89
|
+
build_config.build_settings['OTHER_LDFLAGS'] = ['$(inherited)', '-ObjC']
|
|
90
|
+
elsif flags.is_a?(Array) && !flags.include?('-ObjC')
|
|
91
|
+
flags << '-ObjC'
|
|
92
|
+
elsif flags.is_a?(String) && !flags.include?('-ObjC')
|
|
93
|
+
build_config.build_settings['OTHER_LDFLAGS'] = [flags, '-ObjC']
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
aggregate_target.user_project.save
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def hydra_pods
|
|
102
|
+
if hydra_use_spm?
|
|
103
|
+
# react-native-hydra-lib.podspec resolves the Firebase and Hydra
|
|
104
|
+
# native SDKs via spm_dependency by default (see hydra_dependency/
|
|
105
|
+
# firebase_dependency above) - adding CocoaPods lines for them here too
|
|
106
|
+
# would double-link the same frameworks. FirebaseAnalytics.xcframework
|
|
107
|
+
# ships as a static-only precompiled binary and can't be dynamically
|
|
108
|
+
# linked inside CocoaPods' Pods aggregate target, which is exactly why
|
|
109
|
+
# it (and the rest of Firebase) needs to go through SPM here instead
|
|
110
|
+
# of the plain `pod` lines below.
|
|
111
|
+
return
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
pod 'GoogleUtilities', :modular_headers => true
|
|
115
|
+
pod 'FirebaseCore', :modular_headers => true
|
|
116
|
+
pod 'FirebaseMessaging', :modular_headers => true
|
|
117
|
+
pod 'FirebaseRemoteConfig', :modular_headers => true
|
|
118
|
+
pod 'FirebaseABTesting', :modular_headers => true
|
|
119
|
+
pod 'FirebaseInstallations', :modular_headers => true
|
|
120
|
+
pod 'FirebaseAnalytics'
|
|
121
|
+
|
|
122
|
+
pod 'HydraCore', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraCore.podspec")
|
|
123
|
+
pod 'HydraPushNotification', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraPushNotification.podspec")
|
|
124
|
+
pod 'HydraInAppMessage', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraInAppMessage.podspec")
|
|
125
|
+
pod 'HydraInboxCore', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraInboxCore.podspec")
|
|
126
|
+
pod 'HydraInboxUI', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraInboxUI.podspec")
|
|
127
|
+
pod 'HydraPushNotificationServiceExtension', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraPushNotificationServiceExtension.podspec")
|
|
128
|
+
end
|
|
129
|
+
def extension_pods
|
|
130
|
+
# App extension targets live in the app's own Xcode project, not the
|
|
131
|
+
# Pods project, and RN's spm_dependency only wires SPM products onto pod
|
|
132
|
+
# targets inside Pods (see
|
|
133
|
+
# node_modules/react-native/scripts/cocoapods/spm.rb - it operates on
|
|
134
|
+
# installer.pods_project only) - there's no way for CocoaPods to reach
|
|
135
|
+
# an extension target with it. So when $RNHydraUseSPM is set, this is a
|
|
136
|
+
# no-op: add the hydra-ios-sdk-spm Swift Package directly in Xcode
|
|
137
|
+
# instead and assign HydraPushNotificationServiceExtension to the
|
|
138
|
+
# extension target (see docs/INTEGRATION.md). Otherwise (the default),
|
|
139
|
+
# fall back to CocoaPods.
|
|
140
|
+
if hydra_use_spm?
|
|
141
|
+
Pod::UI.puts "[react-native-hydra-lib] $RNHydraUseSPM is set - add the HydraPushNotificationServiceExtension Swift Package product to this extension target directly in Xcode (see docs/INTEGRATION.md).".yellow
|
|
142
|
+
return
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# HydraPushNotificationServiceExtension's own podspec declares a plain
|
|
146
|
+
# CocoaPods dependency on HydraCore - hydra_pods may not have declared
|
|
147
|
+
# HydraCore's :podspec source (when the main target uses SPM instead), so
|
|
148
|
+
# it needs declaring here too.
|
|
149
|
+
pod 'HydraCore', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraCore.podspec")
|
|
150
|
+
pod 'HydraPushNotificationServiceExtension', :podspec => File.join(HYDRA_PODSPEC_DIR, "HydraPushNotificationServiceExtension.podspec")
|
|
151
|
+
end
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const crypto = require('crypto');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* SBOM Generator Script for react-native-hydra-lib
|
|
9
|
+
* This script generates Software Bill of Materials (SBOM) in SPDX format
|
|
10
|
+
* for both the main project and the example project
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
class SBOMGenerator {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.projectRoot = path.resolve(__dirname, '..');
|
|
16
|
+
this.exampleRoot = path.join(this.projectRoot, 'example');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Load package.json file from specified directory
|
|
21
|
+
*/
|
|
22
|
+
loadPackageJson(packageJsonPath) {
|
|
23
|
+
try {
|
|
24
|
+
const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf8');
|
|
25
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
26
|
+
console.log(
|
|
27
|
+
`✓ Loaded ${path.basename(packageJsonPath)} from ${path.dirname(packageJsonPath)}`
|
|
28
|
+
);
|
|
29
|
+
return packageJson;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.error(`✗ Failed to load ${packageJsonPath}:`, error.message);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Generate SPDX ID from package name
|
|
38
|
+
*/
|
|
39
|
+
generateSPDXID(packageName) {
|
|
40
|
+
const sanitized = packageName
|
|
41
|
+
.replace(/[@\/]/g, '-')
|
|
42
|
+
.replace(/[^a-zA-Z0-9-]/g, '')
|
|
43
|
+
.replace(/^-+|-+$/g, '');
|
|
44
|
+
return `SPDXRef-Package-${sanitized}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Detect license from package info (placeholder for future license detection)
|
|
49
|
+
*/
|
|
50
|
+
detectLicense(packageName, version) {
|
|
51
|
+
// In a real implementation, you might want to:
|
|
52
|
+
// 1. Check node_modules/{package}/package.json for license info
|
|
53
|
+
// 2. Use a license detection library
|
|
54
|
+
// 3. Query npm registry for license information
|
|
55
|
+
return 'NOASSERTION';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Create package entry for SBOM
|
|
60
|
+
*/
|
|
61
|
+
createPackageEntry(name, version, packageJson = null, isMainPackage = false) {
|
|
62
|
+
const spdxId = this.generateSPDXID(name);
|
|
63
|
+
|
|
64
|
+
if (isMainPackage && packageJson) {
|
|
65
|
+
return {
|
|
66
|
+
SPDXID: spdxId,
|
|
67
|
+
name: name,
|
|
68
|
+
downloadLocation: packageJson.repository?.url || 'NOASSERTION',
|
|
69
|
+
filesAnalyzed: false,
|
|
70
|
+
licenseConcluded: packageJson.license || 'NOASSERTION',
|
|
71
|
+
licenseDeclared: packageJson.license || 'NOASSERTION',
|
|
72
|
+
copyrightText: packageJson.author
|
|
73
|
+
? `Copyright (c) ${packageJson.author}`
|
|
74
|
+
: 'NOASSERTION',
|
|
75
|
+
versionInfo: version,
|
|
76
|
+
supplier: packageJson.author
|
|
77
|
+
? `Person: ${packageJson.author}`
|
|
78
|
+
: 'NOASSERTION',
|
|
79
|
+
homepage:
|
|
80
|
+
packageJson.homepage || packageJson.repository?.url || 'NOASSERTION',
|
|
81
|
+
description: packageJson.description || 'NOASSERTION',
|
|
82
|
+
packageType: 'npm',
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const detectedLicense = this.detectLicense(name, version);
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
SPDXID: spdxId,
|
|
90
|
+
name: name,
|
|
91
|
+
downloadLocation: `https://registry.npmjs.org/${name}/-/${name}-${version.replace(/[\^~]/, '')}.tgz`,
|
|
92
|
+
filesAnalyzed: false,
|
|
93
|
+
licenseConcluded: detectedLicense,
|
|
94
|
+
licenseDeclared: detectedLicense,
|
|
95
|
+
copyrightText: 'NOASSERTION',
|
|
96
|
+
versionInfo: version,
|
|
97
|
+
packageType: 'npm',
|
|
98
|
+
externalRefs: [
|
|
99
|
+
{
|
|
100
|
+
referenceCategory: 'PACKAGE-MANAGER',
|
|
101
|
+
referenceType: 'purl',
|
|
102
|
+
referenceLocator: `pkg:npm/${name}@${version.replace(/[\^~]/, '')}`,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Generate complete SBOM document
|
|
110
|
+
*/
|
|
111
|
+
generateSBOM(packageJson, projectPath, isExample = false) {
|
|
112
|
+
const projectName = isExample ? 'example' : 'main';
|
|
113
|
+
console.log(`🔄 Generating SBOM for ${projectName} project...`);
|
|
114
|
+
|
|
115
|
+
const timestamp = new Date().toISOString();
|
|
116
|
+
const packages = [];
|
|
117
|
+
const relationships = [];
|
|
118
|
+
|
|
119
|
+
// Add main package
|
|
120
|
+
const mainPackage = this.createPackageEntry(
|
|
121
|
+
packageJson.name,
|
|
122
|
+
packageJson.version,
|
|
123
|
+
packageJson,
|
|
124
|
+
true
|
|
125
|
+
);
|
|
126
|
+
packages.push(mainPackage);
|
|
127
|
+
|
|
128
|
+
// Helper function to add dependencies
|
|
129
|
+
const addDependencies = (deps, depType) => {
|
|
130
|
+
if (deps) {
|
|
131
|
+
Object.entries(deps).forEach(([name, version]) => {
|
|
132
|
+
const depPackage = this.createPackageEntry(name, version);
|
|
133
|
+
packages.push(depPackage);
|
|
134
|
+
|
|
135
|
+
// Add relationship
|
|
136
|
+
relationships.push({
|
|
137
|
+
spdxElementId: mainPackage.SPDXID,
|
|
138
|
+
relationshipType: this.getRelationshipType(depType),
|
|
139
|
+
relatedSpdxElement: depPackage.SPDXID,
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// Add all types of dependencies
|
|
146
|
+
addDependencies(packageJson.dependencies, 'runtime');
|
|
147
|
+
addDependencies(packageJson.devDependencies, 'dev');
|
|
148
|
+
addDependencies(packageJson.peerDependencies, 'peer');
|
|
149
|
+
addDependencies(packageJson.optionalDependencies, 'optional');
|
|
150
|
+
|
|
151
|
+
// Create main document relationship
|
|
152
|
+
relationships.unshift({
|
|
153
|
+
spdxElementId: 'SPDXRef-DOCUMENT',
|
|
154
|
+
relationshipType: 'DESCRIBES',
|
|
155
|
+
relatedSpdxElement: mainPackage.SPDXID,
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Generate document namespace with hash for uniqueness
|
|
159
|
+
const namespaceHash = crypto
|
|
160
|
+
.createHash('sha256')
|
|
161
|
+
.update(`${packageJson.name}-${packageJson.version}-${timestamp}`)
|
|
162
|
+
.digest('hex')
|
|
163
|
+
.substring(0, 8);
|
|
164
|
+
|
|
165
|
+
const documentName = isExample
|
|
166
|
+
? `${packageJson.name}-example-sbom`
|
|
167
|
+
: `${packageJson.name.replace('@', '').replace('/', '-')}-sbom`;
|
|
168
|
+
|
|
169
|
+
const baseUrl =
|
|
170
|
+
packageJson.repository?.url?.replace('.git', '') || 'https://example.com';
|
|
171
|
+
const documentNamespace = `${baseUrl}/sbom-${namespaceHash}`;
|
|
172
|
+
|
|
173
|
+
const sbom = {
|
|
174
|
+
spdxVersion: 'SPDX-2.3',
|
|
175
|
+
dataLicense: 'CC0-1.0',
|
|
176
|
+
SPDXID: 'SPDXRef-DOCUMENT',
|
|
177
|
+
name: documentName,
|
|
178
|
+
documentNamespace: documentNamespace,
|
|
179
|
+
creationInfo: {
|
|
180
|
+
created: timestamp,
|
|
181
|
+
creators: [
|
|
182
|
+
'Tool: react-native-hydra-lib-sbom-generator-v1.0.0',
|
|
183
|
+
`Tool: ${packageJson.name}@${packageJson.version}`,
|
|
184
|
+
],
|
|
185
|
+
licenseListVersion: '3.19',
|
|
186
|
+
},
|
|
187
|
+
packages: packages,
|
|
188
|
+
relationships: relationships,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
return sbom;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Get relationship type based on dependency type
|
|
196
|
+
*/
|
|
197
|
+
getRelationshipType(depType) {
|
|
198
|
+
switch (depType) {
|
|
199
|
+
case 'runtime':
|
|
200
|
+
return 'DEPENDS_ON';
|
|
201
|
+
case 'dev':
|
|
202
|
+
return 'DEV_DEPENDENCY_OF';
|
|
203
|
+
case 'peer':
|
|
204
|
+
return 'DEPENDENCY_OF';
|
|
205
|
+
case 'optional':
|
|
206
|
+
return 'OPTIONAL_DEPENDENCY_OF';
|
|
207
|
+
default:
|
|
208
|
+
return 'DEPENDS_ON';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Write SBOM to file
|
|
214
|
+
*/
|
|
215
|
+
writeSBOM(sbom, outputPath) {
|
|
216
|
+
try {
|
|
217
|
+
// Ensure directory exists
|
|
218
|
+
const dir = path.dirname(outputPath);
|
|
219
|
+
if (!fs.existsSync(dir)) {
|
|
220
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const sbomContent = JSON.stringify(sbom, null, 2);
|
|
224
|
+
fs.writeFileSync(outputPath, sbomContent, 'utf8');
|
|
225
|
+
console.log(
|
|
226
|
+
`✓ SBOM written to ${path.relative(this.projectRoot, outputPath)}`
|
|
227
|
+
);
|
|
228
|
+
console.log(
|
|
229
|
+
`📦 Documented ${sbom.packages.length} packages with ${sbom.relationships.length} relationships`
|
|
230
|
+
);
|
|
231
|
+
return true;
|
|
232
|
+
} catch (error) {
|
|
233
|
+
console.error(`✗ Failed to write SBOM to ${outputPath}:`, error.message);
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Check if SBOM needs updating
|
|
240
|
+
*/
|
|
241
|
+
shouldUpdateSBOM(packageJson, sbomPath) {
|
|
242
|
+
if (!fs.existsSync(sbomPath)) {
|
|
243
|
+
console.log(
|
|
244
|
+
`ℹ️ No existing SBOM found at ${path.relative(this.projectRoot, sbomPath)}, creating new one`
|
|
245
|
+
);
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
try {
|
|
250
|
+
const existingSBOM = JSON.parse(fs.readFileSync(sbomPath, 'utf8'));
|
|
251
|
+
const currentVersion = packageJson.version;
|
|
252
|
+
const sbomVersion = existingSBOM.packages?.find(
|
|
253
|
+
(pkg) => pkg.name === packageJson.name
|
|
254
|
+
)?.versionInfo;
|
|
255
|
+
|
|
256
|
+
if (sbomVersion !== currentVersion) {
|
|
257
|
+
console.log(
|
|
258
|
+
`🔄 Version mismatch detected (SBOM: ${sbomVersion}, Current: ${currentVersion})`
|
|
259
|
+
);
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Check if dependencies count changed
|
|
264
|
+
const currentDepCount = Object.keys({
|
|
265
|
+
...packageJson.dependencies,
|
|
266
|
+
...packageJson.devDependencies,
|
|
267
|
+
...packageJson.peerDependencies,
|
|
268
|
+
...packageJson.optionalDependencies,
|
|
269
|
+
}).length;
|
|
270
|
+
|
|
271
|
+
const sbomDepCount = existingSBOM.packages.length - 1; // Subtract main package
|
|
272
|
+
|
|
273
|
+
if (currentDepCount !== sbomDepCount) {
|
|
274
|
+
console.log(
|
|
275
|
+
`🔄 Dependencies count changed (SBOM: ${sbomDepCount}, Current: ${currentDepCount})`
|
|
276
|
+
);
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
console.log(
|
|
281
|
+
`✓ SBOM at ${path.relative(this.projectRoot, sbomPath)} is up to date`
|
|
282
|
+
);
|
|
283
|
+
return false;
|
|
284
|
+
} catch (error) {
|
|
285
|
+
console.log(
|
|
286
|
+
`⚠️ Invalid SBOM format at ${path.relative(this.projectRoot, sbomPath)}, regenerating`
|
|
287
|
+
);
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Generate SBOM for main project
|
|
294
|
+
*/
|
|
295
|
+
generateMainProjectSBOM() {
|
|
296
|
+
const packageJsonPath = path.join(this.projectRoot, 'package.json');
|
|
297
|
+
const sbomPath = path.join(this.projectRoot, 'sbom.spdx.json');
|
|
298
|
+
|
|
299
|
+
const packageJson = this.loadPackageJson(packageJsonPath);
|
|
300
|
+
if (!packageJson) return false;
|
|
301
|
+
|
|
302
|
+
if (!this.shouldUpdateSBOM(packageJson, sbomPath)) {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const sbom = this.generateSBOM(packageJson, this.projectRoot, false);
|
|
307
|
+
return this.writeSBOM(sbom, sbomPath);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Generate SBOM for example project
|
|
312
|
+
*/
|
|
313
|
+
generateExampleProjectSBOM() {
|
|
314
|
+
const packageJsonPath = path.join(this.exampleRoot, 'package.json');
|
|
315
|
+
const sbomPath = path.join(this.exampleRoot, 'example_sbom.spdx.json');
|
|
316
|
+
|
|
317
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
318
|
+
console.log(
|
|
319
|
+
'ℹ️ No example project found, skipping example SBOM generation'
|
|
320
|
+
);
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const packageJson = this.loadPackageJson(packageJsonPath);
|
|
325
|
+
if (!packageJson) return false;
|
|
326
|
+
|
|
327
|
+
if (!this.shouldUpdateSBOM(packageJson, sbomPath)) {
|
|
328
|
+
return true;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const sbom = this.generateSBOM(packageJson, this.exampleRoot, true);
|
|
332
|
+
return this.writeSBOM(sbom, sbomPath);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Main execution function
|
|
337
|
+
*/
|
|
338
|
+
run() {
|
|
339
|
+
console.log('🚀 Starting SBOM generation for react-native-hydra-lib');
|
|
340
|
+
console.log('📋 Generating SPDX-format Software Bill of Materials');
|
|
341
|
+
|
|
342
|
+
let success = true;
|
|
343
|
+
|
|
344
|
+
// Generate main project SBOM
|
|
345
|
+
console.log('\n📦 Processing main project...');
|
|
346
|
+
success = this.generateMainProjectSBOM() && success;
|
|
347
|
+
|
|
348
|
+
// Generate example project SBOM
|
|
349
|
+
console.log('\n📦 Processing example project...');
|
|
350
|
+
success = this.generateExampleProjectSBOM() && success;
|
|
351
|
+
|
|
352
|
+
if (success) {
|
|
353
|
+
console.log('\n✅ SBOM generation completed successfully');
|
|
354
|
+
} else {
|
|
355
|
+
console.log('\n❌ SBOM generation completed with errors');
|
|
356
|
+
process.exit(1);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Execute if run directly
|
|
362
|
+
if (require.main === module) {
|
|
363
|
+
const generator = new SBOMGenerator();
|
|
364
|
+
generator.run();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
module.exports = SBOMGenerator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraCore'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'HydraCore is the core framework of the Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraCore.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.vendored_frameworks = 'Frameworks/HydraCore.xcframework'
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraInAppMessage'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'In-app messaging for Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraInAppMessage.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.dependency 'HydraCore', s.version.to_s
|
|
13
|
+
s.dependency 'HydraPushNotification', s.version.to_s
|
|
14
|
+
s.vendored_frameworks = 'Frameworks/HydraInAppMessage.xcframework'
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraInboxCore'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'Inbox core for Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraInboxCore.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.dependency 'HydraCore', s.version.to_s
|
|
13
|
+
s.dependency 'HydraPushNotification', s.version.to_s
|
|
14
|
+
s.vendored_frameworks = 'Frameworks/HydraInboxCore.xcframework'
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraInboxUI'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'Inbox UI for Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraInboxUI.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.dependency 'HydraCore', s.version.to_s
|
|
13
|
+
s.dependency 'HydraInboxCore', s.version.to_s
|
|
14
|
+
s.vendored_frameworks = 'Frameworks/HydraInboxUI.xcframework'
|
|
15
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraPushNotification'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'Push notification support for Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraPushNotification.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.dependency 'HydraCore', s.version.to_s
|
|
13
|
+
s.vendored_frameworks = 'Frameworks/HydraPushNotification.xcframework'
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'HydraPushNotificationServiceExtension'
|
|
3
|
+
s.version = HYDRA_SPM_REQUIREMENT[:version]
|
|
4
|
+
s.summary = 'Push notification service extension for Hydra SDK.'
|
|
5
|
+
s.homepage = 'https://github.com/Capillary/hydra-ios-sdk-spm'
|
|
6
|
+
s.license = { :type => 'Proprietary', :text => 'Copyright Capillary, Inc. All rights reserved.' }
|
|
7
|
+
s.authors = 'Capillary, Inc.'
|
|
8
|
+
s.source = { :http => "https://github.com/Capillary/hydra-ios-sdk-spm/releases/download/#{s.version}/HydraPushNotificationServiceExtension.zip" }
|
|
9
|
+
s.ios.deployment_target = '13.0'
|
|
10
|
+
s.swift_version = '5.10'
|
|
11
|
+
|
|
12
|
+
s.dependency 'HydraCore', s.version.to_s
|
|
13
|
+
s.dependency 'HydraPushNotification', s.version.to_s
|
|
14
|
+
s.vendored_frameworks = 'Frameworks/HydraPushNotificationServiceExtension.xcframework'
|
|
15
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
bannerId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>(
|
|
9
|
+
'GamificationBannerView'
|
|
10
|
+
) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
embedId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>(
|
|
9
|
+
'GamificationEmbedView'
|
|
10
|
+
) as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
loyaltyId: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>(
|
|
9
|
+
'GamificationLoyaltyView'
|
|
10
|
+
) as HostComponent<NativeProps>;
|