Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pulling release/1.28.0 into master #527

Merged
merged 5 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: "BUG : <Title>"
labels: bug, open source
assignees: pallabmaiti
assignees: "@rudderlabs/sdk-ios"
---

**Describe the bug**
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/draft-new-release-v2.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Draft new release(v2)

on:
workflow_dispatch
on: workflow_dispatch

jobs:
draft-new-release:
Expand All @@ -18,7 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 16

# In order to make a commit, we need to initialize a user.
# You may choose to write something less generic here if you want, it doesn't matter functionality wise.
- name: Initialize mandatory git config
Expand All @@ -39,7 +38,7 @@ jobs:
git fetch --tags origin
git merge origin/master-v2
current_version=$(jq -r .version package.json)

npx standard-version --skip.commit --skip.tag --skip.changelog
new_version=$(jq -r .version package.json)
git reset --hard
Expand All @@ -53,7 +52,7 @@ jobs:
echo "New release branch name is $branch_name"
git checkout -b "$branch_name"
git push --set-upstream origin "$branch_name"

echo "source_branch_name=$source_branch_name" >> $GITHUB_OUTPUT
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "new_version=$new_version" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -84,8 +83,8 @@ jobs:
uses: repo-sync/pull-request@v2
with:
source_branch: ${{ steps.create-release.outputs.branch_name }}
destination_branch: 'master-v2'
destination_branch: "master-v2"
github_token: ${{ secrets.PAT }}
pr_title: "chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master"
pr_body: ":crown: *An automated PR*\n\n${{ steps.finish-release.outputs.commit_summary }}"
pr_reviewer: 'pallabmaiti'
pr_reviewer: "@rudderlabs/sdk-ios"
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.28.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.27.0...v1.28.0) (2024-08-07)


### Features

