From b75b4e954c1a1b10145f377df93d51b03b3ab68a Mon Sep 17 00:00:00 2001 From: imKrishh <161830258+krishh@users.noreply.github.com> Date: Thu, 2 May 2024 23:57:02 +0530 Subject: [PATCH 1/6] add: setPageName def for iOS --- ios/SiftReactNative.m | 5 +++++ src/index.tsx | 1 + 2 files changed, 6 insertions(+) diff --git a/ios/SiftReactNative.m b/ios/SiftReactNative.m index 9a6df73..dfdf0e1 100644 --- a/ios/SiftReactNative.m +++ b/ios/SiftReactNative.m @@ -36,4 +36,9 @@ - (dispatch_queue_t)methodQueue [[Sift sharedInstance] upload]; } +RCT_EXPORT_METHOD(setPageName:(NSString *)pageName) { + //TODO: add valid method from SDK [Sift open:pageName]; + NSLog(@"Setting page name: %@", pageName); +} + @end diff --git a/src/index.tsx b/src/index.tsx index fc5c21c..b587a27 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,6 +8,7 @@ type SiftReactNativeType = { serverUrlFormat: string ): void; setUserId(userId: string): void; + setPageName(pageName: string): void; unsetUserId(): void; upload(): void; }; From d03d3d27efe34dda9d52bf34239ee7f6c2358f72 Mon Sep 17 00:00:00 2001 From: imKrishh Date: Fri, 3 May 2024 19:44:11 +0530 Subject: [PATCH 2/6] fix: minimum iOS force pod patch --- example/ios/Podfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index 277ae81..a453104 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -4,6 +4,21 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '12.4' install! 'cocoapods', :deterministic_uuids => false +# Force pods to match minimum iOS version for React Native +# Fixes build issue on Xcode Cloud where some pods +# Use iOS 12 calls despite being set as iOS 11 +def __apply_Xcode_14_3_RC_post_install_workaround(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + minimum_target = 12.4 + if current_target.to_f < 12.4 + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target + end + end + end +end + target 'sample' do config = use_native_modules! @@ -21,7 +36,7 @@ target 'sample' do # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. - :flipper_configuration => FlipperConfiguration.enabled, + # :flipper_configuration => FlipperConfiguration.enabled, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) @@ -39,5 +54,6 @@ target 'sample' do :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) + __apply_Xcode_14_3_RC_post_install_workaround(installer) end end From 34ca5a2528a1f94497fa5ef19c6990c7fc06e49a Mon Sep 17 00:00:00 2001 From: imKrishh Date: Tue, 9 Jul 2024 22:18:43 +0530 Subject: [PATCH 3/6] update: example/sift-react-native version --- example/ios/Podfile.lock | 127 ++------------------------------------- example/package.json | 2 +- 2 files changed, 7 insertions(+), 122 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 14bbe97..1d77333 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,5 @@ PODS: - boost (1.76.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.70.6) - FBReactNativeSpec (0.70.6): @@ -10,72 +9,10 @@ PODS: - React-Core (= 0.70.6) - React-jsi (= 0.70.6) - ReactCommon/turbomodule/core (= 0.70.6) - - Flipper (0.125.0): - - Flipper-Folly (~> 2.6) - - Flipper-RSocket (~> 1.4) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.4.3): - - Flipper-Folly (~> 2.6) - - FlipperKit (0.125.0): - - FlipperKit/Core (= 0.125.0) - - FlipperKit/Core (0.125.0): - - Flipper (~> 0.125.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.125.0): - - Flipper (~> 0.125.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.125.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.125.0) - - FlipperKit/FKPortForwarding (0.125.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.125.0) - - FlipperKit/FlipperKitLayoutHelpers (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0) - - FlipperKit/FlipperKitNetworkPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.125.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.70.6) - libevent (2.1.12) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -368,45 +305,20 @@ PODS: - React-jsi (= 0.70.6) - React-logger (= 0.70.6) - React-perflogger (= 0.70.6) - - Sift (2.1.1) - - sift-react-native (0.1.8): + - Sift (2.1.8) + - sift-react-native (0.1.12): - React - Sift - - SocketRocket (0.6.0) - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.125.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - Flipper-RSocket (= 1.4.3) - - FlipperKit (= 0.125.0) - - FlipperKit/Core (= 0.125.0) - - FlipperKit/CppBridge (= 0.125.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0) - - FlipperKit/FBDefines (= 0.125.0) - - FlipperKit/FKPortForwarding (= 0.125.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0) - - FlipperKit/FlipperKitReactPlugin (= 0.125.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`) - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) @@ -415,7 +327,6 @@ DEPENDENCIES: - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -441,22 +352,9 @@ DEPENDENCIES: SPEC REPOS: trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - Flipper-RSocket - - FlipperKit - fmt - libevent - - OpenSSL-Universal - Sift - - SocketRocket - - YogaKit EXTERNAL SOURCES: boost: @@ -532,24 +430,13 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: 48289402952f4f7a4e235de70a9a590aa0b79ef4 FBReactNativeSpec: dd1186fd05255e3457baa2f4ca65e94c2cd1e3ac - Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 - FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 2af7b7a59128f250adfd86f15aa1d5a2ecd39995 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: e1866f61af7049eb3d8e08e8b133abd38bc1ca7a RCTTypeSafety: 27c2ac1b00609a432ced1ae701247593f07f901e @@ -577,12 +464,10 @@ SPEC CHECKSUMS: React-RCTVibration: c75ceef7aa60a33b2d5731ebe5800ddde40cefc4 React-runtimeexecutor: 15437b576139df27635400de0599d9844f1ab817 ReactCommon: 349be31adeecffc7986a0de875d7fb0dcf4e251c - Sift: 8cd26419e0a9b0d94bd733b296353b68c44192aa - sift-react-native: 9ed8bc21788e3233399eaf196425246442aa7dee - SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 + Sift: 6cab8e5870e9e48d61ec69a258a6da6bee592dec + sift-react-native: 544656c6c977ddb41f6c1f6f379e76cbabbb79ea Yoga: 99caf8d5ab45e9d637ee6e0174ec16fbbb01bcfc - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: c77089403b1e6de7ca7adfa263fe833cec89b672 +PODFILE CHECKSUM: e3ad5cf1ed8f2a1a8b857c829defbd6807ae58d6 -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.3 diff --git a/example/package.json b/example/package.json index ea19c0e..78d4c7c 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "dependencies": { "react": "18.1.0", "react-native": "0.70.6", - "sift-react-native": "^0.1.8" + "sift-react-native": "^0.1.12" }, "devDependencies": { "@babel/core": "^7.12.9", From 0b1e93c08cba129adc7660207d8c3841f4cf7264 Mon Sep 17 00:00:00 2001 From: imKrishh Date: Tue, 30 Jul 2024 20:11:25 +0530 Subject: [PATCH 4/6] Revert "add: setPageName def for iOS" This reverts commit b75b4e954c1a1b10145f377df93d51b03b3ab68a. --- ios/SiftReactNative.m | 5 ----- src/index.tsx | 1 - 2 files changed, 6 deletions(-) diff --git a/ios/SiftReactNative.m b/ios/SiftReactNative.m index dfdf0e1..9a6df73 100644 --- a/ios/SiftReactNative.m +++ b/ios/SiftReactNative.m @@ -36,9 +36,4 @@ - (dispatch_queue_t)methodQueue [[Sift sharedInstance] upload]; } -RCT_EXPORT_METHOD(setPageName:(NSString *)pageName) { - //TODO: add valid method from SDK [Sift open:pageName]; - NSLog(@"Setting page name: %@", pageName); -} - @end diff --git a/src/index.tsx b/src/index.tsx index b587a27..fc5c21c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,7 +8,6 @@ type SiftReactNativeType = { serverUrlFormat: string ): void; setUserId(userId: string): void; - setPageName(pageName: string): void; unsetUserId(): void; upload(): void; }; From 14632f3fac2ec4b0ecefed458d7813495773a9ca Mon Sep 17 00:00:00 2001 From: imKrishh Date: Tue, 30 Jul 2024 20:13:49 +0530 Subject: [PATCH 5/6] Revert "fix: minimum iOS force pod patch" This reverts commit d03d3d27efe34dda9d52bf34239ee7f6c2358f72. --- example/ios/Podfile | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index a453104..277ae81 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -4,21 +4,6 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '12.4' install! 'cocoapods', :deterministic_uuids => false -# Force pods to match minimum iOS version for React Native -# Fixes build issue on Xcode Cloud where some pods -# Use iOS 12 calls despite being set as iOS 11 -def __apply_Xcode_14_3_RC_post_install_workaround(installer) - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] - minimum_target = 12.4 - if current_target.to_f < 12.4 - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target - end - end - end -end - target 'sample' do config = use_native_modules! @@ -36,7 +21,7 @@ target 'sample' do # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. - # :flipper_configuration => FlipperConfiguration.enabled, + :flipper_configuration => FlipperConfiguration.enabled, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) @@ -54,6 +39,5 @@ target 'sample' do :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) - __apply_Xcode_14_3_RC_post_install_workaround(installer) end end From 6077c02993298f9c3d03ec0bcb8a88f678555792 Mon Sep 17 00:00:00 2001 From: imKrishh Date: Wed, 14 Aug 2024 21:47:06 +0530 Subject: [PATCH 6/6] chore: bump Sift iOS SDK version to 2.2.0 --- example/ios/Podfile.lock | 10 +++++----- ios/SiftReactNative.xcodeproj/project.pbxproj | 6 +++--- .../xcshareddata/swiftpm/Package.resolved | 7 ++++--- package.json | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1d77333..b05ca69 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -305,8 +305,8 @@ PODS: - React-jsi (= 0.70.6) - React-logger (= 0.70.6) - React-perflogger (= 0.70.6) - - Sift (2.1.8) - - sift-react-native (0.1.12): + - Sift (2.2.0) + - sift-react-native (0.1.13): - React - Sift - Yoga (1.14.0) @@ -464,10 +464,10 @@ SPEC CHECKSUMS: React-RCTVibration: c75ceef7aa60a33b2d5731ebe5800ddde40cefc4 React-runtimeexecutor: 15437b576139df27635400de0599d9844f1ab817 ReactCommon: 349be31adeecffc7986a0de875d7fb0dcf4e251c - Sift: 6cab8e5870e9e48d61ec69a258a6da6bee592dec - sift-react-native: 544656c6c977ddb41f6c1f6f379e76cbabbb79ea + Sift: 36971c522cd137245438cb9ed2ffd3a42eadfc15 + sift-react-native: 2dbf427e81c1feb17cbc96479e3618b8244b9abc Yoga: 99caf8d5ab45e9d637ee6e0174ec16fbbb01bcfc -PODFILE CHECKSUM: e3ad5cf1ed8f2a1a8b857c829defbd6807ae58d6 +PODFILE CHECKSUM: 46a8806098437f64bb2407b1210c09c7d164f0ac COCOAPODS: 1.14.3 diff --git a/ios/SiftReactNative.xcodeproj/project.pbxproj b/ios/SiftReactNative.xcodeproj/project.pbxproj index ce320fd..13fb147 100644 --- a/ios/SiftReactNative.xcodeproj/project.pbxproj +++ b/ios/SiftReactNative.xcodeproj/project.pbxproj @@ -3,11 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 137F094D26B00BA30015EE5D /* sift-ios in Frameworks */ = {isa = PBXBuildFile; productRef = 137F094C26B00BA30015EE5D /* sift-ios */; }; + 137F094D26B00BA30015EE5D /* sift-ios in Frameworks */ = {isa = PBXBuildFile; productRef = 137F094C26B00BA30015EE5D /* sift-ios */; settings = {ATTRIBUTES = (Required, ); }; }; 5E555C0D2413F4C50049A1A2 /* SiftReactNative.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* SiftReactNative.mm */; }; 8414ADCA24C6930C0081CBEE /* SiftReactNative.m in Sources */ = {isa = PBXBuildFile; fileRef = 8414ADC924C6930C0081CBEE /* SiftReactNative.m */; }; /* End PBXBuildFile section */ @@ -286,7 +286,7 @@ repositoryURL = "https://github.com/SiftScience/sift-ios.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 2.0.4; + minimumVersion = 2.2.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/ios/SiftReactNative.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/SiftReactNative.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ac1f919..78f3688 100644 --- a/ios/SiftReactNative.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/SiftReactNative.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,14 +1,15 @@ { + "originHash" : "90ab007ed727c48ed41e0a767f60bc5cd3dedb1f218f24fbf5b49a73a8f234f7", "pins" : [ { "identity" : "sift-ios", "kind" : "remoteSourceControl", "location" : "https://github.com/SiftScience/sift-ios.git", "state" : { - "revision" : "46bf3b54f5d231dc4b565d27108de4f823117413", - "version" : "2.1.1" + "revision" : "b4306efc99888568a670a2b921fccf28262b2ce3", + "version" : "2.2.0" } } ], - "version" : 2 + "version" : 3 } diff --git a/package.json b/package.json index e4f3dd2..b674b7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sift-react-native", - "version": "0.1.12", + "version": "0.1.13", "description": "A React Native wrapper for Sift iOS and Android SDKs", "main": "lib/commonjs/index", "module": "lib/module/index",