From e1315f53d9fcd948a6950eafe0b9990a0f46a3d5 Mon Sep 17 00:00:00 2001 From: Vinesh Raju Date: Thu, 22 Jun 2023 08:59:17 +0530 Subject: [PATCH 001/259] Fix querying for userId when it is not present --- .../com/intercom/reactnative/IntercomModule.java | 16 ++++++++-------- example/ios/Podfile.lock | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/android/src/main/java/com/intercom/reactnative/IntercomModule.java b/android/src/main/java/com/intercom/reactnative/IntercomModule.java index f13accca..646fb752 100644 --- a/android/src/main/java/com/intercom/reactnative/IntercomModule.java +++ b/android/src/main/java/com/intercom/reactnative/IntercomModule.java @@ -136,16 +136,16 @@ public void loginUserWithUserAttributes(ReadableMap params, Promise promise) { Boolean hasEmail = params.hasKey("email") && IntercomHelpers.getValueAsStringForKey(params, "email").length() > 0; Boolean hasUserId = params.hasKey("userId") && IntercomHelpers.getValueAsStringForKey(params, "userId").length() > 0; Registration registration = null; - String userId = IntercomHelpers.getValueAsStringForKey(params, "userId"); - if (hasEmail) { + if (hasEmail && hasUserId) { String email = IntercomHelpers.getValueAsStringForKey(params, "email"); - if (hasUserId) { - registration = new Registration().withEmail(email).withUserId(userId); - } else { - registration = Registration.create().withEmail(email); - } + String userId = IntercomHelpers.getValueAsStringForKey(params, "userId"); + registration = new Registration().withEmail(email).withUserId(userId); + } else if (hasEmail) { + String email = IntercomHelpers.getValueAsStringForKey(params, "email"); + registration = new Registration().withEmail(email); } else if (hasUserId) { - registration = Registration.create().withUserId(userId); + String userId = IntercomHelpers.getValueAsStringForKey(params, "userId"); + registration = new Registration().withUserId(userId); } else { Log.e(NAME, "loginUserWithUserAttributes called with invalid userId or email"); Log.e(NAME, "You must provide userId or email"); diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index c4985181..8c82d48c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -74,7 +74,7 @@ PODS: - fmt (6.2.1) - glog (0.3.5) - Intercom (15.0.0) - - intercom-react-native (5.0.0): + - intercom-react-native (5.1.1): - Intercom (~> 15.0.0) - React-Core - libevent (2.1.12) @@ -534,7 +534,7 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b Intercom: c4d9286eb12277dd104e7a49aead819337772716 - intercom-react-native: 83a85583016a294827177465301795ec46e5a310 + intercom-react-native: a9174e41c57228fa94ee832f771b6977826254a3 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda From 2d186a4ac9b117f5001305c87a9276a82d0cd0e6 Mon Sep 17 00:00:00 2001 From: Katherine P Brennan Date: Fri, 30 Jun 2023 12:12:03 +0100 Subject: [PATCH 002/259] Update Intercom iOS version to 15.0.1 --- example/ios/Podfile.lock | 10 +++++----- intercom-react-native.podspec | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 8c82d48c..fdf829af 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -73,9 +73,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - Intercom (15.0.0) - - intercom-react-native (5.1.1): - - Intercom (~> 15.0.0) + - Intercom (15.0.1) + - intercom-react-native (5.1.2): + - Intercom (~> 15.0.1) - React-Core - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) @@ -533,8 +533,8 @@ SPEC CHECKSUMS: FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Intercom: c4d9286eb12277dd104e7a49aead819337772716 - intercom-react-native: a9174e41c57228fa94ee832f771b6977826254a3 + Intercom: fb5a9c701c04d10379b6db4cdc96028ca1b09bea + intercom-react-native: 85fd0015e139de7e3de7e099acd464402084edae libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda diff --git a/intercom-react-native.podspec b/intercom-react-native.podspec index f4ef7221..49dd1d30 100644 --- a/intercom-react-native.podspec +++ b/intercom-react-native.podspec @@ -17,5 +17,5 @@ Pod::Spec.new do |s| s.resource_bundles = { 'IntercomFramework' => ['ios/assets/*'] } s.dependency "React-Core" - s.dependency "Intercom", '~> 15.0.0' + s.dependency "Intercom", '~> 15.0.1' end diff --git a/package.json b/package.json index 306ef45b..a284093a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@intercom/intercom-react-native", - "version": "5.1.1", + "version": "5.1.2", "description": "React Native wrapper to bridge our iOS and Android SDK", "main": "lib/commonjs/index", "module": "lib/module/index", From bcc4050321fdeb28a9dccf8040b4d3b4b1793703 Mon Sep 17 00:00:00 2001 From: Katherine P Brennan Date: Wed, 5 Jul 2023 10:29:18 +0100 Subject: [PATCH 003/259] update to use iOS SDK version 15.0.2 --- example/ios/Podfile.lock | 8 ++++---- intercom-react-native.podspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index fdf829af..1dd2e76f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -73,9 +73,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - Intercom (15.0.1) + - Intercom (15.0.2) - intercom-react-native (5.1.2): - - Intercom (~> 15.0.1) + - Intercom (~> 15.0.2) - React-Core - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) @@ -533,8 +533,8 @@ SPEC CHECKSUMS: FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Intercom: fb5a9c701c04d10379b6db4cdc96028ca1b09bea - intercom-react-native: 85fd0015e139de7e3de7e099acd464402084edae + Intercom: bb499c2bdeacaabb498c94572afa5fcfd74294eb + intercom-react-native: 00d89b6267abc4470949a071bfac4550fbeb6deb libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda diff --git a/intercom-react-native.podspec b/intercom-react-native.podspec index 49dd1d30..86c9b33e 100644 --- a/intercom-react-native.podspec +++ b/intercom-react-native.podspec @@ -17,5 +17,5 @@ Pod::Spec.new do |s| s.resource_bundles = { 'IntercomFramework' => ['ios/assets/*'] } s.dependency "React-Core" - s.dependency "Intercom", '~> 15.0.1' + s.dependency "Intercom", '~> 15.0.2' end From 6ffc974beaf0b816730735c261123ecc28778fc7 Mon Sep 17 00:00:00 2001 From: Uddish Verma Date: Sat, 15 Jul 2023 18:25:06 +0100 Subject: [PATCH 004/259] refactor complete UI --- example/ios/.ruby-version | 1 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + example/ios/Podfile.lock | 2 +- example/src/App.tsx | 250 +++++++++--------- example/src/Input.tsx | 11 +- example/src/RNButton.tsx | 47 ++++ ios/.ruby-version | 1 + 7 files changed, 184 insertions(+), 136 deletions(-) create mode 100644 example/ios/.ruby-version create mode 100644 example/ios/IntercomReactNativeExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 example/src/RNButton.tsx create mode 100644 ios/.ruby-version diff --git a/example/ios/.ruby-version b/example/ios/.ruby-version new file mode 100644 index 00000000..1f7da99d --- /dev/null +++ b/example/ios/.ruby-version @@ -0,0 +1 @@ +2.7.7 diff --git a/example/ios/IntercomReactNativeExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/IntercomReactNativeExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/example/ios/IntercomReactNativeExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index c4985181..2aaa4a9f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -571,4 +571,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9f0fd08562d3218b07861937dd89c963bff7aaa8 -COCOAPODS: 1.12.1 +COCOAPODS: 1.11.3 diff --git a/example/src/App.tsx b/example/src/App.tsx index 5ccf3316..7560729f 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -20,7 +20,7 @@ import Intercom, { IntercomContent, } from '@intercom/intercom-react-native'; -import Button from './Button'; +import RNButton from './RNButton'; import Input from './Input'; import Config from 'react-native-config'; import AsyncStorage from '@react-native-async-storage/async-storage'; @@ -139,45 +139,23 @@ export default function App() { Intercom Example App - - - - - In App Message Visibility:{' \n'} - - {inAppMessageVisibility ? Visibility.VISIBLE : Visibility.GONE} - - - - - - Launcher Visibility:{' \n'} - - {launcherVisibility ? Visibility.VISIBLE : Visibility.GONE} - - - - + - Bottom padding: {bottomPadding} - - - Unread messages count: {count} + Unread messages count: {count} - Is logged in: - {loggedUser ? 'YES' : 'NO'} + {`Logged In: ${loggedUser ? 'Yes' : 'No'}`} -