* implement exponential retry mechanism for handling network errors ([#525](https://github.com/rudderlabs/rudder-sdk-ios/issues/525)) ([8bf2900](https://github.com/rudderlabs/rudder-sdk-ios/commit/8bf2900710f06e6c9f268bd6fa4e405bcaa417ed))


### Bug Fixes

* set anonymousId in traits when second Identify event is made ([#526](https://github.com/rudderlabs/rudder-sdk-ios/issues/526)) ([b52251b](https://github.com/rudderlabs/rudder-sdk-ios/commit/b52251b8b5afeef8994a9f711c634b429659ac26))

## [1.27.0](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.26.2...v1.27.0) (2024-06-13)


Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PODS:
- RSCrashReporter (= 1.0.1)
- RudderKit (= 1.4.0)
- RSCrashReporter (1.0.1)
- Rudder (1.26.3):
- Rudder (1.27.0):
- MetricsReporter (= 1.2.1)
- RudderKit (1.4.0)
- SQLCipher (4.5.4):
Expand Down Expand Up @@ -33,7 +33,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
MetricsReporter: 99596ee5003c69949ed2f50acc34aee83c42f843
RSCrashReporter: 6b8376ac729b0289ebe0908553e5f56d8171f313
Rudder: 23456f79749849870e18c45bd250d6e2229a7147
Rudder: 3cfcd9e6c5359cd6d49f411101ed9b894e3b64bd
RudderKit: d9d6997696e1642b753d8bdf94e57af643a68f03
SQLCipher: 905b145f65f349f26da9e60a19901ad24adcd381

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<p align="center">
<a href="https://cocoapods.org/pods/Rudder">
<img src="https://img.shields.io/static/v1?label=pod&message=v1.27.0&color=blue&style=flat">
<img src="https://img.shields.io/static/v1?label=pod&message=v1.28.0&color=blue&style=flat">
</a>
</p>

Expand Down Expand Up @@ -39,15 +39,15 @@ The iOS SDK is available through [**CocoaPods**](https://cocoapods.org), [**Cart
To install the SDK, simply add the following line to your Podfile:

```xcode
pod 'Rudder', '1.27.0'
pod 'Rudder', '1.28.0'
```

### Carthage

For Carthage support, add the following line to your `Cartfile`:

```xcode
github "rudderlabs/rudder-sdk-ios" "v1.27.0"
github "rudderlabs/rudder-sdk-ios" "v1.28.0"
```

> Remember to include the following code in all `.m` and `.h` files where you want to refer to or use the RudderStack SDK classes, as shown:
Expand All @@ -71,7 +71,7 @@ You can also add the RudderStack iOS SDK via Swift Package Mangaer, via one of t

* Enter the package repository (`[email protected]:rudderlabs/rudder-sdk-ios.git`) in the search bar.

* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.27.0` as the value, as shown:
* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.28.0` as the value, as shown:

![Setting dependency](https://user-images.githubusercontent.com/59817155/145574696-8c849749-13e0-40d5-aacb-3fccb5c8e67d.png)

Expand Down Expand Up @@ -99,7 +99,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "[email protected]:rudderlabs/rudder-sdk-ios.git", from: "1.27.0")
.package(url: "[email protected]:rudderlabs/rudder-sdk-ios.git", from: "1.28.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
16 changes: 16 additions & 0 deletions Rudder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
06CABC332630C6B00097BEFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06CABC322630C6B00097BEFF /* Foundation.framework */; };
06CABC352630C6D30097BEFF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06CABC2E2630C6660097BEFF /* UIKit.framework */; };
2FA4A3E2DF0696E8D68B640A /* Pods_Rudder_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F631D98DB26309EFE5E0A24 /* Pods_Rudder_watchOS.framework */; };
535778972C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */ = {isa = PBXBuildFile; fileRef = 535778962C4F8E0000E8CE9B /* RSExponentialBackOff.m */; };
535778982C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 535778952C4F8E0000E8CE9B /* RSExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; };
535778992C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 535778952C4F8E0000E8CE9B /* RSExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; };
5357789A2C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */ = {isa = PBXBuildFile; fileRef = 535778962C4F8E0000E8CE9B /* RSExponentialBackOff.m */; };
5357789B2C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 535778952C4F8E0000E8CE9B /* RSExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; };
5357789C2C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */ = {isa = PBXBuildFile; fileRef = 535778962C4F8E0000E8CE9B /* RSExponentialBackOff.m */; };
5C11F10C96D80DF73DBED732 /* Pods_Rudder_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 447958A767B9B6F9BB3AC36A /* Pods_Rudder_iOS.framework */; };
60DF93A1FA405B16F4D273AB /* Pods_RudderTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F00C6B89DB926A1271D979A /* Pods_RudderTests_iOS.framework */; };
7275AF62B3887AFD09CF49CF /* Pods_RudderTests_watchOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5E0F163A9A54245F87BB53E /* Pods_RudderTests_watchOS.framework */; };
Expand Down Expand Up @@ -762,6 +768,8 @@
3C44A9E8F4B06BD7D1881CC6 /* Pods-RudderTests-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RudderTests-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-RudderTests-watchOS/Pods-RudderTests-watchOS.debug.xcconfig"; sourceTree = "<group>"; };
3F00C6B89DB926A1271D979A /* Pods_RudderTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RudderTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
447958A767B9B6F9BB3AC36A /* Pods_Rudder_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
535778952C4F8E0000E8CE9B /* RSExponentialBackOff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RSExponentialBackOff.h; sourceTree = "<group>"; };
535778962C4F8E0000E8CE9B /* RSExponentialBackOff.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSExponentialBackOff.m; sourceTree = "<group>"; };
767A0EEE9A76F43CF631573B /* Pods-Rudder-watchOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-watchOS.debug.xcconfig"; path = "Target Support Files/Pods-Rudder-watchOS/Pods-Rudder-watchOS.debug.xcconfig"; sourceTree = "<group>"; };
83C9949585CD3C274CCE6A27 /* Pods-Rudder-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-iOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-iOS/Pods-Rudder-iOS.release.xcconfig"; sourceTree = "<group>"; };
9B4BB7D91351507AD413A9B4 /* Pods-Rudder-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Rudder-tvOS/Pods-Rudder-tvOS.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1198,6 +1206,7 @@
F6B4B53529C8237D00344864 /* RSBackGroundModeManager.m */,
ED7DFD8F298C091800ED5A8E /* RSClient.m */,
F6B4B53929C8237D00344864 /* RSCloudModeManager.m */,
535778962C4F8E0000E8CE9B /* RSExponentialBackOff.m */,
ED7DFD89298C091800ED5A8E /* RSConfig.m */,
ED7DFDCE298C091800ED5A8E /* RSConfigBuilder.m */,
ED8DB01D298E206900907EC4 /* RSConsentFilterHandler.m */,
Expand Down Expand Up @@ -1261,6 +1270,7 @@
F6B4B51E29C8236100344864 /* RSBackGroundModeManager.h */,
ED7DFDB9298C091800ED5A8E /* RSClient.h */,
F6B4B51D29C8236100344864 /* RSCloudModeManager.h */,
535778952C4F8E0000E8CE9B /* RSExponentialBackOff.h */,
ED7DFDB4298C091800ED5A8E /* RSConfig.h */,
ED7DFDA5298C091800ED5A8E /* RSConfigBuilder.h */,
ED7DFDAD298C091800ED5A8E /* RSConsentFilter.h */,
Expand Down Expand Up @@ -1555,6 +1565,7 @@
ED7DFE70298C091800ED5A8E /* RSServerDestination.h in Headers */,
ED7DFED9298C091800ED5A8E /* RSProductClickedEvent.h in Headers */,
ED7DFE82298C091800ED5A8E /* RSECommerceCartBuilder.h in Headers */,
535778982C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */,
ED99908E2A6926E000031B06 /* RSMetricsReporter.h in Headers */,
ED7DFE58298C091800ED5A8E /* RSPreferenceManager.h in Headers */,
ED7DFEB7298C091800ED5A8E /* RSPaymentInfoEnteredEvent.h in Headers */,
Expand Down Expand Up @@ -1673,6 +1684,7 @@
ED998E682A69003600031B06 /* RSECommerceCartBuilder.h in Headers */,
ED99908F2A6926E000031B06 /* RSMetricsReporter.h in Headers */,
ED998E692A69003600031B06 /* RSPreferenceManager.h in Headers */,
535778992C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */,
ED998E6A2A69003600031B06 /* RSPaymentInfoEnteredEvent.h in Headers */,
ED998E6B2A69003600031B06 /* RSCartSharedEvent.h in Headers */,
ED998E6C2A69003600031B06 /* RSECommerceEvents.h in Headers */,
Expand Down Expand Up @@ -1791,6 +1803,7 @@
ED998F382A69024E00031B06 /* RSECommerceCartBuilder.h in Headers */,
ED9990902A6926E000031B06 /* RSMetricsReporter.h in Headers */,
ED998F392A69024E00031B06 /* RSPreferenceManager.h in Headers */,
5357789B2C4F8E0000E8CE9B /* RSExponentialBackOff.h in Headers */,
ED998F3A2A69024E00031B06 /* RSPaymentInfoEnteredEvent.h in Headers */,
ED998F3B2A69024E00031B06 /* RSCartSharedEvent.h in Headers */,
ED998F3C2A69024E00031B06 /* RSECommerceEvents.h in Headers */,
Expand Down Expand Up @@ -2378,6 +2391,7 @@
ED7DFE8F298C091800ED5A8E /* RSECommerceSortBuilder.m in Sources */,
ED7DFE3F298C091800ED5A8E /* RSServerDestination.m in Sources */,
ED7DFEB6298C091800ED5A8E /* RSOrderRefundedEvent.m in Sources */,
535778972C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */,
F64116022B68EC4B0015CB42 /* RSDefaultsPersistence.m in Sources */,
ED7DFEC2298C091800ED5A8E /* RSCouponEnteredEvent.m in Sources */,
ED7DFE3E298C091800ED5A8E /* RSApp.m in Sources */,
Expand Down Expand Up @@ -2488,6 +2502,7 @@
ED998EEF2A69003600031B06 /* WKInterfaceController+RSScreen.m in Sources */,
ED998EF02A69003600031B06 /* RSECommerceSortBuilder.m in Sources */,
ED998EF12A69003600031B06 /* RSServerDestination.m in Sources */,
5357789A2C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */,
F64116032B68EC4B0015CB42 /* RSDefaultsPersistence.m in Sources */,
ED998EF22A69003600031B06 /* RSOrderRefundedEvent.m in Sources */,
ED998EF32A69003600031B06 /* RSCouponEnteredEvent.m in Sources */,
Expand Down Expand Up @@ -2598,6 +2613,7 @@
ED998FBF2A69024E00031B06 /* WKInterfaceController+RSScreen.m in Sources */,
ED998FC02A69024E00031B06 /* RSECommerceSortBuilder.m in Sources */,
ED998FC12A69024E00031B06 /* RSServerDestination.m in Sources */,
5357789C2C4F8E0000E8CE9B /* RSExponentialBackOff.m in Sources */,
F64116042B68EC4B0015CB42 /* RSDefaultsPersistence.m in Sources */,
ED998FC22A69024E00031B06 /* RSOrderRefundedEvent.m in Sources */,
ED998FC32A69024E00031B06 /* RSCouponEnteredEvent.m in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions Sources/Classes/Headers/Public/RSConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ extern int const RSATTRestricted;
extern int const RSATTDenied;
extern int const RSATTAuthorize;

extern int const RSExponentialBackOff_InitialDelay;
extern int const RSExponentialBackOff_MinimumDelay;

@end

NS_ASSUME_NONNULL_END
40 changes: 40 additions & 0 deletions Sources/Classes/Headers/Public/RSExponentialBackOff.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//
// RSExponentialBackOff.h
// Rudder
//
// Created by Satheesh Kannan on 23/07/24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
/*!
@brief This class implements an exponential backoff strategy with jitter for handling retries.

@discussion It allows for configurable maximum delay and includes methods to calculate the next delay with jitter and reset the backoff attempts. When the calculated delay reaches or exceeds the maximum delay limit, the backoff resets and starts again from beginning.
*/
@interface RSExponentialBackOff : NSObject

