@developer_tribe/react-native-comnyx 0.6.1 → 0.7.0
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/Comnyx.podspec +1 -1
- package/README.md +192 -16
- package/android/build.gradle +13 -1
- package/android/generated/RCTAppDependencyProvider.h +25 -0
- package/android/generated/RCTAppDependencyProvider.mm +55 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/android/generated/ReactAppDependencyProvider.podspec +34 -0
- package/android/generated/jni/RNComnyxSpec-generated.cpp +1 -11
- package/android/generated/jni/RNComnyxSpec.h +0 -7
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +0 -11
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +0 -52
- package/android/src/main/AndroidManifestNew.xml +10 -0
- package/android/src/main/java/com/comnyx/ComnyxModule.kt +107 -5
- package/android/src/main/java/com/comnyx/ComnyxPackage.kt +10 -6
- package/android/src/main/java/com/comnyx/src/messaging/ComnyxMessaging.kt +45 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FCM.kt +38 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +45 -0
- package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt +82 -0
- package/android/src/main/java/com/comnyx/src/messaging/permissions/Permissions.kt +64 -0
- package/ios/APNService.swift +74 -0
- package/ios/Comnyx-Bridging-Header.h +17 -0
- package/ios/Comnyx.m +15 -0
- package/ios/Comnyx.swift +77 -0
- package/ios/ComnyxMessaging.swift +84 -0
- package/ios/PushService.swift +7 -0
- package/lib/commonjs/NativeComnyx.js +9 -0
- package/lib/commonjs/NativeComnyx.js.map +1 -0
- package/lib/commonjs/api/api.js +14 -3
- package/lib/commonjs/api/api.js.map +1 -1
- package/lib/commonjs/api/customers.js +3 -8
- package/lib/commonjs/api/customers.js.map +1 -1
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/components/AppText.js +1 -1
- package/lib/commonjs/components/AppText.js.map +1 -1
- package/lib/commonjs/components/ChatList.js +1 -1
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/CustomerForm.js +2 -4
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +1 -1
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/constants/viewabilityConfig.js.map +1 -0
- package/lib/commonjs/hooks/isRtl.js +1 -1
- package/lib/commonjs/hooks/useLocalize.js +1 -1
- package/lib/commonjs/hooks/useLocalize.js.map +1 -1
- package/lib/commonjs/hooks/usePolling.js +1 -1
- package/lib/commonjs/hooks/usePolling.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +1 -1
- package/lib/commonjs/hooks/useTheme.js.map +1 -1
- package/lib/commonjs/index.js +9 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/index.js +21 -0
- package/lib/commonjs/notifications/index.js.map +1 -0
- package/lib/commonjs/{Accumulator.js → register/Accumulator.js} +8 -1
- package/lib/commonjs/register/Accumulator.js.map +1 -0
- package/lib/commonjs/{collectData.js → register/collectData.js} +2 -0
- package/lib/commonjs/register/collectData.js.map +1 -0
- package/lib/commonjs/register/index.js +17 -0
- package/lib/commonjs/register/index.js.map +1 -0
- package/lib/commonjs/register/init.js +14 -0
- package/lib/commonjs/register/init.js.map +1 -0
- package/lib/commonjs/register/login.js +24 -0
- package/lib/commonjs/register/login.js.map +1 -0
- package/lib/commonjs/register/logout.js +20 -0
- package/lib/commonjs/register/logout.js.map +1 -0
- package/lib/commonjs/{store.js → store/store.js} +3 -2
- package/lib/commonjs/store/store.js.map +1 -0
- package/lib/commonjs/{App.js → support/ComnyxSupport.js} +39 -14
- package/lib/commonjs/support/ComnyxSupport.js.map +1 -0
- package/lib/commonjs/support/index.js +13 -0
- package/lib/commonjs/support/index.js.map +1 -0
- package/lib/commonjs/utils/scalingUtils.js +1 -1
- package/lib/module/NativeComnyx.js +5 -0
- package/lib/module/NativeComnyx.js.map +1 -0
- package/lib/module/api/api.js +11 -3
- package/lib/module/api/api.js.map +1 -1
- package/lib/module/api/customers.js +3 -7
- package/lib/module/api/customers.js.map +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/components/AppText.js +1 -1
- package/lib/module/components/AppText.js.map +1 -1
- package/lib/module/components/ChatList.js +1 -1
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/CustomerForm.js +2 -4
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/MessageInput.js +1 -1
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/constants/viewabilityConfig.js.map +1 -0
- package/lib/module/hooks/isRtl.js +1 -1
- package/lib/module/hooks/isRtl.js.map +1 -1
- package/lib/module/hooks/useLocalize.js +1 -1
- package/lib/module/hooks/useLocalize.js.map +1 -1
- package/lib/module/hooks/usePolling.js +1 -1
- package/lib/module/hooks/usePolling.js.map +1 -1
- package/lib/module/hooks/useTheme.js +1 -1
- package/lib/module/hooks/useTheme.js.map +1 -1
- package/lib/module/index.js +8 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/index.js +19 -0
- package/lib/module/notifications/index.js.map +1 -0
- package/lib/module/{Accumulator.js → register/Accumulator.js} +7 -1
- package/lib/module/register/Accumulator.js.map +1 -0
- package/lib/module/{collectData.js → register/collectData.js} +2 -0
- package/lib/module/register/collectData.js.map +1 -0
- package/lib/module/register/index.js +13 -0
- package/lib/module/register/index.js.map +1 -0
- package/lib/module/register/init.js +10 -0
- package/lib/module/register/init.js.map +1 -0
- package/lib/module/register/login.js +20 -0
- package/lib/module/register/login.js.map +1 -0
- package/lib/module/register/logout.js +16 -0
- package/lib/module/register/logout.js.map +1 -0
- package/lib/module/{store.js → store/store.js} +2 -2
- package/lib/module/store/store.js.map +1 -0
- package/lib/module/{App.js → support/ComnyxSupport.js} +40 -15
- package/lib/module/support/ComnyxSupport.js.map +1 -0
- package/lib/module/support/index.js +4 -0
- package/lib/module/support/index.js.map +1 -0
- package/lib/module/utils/scalingUtils.js +1 -1
- package/lib/module/utils/scalingUtils.js.map +1 -1
- package/lib/typescript/jest.config.d.ts +4 -0
- package/lib/typescript/jest.config.d.ts.map +1 -0
- package/lib/typescript/setup-jest.d.ts +1 -0
- package/lib/typescript/setup-jest.d.ts.map +1 -0
- package/lib/typescript/src/NativeComnyx.d.ts +7 -0
- package/lib/typescript/src/NativeComnyx.d.ts.map +1 -0
- package/lib/typescript/src/api/api.d.ts +7 -0
- package/lib/typescript/src/api/api.d.ts.map +1 -0
- package/lib/typescript/src/api/conversations.d.ts.map +1 -0
- package/lib/typescript/src/api/customers.d.ts +5 -0
- package/lib/typescript/src/api/customers.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/api/index.d.ts +1 -1
- package/lib/typescript/src/api/index.d.ts.map +1 -0
- package/lib/typescript/src/api/messages.d.ts.map +1 -0
- package/lib/typescript/src/components/AppText.d.ts.map +1 -0
- package/lib/typescript/src/components/ChatList.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomAlert.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomerForm.d.ts.map +1 -0
- package/lib/typescript/src/components/EmptyList.d.ts.map +1 -0
- package/lib/typescript/src/components/InitFailed.d.ts.map +1 -0
- package/lib/typescript/src/components/MessageInput.d.ts.map +1 -0
- package/lib/typescript/src/components/MessageItem.d.ts.map +1 -0
- package/lib/typescript/src/components/ScaledSheet.d.ts.map +1 -0
- package/lib/typescript/src/constants/activeOpacity.d.ts.map +1 -0
- package/lib/typescript/src/constants/countries.d.ts.map +1 -0
- package/lib/typescript/src/constants/rtl.d.ts.map +1 -0
- package/lib/typescript/src/constants/translations.d.ts.map +1 -0
- package/lib/typescript/src/constants/viewabilityConfig.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/conversations.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/customers.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/messages.d.ts.map +1 -0
- package/lib/typescript/src/hooks/isRtl.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLocalize.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/notifications/index.d.ts +21 -0
- package/lib/typescript/src/notifications/index.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src/register}/Accumulator.d.ts +4 -3
- package/lib/typescript/src/register/Accumulator.d.ts.map +1 -0
- package/lib/typescript/src/register/collectData.d.ts.map +1 -0
- package/lib/typescript/src/register/index.d.ts +11 -0
- package/lib/typescript/src/register/index.d.ts.map +1 -0
- package/lib/typescript/src/register/init.d.ts +6 -0
- package/lib/typescript/src/register/init.d.ts.map +1 -0
- package/lib/typescript/src/register/login.d.ts +6 -0
- package/lib/typescript/src/register/login.d.ts.map +1 -0
- package/lib/typescript/src/register/logout.d.ts +2 -0
- package/lib/typescript/src/register/logout.d.ts.map +1 -0
- package/lib/typescript/{module/src → src/store}/store.d.ts +6 -4
- package/lib/typescript/src/store/store.d.ts.map +1 -0
- package/lib/typescript/src/support/ComnyxSupport.d.ts +12 -0
- package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -0
- package/lib/typescript/src/support/index.d.ts +2 -0
- package/lib/typescript/src/support/index.d.ts.map +1 -0
- package/lib/typescript/src/types/ApiOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/Conversation.d.ts.map +1 -0
- package/lib/typescript/src/types/Customer.d.ts.map +1 -0
- package/lib/typescript/src/types/GlobalTheme.d.ts.map +1 -0
- package/lib/typescript/src/types/Language.d.ts.map +1 -0
- package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -0
- package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -0
- package/lib/typescript/src/types/Theme.d.ts.map +1 -0
- package/lib/typescript/src/utils/date.d.ts.map +1 -0
- package/lib/typescript/src/utils/deepMap.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatDate.d.ts.map +1 -0
- package/lib/typescript/src/utils/scalingUtils.d.ts.map +1 -0
- package/package.json +13 -27
- package/src/NativeComnyx.ts +6 -5
- package/src/api/api.ts +14 -3
- package/src/api/customers.ts +3 -8
- package/src/api/index.ts +1 -1
- package/src/components/AppText.tsx +1 -1
- package/src/components/ChatList.tsx +1 -1
- package/src/components/CustomerForm.tsx +2 -3
- package/src/components/MessageInput.tsx +1 -1
- package/src/hooks/isRtl.ts +1 -1
- package/src/hooks/useLocalize.ts +1 -1
- package/src/hooks/usePolling.ts +1 -1
- package/src/hooks/useTheme.ts +1 -1
- package/src/index.ts +8 -0
- package/src/notifications/index.ts +49 -0
- package/src/{Accumulator.ts → register/Accumulator.ts} +10 -2
- package/src/{collectData.ts → register/collectData.ts} +1 -0
- package/src/register/index.ts +11 -0
- package/src/register/init.ts +16 -0
- package/src/register/login.ts +23 -0
- package/src/register/logout.ts +14 -0
- package/src/{store.ts → store/store.ts} +7 -7
- package/src/{App.tsx → support/ComnyxSupport.tsx} +41 -14
- package/src/support/index.ts +1 -0
- package/src/utils/scalingUtils.ts +1 -1
- package/android/generated/java/com/comnyx/NativeComnyxSpec.java +0 -37
- package/ios/Comnyx.h +0 -6
- package/ios/Comnyx.mm +0 -18
- package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +0 -39
- package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +0 -63
- package/ios/generated/RNComnyxSpecJSI-generated.cpp +0 -28
- package/ios/generated/RNComnyxSpecJSI.h +0 -71
- package/lib/commonjs/Accumulator.js.map +0 -1
- package/lib/commonjs/App.js.map +0 -1
- package/lib/commonjs/NativeComnyx.ts +0 -8
- package/lib/commonjs/__dev__.js +0 -29
- package/lib/commonjs/__dev__.js.map +0 -1
- package/lib/commonjs/collectData.js.map +0 -1
- package/lib/commonjs/components/SizeMatter.js +0 -27
- package/lib/commonjs/components/SizeMatter.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/register.js +0 -26
- package/lib/commonjs/register.js.map +0 -1
- package/lib/commonjs/store.js.map +0 -1
- package/lib/commonjs/viewabilityConfig.js.map +0 -1
- package/lib/module/Accumulator.js.map +0 -1
- package/lib/module/App.js.map +0 -1
- package/lib/module/NativeComnyx.ts +0 -8
- package/lib/module/__dev__.js +0 -29
- package/lib/module/__dev__.js.map +0 -1
- package/lib/module/collectData.js.map +0 -1
- package/lib/module/components/SizeMatter.js +0 -23
- package/lib/module/components/SizeMatter.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/register.js +0 -22
- package/lib/module/register.js.map +0 -1
- package/lib/module/store.js.map +0 -1
- package/lib/module/viewabilityConfig.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/Accumulator.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/App.d.ts +0 -12
- package/lib/typescript/commonjs/src/App.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NativeComnyx.d.ts +0 -7
- package/lib/typescript/commonjs/src/NativeComnyx.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/__dev__.d.ts +0 -2
- package/lib/typescript/commonjs/src/__dev__.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/api.d.ts +0 -4
- package/lib/typescript/commonjs/src/api/api.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/conversations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/customers.d.ts +0 -6
- package/lib/typescript/commonjs/src/api/customers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/collectData.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/AppText.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/CustomAlert.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/CustomerForm.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/EmptyList.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/InitFailed.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/MessageInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/MessageItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ScaledSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/SizeMatter.d.ts +0 -7
- package/lib/typescript/commonjs/src/components/SizeMatter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/activeOpacity.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/countries.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/rtl.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/translations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/conversations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/customers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/isRtl.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useLocalize.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/usePolling.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -7
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/register.d.ts +0 -5
- package/lib/typescript/commonjs/src/register.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/store.d.ts +0 -40
- package/lib/typescript/commonjs/src/store.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/ApiOptions.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Conversation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Customer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/GlobalTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Language.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/LocalizationKeys.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/MessageResponse.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Theme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/date.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/deepMap.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/formatDate.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/scalingUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/viewabilityConfig.d.ts.map +0 -1
- package/lib/typescript/module/package.json +0 -1
- package/lib/typescript/module/src/Accumulator.d.ts +0 -18
- package/lib/typescript/module/src/Accumulator.d.ts.map +0 -1
- package/lib/typescript/module/src/App.d.ts +0 -12
- package/lib/typescript/module/src/App.d.ts.map +0 -1
- package/lib/typescript/module/src/NativeComnyx.d.ts +0 -7
- package/lib/typescript/module/src/NativeComnyx.d.ts.map +0 -1
- package/lib/typescript/module/src/__dev__.d.ts +0 -2
- package/lib/typescript/module/src/__dev__.d.ts.map +0 -1
- package/lib/typescript/module/src/api/api.d.ts +0 -4
- package/lib/typescript/module/src/api/api.d.ts.map +0 -1
- package/lib/typescript/module/src/api/conversations.d.ts +0 -7
- package/lib/typescript/module/src/api/conversations.d.ts.map +0 -1
- package/lib/typescript/module/src/api/customers.d.ts +0 -6
- package/lib/typescript/module/src/api/customers.d.ts.map +0 -1
- package/lib/typescript/module/src/api/index.d.ts +0 -4
- package/lib/typescript/module/src/api/index.d.ts.map +0 -1
- package/lib/typescript/module/src/api/messages.d.ts +0 -4
- package/lib/typescript/module/src/api/messages.d.ts.map +0 -1
- package/lib/typescript/module/src/collectData.d.ts +0 -3
- package/lib/typescript/module/src/collectData.d.ts.map +0 -1
- package/lib/typescript/module/src/components/AppText.d.ts +0 -14
- package/lib/typescript/module/src/components/AppText.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ChatList.d.ts +0 -4
- package/lib/typescript/module/src/components/ChatList.d.ts.map +0 -1
- package/lib/typescript/module/src/components/CustomAlert.d.ts +0 -15
- package/lib/typescript/module/src/components/CustomAlert.d.ts.map +0 -1
- package/lib/typescript/module/src/components/CustomerForm.d.ts +0 -4
- package/lib/typescript/module/src/components/CustomerForm.d.ts.map +0 -1
- package/lib/typescript/module/src/components/EmptyList.d.ts +0 -2
- package/lib/typescript/module/src/components/EmptyList.d.ts.map +0 -1
- package/lib/typescript/module/src/components/InitFailed.d.ts +0 -6
- package/lib/typescript/module/src/components/InitFailed.d.ts.map +0 -1
- package/lib/typescript/module/src/components/MessageInput.d.ts +0 -5
- package/lib/typescript/module/src/components/MessageInput.d.ts.map +0 -1
- package/lib/typescript/module/src/components/MessageItem.d.ts +0 -6
- package/lib/typescript/module/src/components/MessageItem.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ScaledSheet.d.ts +0 -2
- package/lib/typescript/module/src/components/ScaledSheet.d.ts.map +0 -1
- package/lib/typescript/module/src/components/SizeMatter.d.ts +0 -7
- package/lib/typescript/module/src/components/SizeMatter.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/activeOpacity.d.ts +0 -2
- package/lib/typescript/module/src/constants/activeOpacity.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/countries.d.ts +0 -7
- package/lib/typescript/module/src/constants/countries.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/rtl.d.ts +0 -2
- package/lib/typescript/module/src/constants/rtl.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/translations.d.ts +0 -4
- package/lib/typescript/module/src/constants/translations.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/conversations.d.ts +0 -5
- package/lib/typescript/module/src/data/fake/conversations.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/customers.d.ts +0 -3
- package/lib/typescript/module/src/data/fake/customers.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/messages.d.ts +0 -3
- package/lib/typescript/module/src/data/fake/messages.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/isRtl.d.ts +0 -2
- package/lib/typescript/module/src/hooks/isRtl.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useLocalize.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useLocalize.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/usePolling.d.ts +0 -2
- package/lib/typescript/module/src/hooks/usePolling.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useTheme.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useThemeColors.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -7
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/register.d.ts +0 -5
- package/lib/typescript/module/src/register.d.ts.map +0 -1
- package/lib/typescript/module/src/store.d.ts.map +0 -1
- package/lib/typescript/module/src/types/ApiOptions.d.ts +0 -4
- package/lib/typescript/module/src/types/ApiOptions.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Conversation.d.ts +0 -33
- package/lib/typescript/module/src/types/Conversation.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Customer.d.ts +0 -39
- package/lib/typescript/module/src/types/Customer.d.ts.map +0 -1
- package/lib/typescript/module/src/types/GlobalTheme.d.ts +0 -6
- package/lib/typescript/module/src/types/GlobalTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Language.d.ts +0 -2
- package/lib/typescript/module/src/types/Language.d.ts.map +0 -1
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts +0 -43
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts.map +0 -1
- package/lib/typescript/module/src/types/MessageResponse.d.ts +0 -61
- package/lib/typescript/module/src/types/MessageResponse.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Theme.d.ts +0 -28
- package/lib/typescript/module/src/types/Theme.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/date.d.ts +0 -7
- package/lib/typescript/module/src/utils/date.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/deepMap.d.ts +0 -7
- package/lib/typescript/module/src/utils/deepMap.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/formatDate.d.ts +0 -2
- package/lib/typescript/module/src/utils/formatDate.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/scalingUtils.d.ts +0 -10
- package/lib/typescript/module/src/utils/scalingUtils.d.ts.map +0 -1
- package/lib/typescript/module/src/viewabilityConfig.d.ts +0 -5
- package/lib/typescript/module/src/viewabilityConfig.d.ts.map +0 -1
- package/src/__dev__.ts +0 -22
- package/src/components/SizeMatter.tsx +0 -22
- package/src/index.tsx +0 -9
- package/src/register.ts +0 -29
- /package/lib/commonjs/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
- /package/lib/module/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
- /package/lib/typescript/{commonjs/src → src}/api/conversations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/api/messages.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/AppText.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/ChatList.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/CustomAlert.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/CustomerForm.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/EmptyList.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/InitFailed.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/MessageInput.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/MessageItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/ScaledSheet.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/activeOpacity.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/countries.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/rtl.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/translations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src/constants}/viewabilityConfig.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/conversations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/customers.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/messages.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/isRtl.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useLocalize.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/usePolling.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useTheme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useThemeColors.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src/register}/collectData.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/ApiOptions.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Conversation.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Customer.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/GlobalTheme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Language.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/LocalizationKeys.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/MessageResponse.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Theme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/date.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/deepMap.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/formatDate.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/scalingUtils.d.ts +0 -0
- /package/src/{viewabilityConfig.ts → constants/viewabilityConfig.ts} +0 -0
package/Comnyx.podspec
CHANGED
|
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.platforms = { :ios => min_ios_version_supported }
|
|
14
14
|
s.source = { :git => "https://www.npmjs.com.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
|
-
s.source_files = "ios/**/*.{h,m,mm,cpp}"
|
|
16
|
+
s.source_files = "ios/**/*.{h,m,mm,cpp,m,swift}"
|
|
17
17
|
s.private_header_files = "ios/generated/**/*.h"
|
|
18
18
|
|
|
19
19
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
package/README.md
CHANGED
|
@@ -1,33 +1,209 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Comnyx Push Notification Service Documentation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Basic Setup (Required)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### 1. Initialization and Login
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
7
|
+
```javascript
|
|
8
|
+
// Initialize Comnyx with your token
|
|
9
|
+
Comnyx.init({
|
|
10
|
+
token: 'YOUR_TOKEN',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
// Login with user's external ID
|
|
14
|
+
await Comnyx.login({
|
|
15
|
+
externalId: 'YOUR_USER_ID',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// Logout when needed
|
|
19
|
+
await Comnyx.logout();
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Support Implementation (Optional)
|
|
23
|
+
|
|
24
|
+
### 1. Data Collection
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// Collect relevant user data
|
|
28
|
+
Comnyx.collectData('userType', 'your_user_type');
|
|
29
|
+
Comnyx.collectData('deviceType', 'iOS');
|
|
30
|
+
Comnyx.collectData('userLanguage', 'en');
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Support Component
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
const SupportScreen = () => {
|
|
37
|
+
return (
|
|
38
|
+
<ComnyxSupport
|
|
39
|
+
fake={false}
|
|
40
|
+
language="en"
|
|
41
|
+
theme="dark"
|
|
42
|
+
onBack={() => navigation.goBack()}
|
|
43
|
+
themes={{}}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
9
47
|
```
|
|
10
48
|
|
|
11
|
-
##
|
|
49
|
+
## Push Notifications Setup (Optional)
|
|
12
50
|
|
|
51
|
+
### 1. Account Prerequisites
|
|
13
52
|
|
|
14
|
-
|
|
15
|
-
import { multiply } from 'react-native-comnyx';
|
|
53
|
+
1. Apple Developer Account Setup:
|
|
16
54
|
|
|
17
|
-
|
|
55
|
+
- Go to Apple Developer Account → Keys
|
|
56
|
+
- Generate and download the key file (`.p8`)
|
|
57
|
+
- Upload the `.p8` file to Comnyx panel
|
|
18
58
|
|
|
19
|
-
|
|
59
|
+
2. Firebase Setup:
|
|
60
|
+
- Implement Firebase in your project
|
|
61
|
+
- Obtain Firebase secret key
|
|
62
|
+
- Configure Google Services
|
|
63
|
+
|
|
64
|
+
### 2. iOS Configuration
|
|
65
|
+
|
|
66
|
+
Add to your `Info.plist`:
|
|
67
|
+
|
|
68
|
+
```xml
|
|
69
|
+
<key>NSUserNotificationsUsageDescription</key>
|
|
70
|
+
<string>We need to send you notifications for important updates.</string>
|
|
71
|
+
|
|
72
|
+
<key>NSUserNotificationsEnabled</key>
|
|
73
|
+
<true/>
|
|
74
|
+
|
|
75
|
+
<key>UIBackgroundModes</key>
|
|
76
|
+
<array>
|
|
77
|
+
<string>remote-notification</string>
|
|
78
|
+
</array>
|
|
20
79
|
```
|
|
21
80
|
|
|
81
|
+
### 3. Xcode Settings
|
|
22
82
|
|
|
23
|
-
|
|
83
|
+
1. Enable Remote Notifications:
|
|
24
84
|
|
|
25
|
-
|
|
85
|
+
- Open Xcode → Target's capabilities
|
|
86
|
+
- Enable "Background Modes"
|
|
87
|
+
- Check "Remote Notifications"
|
|
88
|
+
|
|
89
|
+
2. Add Push Notifications:
|
|
90
|
+
- Select target → "Signing & Capabilities"
|
|
91
|
+
- Add "Push Notifications" capability
|
|
92
|
+
|
|
93
|
+
### 4. Notifications Code Setup
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
// Initialize notifications
|
|
97
|
+
await ComnyxNotifications.optIn();
|
|
98
|
+
await ComnyxNotifications.initialize();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 5. Notification Event Listeners
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
// Set up event listeners
|
|
106
|
+
const subscriptions = [
|
|
107
|
+
// Listen for token initialization
|
|
108
|
+
ComnyxNotifications.addEventListener('TOKEN_INIT', (data) => {
|
|
109
|
+
console.info('Token received:', data.token);
|
|
110
|
+
}),
|
|
111
|
+
|
|
112
|
+
// Listen for token initialization failures
|
|
113
|
+
ComnyxNotifications.addEventListener('TOKEN_FAILED', (data) => {
|
|
114
|
+
console.info('Token initialization failed:', data);
|
|
115
|
+
}),
|
|
116
|
+
|
|
117
|
+
// Listen for incoming notifications
|
|
118
|
+
ComnyxNotifications.addEventListener('NOTIFICATION_RECEIVED', (data) => {
|
|
119
|
+
console.info('Notification received:', data);
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
// Listen for notification clicks
|
|
123
|
+
ComnyxNotifications.addEventListener('NOTIFICATION_CLICKED', (data) => {
|
|
124
|
+
console.info('Notification clicked:', data);
|
|
125
|
+
}),
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
// Cleanup subscriptions when component unmounts
|
|
129
|
+
return () => {
|
|
130
|
+
subscriptions.forEach((subscription) => subscription.remove());
|
|
131
|
+
};
|
|
132
|
+
}, []);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Complete Implementation Example
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
import { Comnyx, ComnyxNotifications } from 'comnyx-rn';
|
|
139
|
+
import { useEffect } from 'react';
|
|
140
|
+
|
|
141
|
+
// Basic Setup (Required)
|
|
142
|
+
Comnyx.init({
|
|
143
|
+
token: 'YOUR_TOKEN',
|
|
144
|
+
});
|
|
145
|
+
await Comnyx.login({ externalId: 'USER_ID' });
|
|
146
|
+
|
|
147
|
+
// Support Setup (Optional)
|
|
148
|
+
Comnyx.collectData('userType', 'premium');
|
|
149
|
+
Comnyx.collectData('deviceType', 'iOS');
|
|
150
|
+
Comnyx.collectData('userLanguage', 'en');
|
|
151
|
+
|
|
152
|
+
// Notifications Setup (Optional)
|
|
153
|
+
await ComnyxNotifications.optIn();
|
|
154
|
+
await ComnyxNotifications.initialize();
|
|
155
|
+
|
|
156
|
+
// Notification Event Listeners
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
const subscriptions = [
|
|
159
|
+
ComnyxNotifications.addEventListener('TOKEN_INIT', (data) => {
|
|
160
|
+
console.info('Token received:', data.token);
|
|
161
|
+
}),
|
|
162
|
+
ComnyxNotifications.addEventListener('TOKEN_FAILED', (data) => {
|
|
163
|
+
console.info('Token initialization failed:', data);
|
|
164
|
+
}),
|
|
165
|
+
ComnyxNotifications.addEventListener('NOTIFICATION_RECEIVED', (data) => {
|
|
166
|
+
console.info('Notification received:', data);
|
|
167
|
+
}),
|
|
168
|
+
ComnyxNotifications.addEventListener('NOTIFICATION_CLICKED', (data) => {
|
|
169
|
+
console.info('Notification clicked:', data);
|
|
170
|
+
}),
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
return () => {
|
|
174
|
+
subscriptions.forEach((subscription) => subscription.remove());
|
|
175
|
+
};
|
|
176
|
+
}, []);
|
|
177
|
+
|
|
178
|
+
// Support Screen Component
|
|
179
|
+
const SupportScreen = () => {
|
|
180
|
+
return (
|
|
181
|
+
<ComnyxSupport
|
|
182
|
+
fake={false}
|
|
183
|
+
language="en"
|
|
184
|
+
theme="dark"
|
|
185
|
+
onBack={() => navigation.goBack()}
|
|
186
|
+
themes={{}}
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Logout when user signs out
|
|
192
|
+
const handleLogout = async () => {
|
|
193
|
+
await Comnyx.logout();
|
|
194
|
+
};
|
|
195
|
+
```
|
|
26
196
|
|
|
27
|
-
##
|
|
197
|
+
## Important Notes
|
|
28
198
|
|
|
29
|
-
|
|
199
|
+
- Replace 'YOUR_TOKEN' with your actual Comnyx token
|
|
200
|
+
- Replace 'USER_ID' with your actual user identification
|
|
201
|
+
- Customize collected data based on your needs
|
|
202
|
+
- Ensure all prerequisites are properly configured
|
|
30
203
|
|
|
31
|
-
|
|
204
|
+
## Troubleshooting
|
|
32
205
|
|
|
33
|
-
|
|
206
|
+
- Verify Xcode capabilities are enabled
|
|
207
|
+
- Confirm `.p8` file is uploaded to Comnyx panel
|
|
208
|
+
- Check Firebase configuration
|
|
209
|
+
- Verify bundle identifier matches Apple Developer account
|
package/android/build.gradle
CHANGED
|
@@ -18,7 +18,6 @@ buildscript {
|
|
|
18
18
|
|
|
19
19
|
apply plugin: "com.android.library"
|
|
20
20
|
apply plugin: "kotlin-android"
|
|
21
|
-
|
|
22
21
|
apply plugin: "com.facebook.react"
|
|
23
22
|
|
|
24
23
|
def getExtOrIntegerDefault(name) {
|
|
@@ -91,6 +90,19 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
91
90
|
dependencies {
|
|
92
91
|
implementation "com.facebook.react:react-android"
|
|
93
92
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
93
|
+
|
|
94
|
+
api('com.google.firebase:firebase-messaging') {
|
|
95
|
+
version {
|
|
96
|
+
require '[21.0.0, 23.4.99]'
|
|
97
|
+
prefer '23.4.0'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
api('com.google.firebase:firebase-analytics') {
|
|
101
|
+
version {
|
|
102
|
+
require '[21.0.0, 23.4.99]'
|
|
103
|
+
prefer '23.4.0'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
94
106
|
}
|
|
95
107
|
|
|
96
108
|
react {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
+
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
+
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
+
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
+
#else
|
|
16
|
+
#import "RCTDependencyProvider.h"
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
+
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTAppDependencyProvider.h"
|
|
9
|
+
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
+
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
+
|
|
12
|
+
@implementation RCTAppDependencyProvider {
|
|
13
|
+
NSArray<NSString *> * _URLRequestHandlerClassNames;
|
|
14
|
+
NSArray<NSString *> * _imageDataDecoderClassNames;
|
|
15
|
+
NSArray<NSString *> * _imageURLLoaderClassNames;
|
|
16
|
+
NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
20
|
+
static dispatch_once_t requestUrlToken;
|
|
21
|
+
dispatch_once(&requestUrlToken, ^{
|
|
22
|
+
self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return _URLRequestHandlerClassNames;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
29
|
+
static dispatch_once_t dataDecoderToken;
|
|
30
|
+
dispatch_once(&dataDecoderToken, ^{
|
|
31
|
+
_imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return _imageDataDecoderClassNames;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
38
|
+
static dispatch_once_t urlLoaderToken;
|
|
39
|
+
dispatch_once(&urlLoaderToken, ^{
|
|
40
|
+
_imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return _imageURLLoaderClassNames;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
47
|
+
static dispatch_once_t nativeComponentsToken;
|
|
48
|
+
dispatch_once(&nativeComponentsToken, ^{
|
|
49
|
+
_thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return _thirdPartyFabricComponents;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
+
|
|
14
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
+
|
|
16
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
+
|
|
10
|
+
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
+
|
|
12
|
+
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
+
{
|
|
14
|
+
return @[
|
|
15
|
+
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
+
{
|
|
21
|
+
return @[
|
|
22
|
+
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
+
{
|
|
28
|
+
return @[
|
|
29
|
+
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@protocol RCTComponentViewProtocol;
|
|
11
|
+
|
|
12
|
+
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
+
|
|
14
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
+
|
|
16
|
+
@end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
+
|
|
14
|
+
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
+
|
|
16
|
+
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
+
{
|
|
18
|
+
return @{
|
|
19
|
+
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
#
|
|
3
|
+
# This source code is licensed under the MIT license found in the
|
|
4
|
+
# LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
6
|
+
version = "0.78.1"
|
|
7
|
+
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
|
+
if version == '1000.0.0'
|
|
9
|
+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
10
|
+
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
11
|
+
else
|
|
12
|
+
source[:tag] = "v#{version}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
Pod::Spec.new do |s|
|
|
16
|
+
s.name = "ReactAppDependencyProvider"
|
|
17
|
+
s.version = version
|
|
18
|
+
s.summary = "The third party dependency provider for the app"
|
|
19
|
+
s.homepage = "https://reactnative.dev/"
|
|
20
|
+
s.documentation_url = "https://reactnative.dev/"
|
|
21
|
+
s.license = "MIT"
|
|
22
|
+
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
23
|
+
s.platforms = min_supported_versions
|
|
24
|
+
s.source = source
|
|
25
|
+
s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
|
|
26
|
+
|
|
27
|
+
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
|
|
28
|
+
s.pod_target_xcconfig = {
|
|
29
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
30
|
+
"DEFINES_MODULE" => "YES"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
s.dependency "ReactCodegen"
|
|
34
|
+
end
|
|
@@ -12,20 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
namespace facebook::react {
|
|
14
14
|
|
|
15
|
-
static facebook::jsi::Value __hostFunction_NativeComnyxSpecJSI_multiply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
-
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, NumberKind, "multiply", "(DD)D", args, count, cachedMethodId);
|
|
18
|
-
}
|
|
19
15
|
|
|
20
|
-
NativeComnyxSpecJSI::NativeComnyxSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
21
|
-
: JavaTurboModule(params) {
|
|
22
|
-
methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxSpecJSI_multiply};
|
|
23
|
-
}
|
|
24
16
|
|
|
25
17
|
std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
26
|
-
|
|
27
|
-
return std::make_shared<NativeComnyxSpecJSI>(params);
|
|
28
|
-
}
|
|
18
|
+
|
|
29
19
|
return nullptr;
|
|
30
20
|
}
|
|
31
21
|
|
|
@@ -16,13 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
namespace facebook::react {
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* JNI C++ class for module 'NativeComnyx'
|
|
21
|
-
*/
|
|
22
|
-
class JSI_EXPORT NativeComnyxSpecJSI : public JavaTurboModule {
|
|
23
|
-
public:
|
|
24
|
-
NativeComnyxSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
-
};
|
|
26
19
|
|
|
27
20
|
|
|
28
21
|
JSI_EXPORT
|
package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp
CHANGED
|
@@ -11,18 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
namespace facebook::react {
|
|
13
13
|
|
|
14
|
-
static jsi::Value __hostFunction_NativeComnyxCxxSpecJSI_multiply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeComnyxCxxSpecJSI *>(&turboModule)->multiply(
|
|
16
|
-
rt,
|
|
17
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
|
|
18
|
-
count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
14
|
|
|
22
|
-
NativeComnyxCxxSpecJSI::NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
23
|
-
: TurboModule("Comnyx", jsInvoker) {
|
|
24
|
-
methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxCxxSpecJSI_multiply};
|
|
25
|
-
}
|
|
26
15
|
|
|
27
16
|
|
|
28
17
|
} // namespace facebook::react
|
|
@@ -15,57 +15,5 @@
|
|
|
15
15
|
namespace facebook::react {
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class JSI_EXPORT NativeComnyxCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual double multiply(jsi::Runtime &rt, double a, double b) = 0;
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
template <typename T>
|
|
28
|
-
class JSI_EXPORT NativeComnyxCxxSpec : public TurboModule {
|
|
29
|
-
public:
|
|
30
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
31
|
-
return delegate_.create(rt, propName);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
35
|
-
return delegate_.getPropertyNames(runtime);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static constexpr std::string_view kModuleName = "Comnyx";
|
|
39
|
-
|
|
40
|
-
protected:
|
|
41
|
-
NativeComnyxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
42
|
-
: TurboModule(std::string{NativeComnyxCxxSpec::kModuleName}, jsInvoker),
|
|
43
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
private:
|
|
47
|
-
class Delegate : public NativeComnyxCxxSpecJSI {
|
|
48
|
-
public:
|
|
49
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
50
|
-
NativeComnyxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
double multiply(jsi::Runtime &rt, double a, double b) override {
|
|
55
|
-
static_assert(
|
|
56
|
-
bridging::getParameterCount(&T::multiply) == 3,
|
|
57
|
-
"Expected multiply(...) to have 3 parameters");
|
|
58
|
-
|
|
59
|
-
return bridging::callFromJs<double>(
|
|
60
|
-
rt, &T::multiply, jsInvoker_, instance_, std::move(a), std::move(b));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private:
|
|
64
|
-
friend class NativeComnyxCxxSpec;
|
|
65
|
-
T *instance_;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
Delegate delegate_;
|
|
69
|
-
};
|
|
70
18
|
|
|
71
19
|
} // namespace facebook::react
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<application>
|
|
3
|
+
<service
|
|
4
|
+
android:name="com.comnyx.messaging.MyFirebaseMessagingService"
|
|
5
|
+
android:priority="-1500"
|
|
6
|
+
android:exported="true">
|
|
7
|
+
<intent-filter>
|
|
8
|
+
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
9
|
+
</intent-filter>
|
|
10
|
+
</service>
|
|
11
|
+
</application>
|
|
2
12
|
</manifest>
|