diff --git a/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj b/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj index 0b451192f..586ea3135 100644 --- a/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj +++ b/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcodeproj/project.pbxproj @@ -486,6 +486,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; INFOPLIST_FILE = AnalyticsReactNativeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -513,6 +514,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = AnalyticsReactNativeExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/examples/AnalyticsReactNativeExample/ios/AnalyticsReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/examples/AnalyticsReactNativeExample/ios/Podfile.lock b/examples/AnalyticsReactNativeExample/ios/Podfile.lock index aaae785d6..b94c583f7 100644 --- a/examples/AnalyticsReactNativeExample/ios/Podfile.lock +++ b/examples/AnalyticsReactNativeExample/ios/Podfile.lock @@ -499,11 +499,11 @@ PODS: - RNScreens (3.27.0): - RCT-Folly (= 2021.07.22.00) - React-Core - - segment-analytics-react-native (2.18.0): + - segment-analytics-react-native (2.19.2): - React-Core - sovran-react-native - SocketRocket (0.6.1) - - sovran-react-native (1.1.0): + - sovran-react-native (1.1.1): - React-Core - Yoga (1.14.0) - YogaKit (1.18.1): @@ -752,12 +752,12 @@ SPEC CHECKSUMS: RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741 RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581 - segment-analytics-react-native: abcd50e51633527c8b116a8b14780e8e4e5ad9d1 + segment-analytics-react-native: 962494a9edbe3f6c5829e3b471484c85c304601c SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - sovran-react-native: 26dc5e42e618e311bb93d6e825e80af1934b8887 + sovran-react-native: e6a9c963a8a6b9ebc3563394c39c30f33ab1453f Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 329f06ebb76294acf15c298d0af45530e2797740 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/examples/E2E/ios/Podfile.lock b/examples/E2E/ios/Podfile.lock index 8ddba76fb..36c20f909 100644 --- a/examples/E2E/ios/Podfile.lock +++ b/examples/E2E/ios/Podfile.lock @@ -499,11 +499,11 @@ PODS: - RNScreens (3.27.0): - RCT-Folly (= 2021.07.22.00) - React-Core - - segment-analytics-react-native (2.18.0): + - segment-analytics-react-native (2.19.2): - React-Core - sovran-react-native - SocketRocket (0.6.1) - - sovran-react-native (1.1.0): + - sovran-react-native (1.1.1): - React-Core - Yoga (1.14.0) - YogaKit (1.18.1): @@ -752,12 +752,12 @@ SPEC CHECKSUMS: RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741 RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581 - segment-analytics-react-native: abcd50e51633527c8b116a8b14780e8e4e5ad9d1 + segment-analytics-react-native: 962494a9edbe3f6c5829e3b471484c85c304601c SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - sovran-react-native: 26dc5e42e618e311bb93d6e825e80af1934b8887 + sovran-react-native: e6a9c963a8a6b9ebc3563394c39c30f33ab1453f Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 9d352ca8db1e31a063d2585ed47fdadabf87fe90 -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/packages/core/src/__tests__/analytics.test.ts b/packages/core/src/__tests__/analytics.test.ts index 0e575b88d..2f6122338 100644 --- a/packages/core/src/__tests__/analytics.test.ts +++ b/packages/core/src/__tests__/analytics.test.ts @@ -128,8 +128,7 @@ describe('SegmentClient', () => { describe('#reset', () => { it('resets all userInfo except anonymousId', async () => { client = new SegmentClient(clientArgs); - const setUserInfo = jest.spyOn(store.userInfo, 'set'); - + const setUserInfo = jest.spyOn(client.userInfo, 'set'); await client.reset(false); expect(setUserInfo).toHaveBeenCalledWith({ @@ -141,8 +140,7 @@ describe('SegmentClient', () => { it('resets user data, identity, traits', async () => { client = new SegmentClient(clientArgs); - const setUserInfo = jest.spyOn(store.userInfo, 'set'); - + const setUserInfo = jest.spyOn(client.userInfo, 'set'); await client.reset(); expect(setUserInfo).toHaveBeenCalledWith({ diff --git a/packages/core/src/analytics.ts b/packages/core/src/analytics.ts index 8d7bdac0c..eca237883 100644 --- a/packages/core/src/analytics.ts +++ b/packages/core/src/analytics.ts @@ -579,7 +579,7 @@ export class SegmentClient { async alias(newUserId: string) { // We don't use a concurrency safe version of get here as we don't want to lock the values yet, // we will update the values correctly when InjectUserInfo processes the change - const { anonymousId, userId: previousUserId } = this.userInfo.get(); + const { anonymousId, userId: previousUserId } = this.store.userInfo.get(); const event = createAliasEvent({ anonymousId, @@ -695,10 +695,10 @@ export class SegmentClient { async reset(resetAnonymousId = true) { try { - const { anonymousId: currentId } = await this.userInfo.get(true); + const { anonymousId: currentId } = await this.store.userInfo.get(true); const anonymousId = resetAnonymousId === true ? getUUID() : currentId; - await this.userInfo.set({ + await this.store.userInfo.set({ anonymousId, userId: undefined, traits: undefined, diff --git a/packages/plugins/plugin-appsflyer/package.json b/packages/plugins/plugin-appsflyer/package.json index 764acde3f..83cb8fc9b 100644 --- a/packages/plugins/plugin-appsflyer/package.json +++ b/packages/plugins/plugin-appsflyer/package.json @@ -1,6 +1,6 @@ { "name": "@segment/analytics-react-native-plugin-appsflyer", - "version": "0.6.0", + "version": "0.7.0", "description": "The hassle-free way to add Segment analytics to your React-Native app.", "main": "lib/commonjs/index", "scripts": { diff --git a/packages/plugins/plugin-branch/package.json b/packages/plugins/plugin-branch/package.json index 2f7c543d4..5125238e5 100644 --- a/packages/plugins/plugin-branch/package.json +++ b/packages/plugins/plugin-branch/package.json @@ -1,6 +1,6 @@ { "name": "@segment/analytics-react-native-plugin-branch", - "version": "1.1.1", + "version": "1.1.2", "description": "The hassle-free way to add Segment analytics to your React-Native app.", "main": "lib/commonjs/index", "scripts": { diff --git a/packages/plugins/plugin-braze/package.json b/packages/plugins/plugin-braze/package.json index 09fca8447..943e2376b 100644 --- a/packages/plugins/plugin-braze/package.json +++ b/packages/plugins/plugin-braze/package.json @@ -1,6 +1,6 @@ { "name": "@segment/analytics-react-native-plugin-braze", - "version": "0.6.1", + "version": "0.7.0", "description": "The hassle-free way to add Segment analytics to your React-Native app.", "main": "lib/commonjs/index", "scripts": { diff --git a/packages/plugins/plugin-facebook-app-events/package.json b/packages/plugins/plugin-facebook-app-events/package.json index 5ae44d2e7..67d08ca17 100644 --- a/packages/plugins/plugin-facebook-app-events/package.json +++ b/packages/plugins/plugin-facebook-app-events/package.json @@ -1,6 +1,6 @@ { "name": "@segment/analytics-react-native-plugin-facebook-app-events", - "version": "0.6.1", + "version": "0.7.0", "description": "The hassle-free way to add Segment analytics to your React-Native app.", "main": "lib/commonjs/index", "scripts": { diff --git a/yarn.lock b/yarn.lock index 411b8d688..b56e978ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6246,11 +6246,11 @@ __metadata: linkType: hard "braces@npm:^3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" + version: 3.0.3 + resolution: "braces@npm:3.0.3" dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 languageName: node linkType: hard @@ -8181,12 +8181,12 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 languageName: node linkType: hard