/**
* Init function that accepts the maximum delay value in seconds.
*
* @param seconds Value for maximum delay property
* @return A new instance for this class
*/
- (instancetype)initWithMaximumDelay:(int)seconds;

/**
* Function will calculate the next delay value in seconds
*
* @return Next delay value in seconds
*/
- (int)nextDelay;

/**
* Function will resets the attempts.
*/
- (void)reset;

@end

NS_ASSUME_NONNULL_END
1 change: 1 addition & 0 deletions Sources/Classes/Headers/Public/RSUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (BOOL) isValidIDFA:(NSString*)idfa;
+ (BOOL) isSpecialFloatingNumber:(NSNumber *)number;
+(NSArray*) extractParamFromURL: (NSURL*) deepLinkURL;
+ (NSString *)secondsToString:(int) delay;
extern unsigned int MAX_EVENT_SIZE;
extern unsigned int MAX_BATCH_SIZE;

Expand Down
2 changes: 1 addition & 1 deletion Sources/Classes/Headers/RSVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
#ifndef RSVersion_h
#define RSVersion_h

NSString *const SDK_VERSION = @"1.27.0";
NSString *const SDK_VERSION = @"1.28.0";

#endif /* RSVersion_h */
23 changes: 16 additions & 7 deletions Sources/Classes/RSCloudModeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
#import "RSNetworkManager.h"
#import "RSNetworkResponse.h"
#import "RSMetricsReporter.h"
#import "RSExponentialBackOff.h"
#import "RSConstants.h"

