Skip to content

Commit

Permalink
fix: revert anonId changes (#956)
Browse files Browse the repository at this point in the history
* fix: revert anonId changes

* chore: remove dev team
  • Loading branch information
alanjcharles authored Jun 11, 2024
1 parent e079c71 commit 9857405
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions packages/core/src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9857405

Please sign in to comment.