@implementation RSCloudModeManager

@implementation RSCloudModeManager {
RSExponentialBackOff *backOff;
}

- (instancetype)initWithConfig:(RSConfig *) config andDBPersistentManager:(RSDBPersistentManager *) dbPersistentManager andNetworkManager:(RSNetworkManager *) networkManager andLock: (NSLock *) lock {
self = [super init];
Expand All @@ -24,6 +27,7 @@ - (instancetype)initWithConfig:(RSConfig *) config andDBPersistentManager:(RSDBP
self->config = config;
self->lock = lock;
self->cloud_mode_processor_queue = dispatch_queue_create("com.rudder.RSCloudModeManager", NULL);
self->backOff = [[RSExponentialBackOff alloc] initWithMaximumDelay:RSExponentialBackOff_MinimumDelay];
}
return self;
}
Expand Down Expand Up @@ -54,26 +58,31 @@ - (void) startCloudModeProcessor {
[strongSelf->dbPersistentManager updateEventsWithIds:dbMessage.messageIds withStatus:CLOUD_MODE_PROCESSING_DONE];
[strongSelf->dbPersistentManager clearProcessedEventsFromDB];
sleepCount = 0;
[self->backOff reset];
}
}
}
[strongSelf->lock unlock];
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: cloudModeSleepCount: %d", sleepCount]];
sleepCount += 1;

if(response == nil) {
usleep(1000000);
sleep(1);
} else if (response.state == WRONG_WRITE_KEY) {
[RSLogger logError:@"RSCloudModeManager: CloudModeProcessor: Wrong WriteKey. Aborting the Cloud Mode Processor"];
break;
} else if (response.state == INVALID_URL) {
[RSLogger logError:@"RSCloudModeManager: CloudModeProcessor: Invalid Data Plane URL. Aborting the Cloud Mode Processor"];
[RSMetricsReporter report:SDKMETRICS_CM_ATTEMPT_ABORT forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_DATA_PLANE_URL_INVALID} andValue:1];
break;
}
else if (response.state == NETWORK_ERROR) {
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Retrying in: %d s", abs(sleepCount - strongSelf->config.sleepTimeout)]];
} else if (response.state == NETWORK_ERROR) {
int delay = [self->backOff nextDelay];
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Retrying in: %@", [RSUtils secondsToString:delay]]];
[RSMetricsReporter report:SDKMETRICS_CM_ATTEMPT_RETRY forMetricType:COUNT withProperties:nil andValue:1];
usleep(abs(sleepCount - strongSelf->config.sleepTimeout) * 1000000);
sleep(delay);
} else { // To handle the status code RESOURCE_NOT_FOUND(404) & BAD_REQUEST(400)
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Retrying in: 1s"]];
sleep(1);
}
}
});
Expand Down
3 changes: 3 additions & 0 deletions Sources/Classes/RSConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ @implementation RSConstants
int const RSATTDenied = 2;
int const RSATTAuthorize = 3;

int const RSExponentialBackOff_MinimumDelay = 5 * 60; //in seconds..
int const RSExponentialBackOff_InitialDelay = 3; //in seconds..

@end
1 change: 1 addition & 0 deletions Sources/Classes/RSContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ - (void) updateTraits:(RSTraits *)traits {
if(existingId!=nil && userId!=nil && ![existingId isEqual:userId])
{
self->_traits = [[traits dict] mutableCopy];
self->_traits[@"anonymousId"] = [self->preferenceManager getAnonymousId];
[self resetExternalIds];
return;
}
Expand Down
Loading
Loading