Skip to content

Commit

Permalink
chore(release): pulling release/1.19.2 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Pallab Maiti authored Aug 28, 2023
2 parents 241a64b + 0a8f8d2 commit 4766914
Show file tree
Hide file tree
Showing 18 changed files with 189 additions and 107 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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.19.2](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.19.1...v1.19.2) (2023-08-28)


### Bug Fixes

* db encryption improvements ([#375](https://github.com/rudderlabs/rudder-sdk-ios/issues/375)) ([18ba785](https://github.com/rudderlabs/rudder-sdk-ios/commit/18ba7856d918b15d36f0e7c8916dd4d57f15b51b))
* renamed extern string of metrics ([#376](https://github.com/rudderlabs/rudder-sdk-ios/issues/376)) ([902d77f](https://github.com/rudderlabs/rudder-sdk-ios/commit/902d77fe34d99e0e7792804b8d3a28bcbfc27378))
* spm build is failing for missing dependency ([#373](https://github.com/rudderlabs/rudder-sdk-ios/issues/373)) ([d478c23](https://github.com/rudderlabs/rudder-sdk-ios/commit/d478c23de1e671d2d112ab1ab8181d55064ed427))

### [1.19.1](https://github.com/rudderlabs/rudder-sdk-ios/compare/v1.19.0...v1.19.1) (2023-08-23)


Expand Down
25 changes: 25 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "MetricsReporter",
"repositoryURL": "https://github.com/rudderlabs/metrics-reporter-ios",
"state": {
"branch": null,
"revision": "2f57ea3c893fd313484f82adf4adfe8d24deacab",
"version": "1.0.0"
}
},
{
"package": "RudderKit",
"repositoryURL": "https://github.com/rudderlabs/rudder-ios-kit",
"state": {
"branch": null,
"revision": "8a557a80cc1b0e0bc948c2b17fe0fd3809bcfd61",
"version": "1.4.0"
}
}
]
},
"version": 1
}
13 changes: 10 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@ import PackageDescription
let package = Package(
name: "Rudder",
platforms: [
.iOS(.v9), .tvOS(.v10)
.iOS(.v12), .tvOS(.v11), .watchOS("7.0")
],
products: [
.library(
name: "Rudder",
targets: ["Rudder"]
)
],
dependencies: [
.package(name: "MetricsReporter", url: "https://github.com/rudderlabs/metrics-reporter-ios", from: "1.0.0"),
],
targets: [
.target(
name: "Rudder",
dependencies: [
.product(name: "MetricsReporter", package: "MetricsReporter"),
],
path: "Sources",
sources: ["Classes/"],
publicHeadersPath: "Classes/Headers/Public/",
cSettings: [
.headerSearchPath("Classes/Headers/")
.headerSearchPath("Classes/Headers/"),
.unsafeFlags(["-DSQLITE_HAS_CODEC", "-DSQLITE_TEMP_STORE=3", "-DSQLCIPHER_CRYPTO_CC", "-DNDEBUG"])
]
),
.testTarget(
name: "RudderTests",
dependencies: ["Rudder"],
dependencies: ["Rudder", "MetricsReporter"],
path: "Tests"
),
]
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.19.1&color=blue&style=flat">
<img src="https://img.shields.io/static/v1?label=pod&message=v1.19.2&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.19.1'
pod 'Rudder', '1.19.2'
```

### Carthage

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

```xcode
github "rudderlabs/rudder-sdk-ios" "v1.19.1"
github "rudderlabs/rudder-sdk-ios" "v1.19.2"
```

> 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.19.1` as the value, as shown:
* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.19.2` 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.19.1")
.package(url: "[email protected]:rudderlabs/rudder-sdk-ios.git", from: "1.19.2")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
58 changes: 29 additions & 29 deletions Sources/Classes/Headers/Public/RSMetricsReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)setErrorsCollectionEnabled:(BOOL)status;
+ (void)setMetricsCollectionEnabled:(BOOL)status;

extern NSString *const SUBMITTED_EVENTS;
extern NSString *const EVENTS_DISCARDED;
extern NSString *const DM_EVENT;
extern NSString *const CM_EVENT;
extern NSString *const DM_DISCARD;
extern NSString *const SC_ATTEMPT_SUCCESS;
extern NSString *const SC_ATTEMPT_RETRY;
extern NSString *const SC_ATTEMPT_ABORT;
extern NSString *const CM_ATTEMPT_SUCCESS;
extern NSString *const CM_ATTEMPT_RETRY;
extern NSString *const CM_ATTEMPT_ABORT;

extern NSString *const TYPE;
extern NSString *const OPT_OUT;
extern NSString *const SDK_DISABLED;
extern NSString *const MSG_SIZE_INVALID;
extern NSString *const BATCH_SIZE_INVALID;
extern NSString *const MSG_FILTERED;
extern NSString *const OUT_OF_MEMORY;
extern NSString *const QUEUES;
extern NSString *const MESSAGES;
extern NSString *const DM_DISSENTED;
extern NSString *const DM_DISABLED;
extern NSString *const CONTROL_PLANE_URL_INVALID;
extern NSString *const DATA_PLANE_URL_INVALID;
extern NSString *const SOURCE_DISABLED;
extern NSString *const WRITEKEY_INVALID;
extern NSString *const INTEGRATION;
extern NSString *const REQUEST_TIMEOUT;
extern NSString *const SDKMETRICS_SUBMITTED_EVENTS;
extern NSString *const SDKMETRICS_EVENTS_DISCARDED;
extern NSString *const SDKMETRICS_DM_EVENT;
extern NSString *const SDKMETRICS_CM_EVENT;
extern NSString *const SDKMETRICS_DM_DISCARD;
extern NSString *const SDKMETRICS_SC_ATTEMPT_SUCCESS;
extern NSString *const SDKMETRICS_SC_ATTEMPT_RETRY;
extern NSString *const SDKMETRICS_SC_ATTEMPT_ABORT;
extern NSString *const SDKMETRICS_CM_ATTEMPT_SUCCESS;
extern NSString *const SDKMETRICS_CM_ATTEMPT_RETRY;
extern NSString *const SDKMETRICS_CM_ATTEMPT_ABORT;

extern NSString *const SDKMETRICS_TYPE;
extern NSString *const SDKMETRICS_OPT_OUT;
extern NSString *const SDKMETRICS_SDK_DISABLED;
extern NSString *const SDKMETRICS_MSG_SIZE_INVALID;
extern NSString *const SDKMETRICS_BATCH_SIZE_INVALID;
extern NSString *const SDKMETRICS_MSG_FILTERED;
extern NSString *const SDKMETRICS_OUT_OF_MEMORY;
extern NSString *const SDKMETRICS_QUEUES;
extern NSString *const SDKMETRICS_MESSAGES;
extern NSString *const SDKMETRICS_DM_DISSENTED;
extern NSString *const SDKMETRICS_DM_DISABLED;
extern NSString *const SDKMETRICS_CONTROL_PLANE_URL_INVALID;
extern NSString *const SDKMETRICS_DATA_PLANE_URL_INVALID;
extern NSString *const SDKMETRICS_SOURCE_DISABLED;
extern NSString *const SDKMETRICS_WRITEKEY_INVALID;
extern NSString *const SDKMETRICS_INTEGRATION;
extern NSString *const SDKMETRICS_REQUEST_TIMEOUT;

@end

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.19.1";
NSString *const SDK_VERSION = @"1.19.2";

#endif /* RSVersion_h */
2 changes: 1 addition & 1 deletion Sources/Classes/RSClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ - (void)optOut:(BOOL) optOut {
}

- (void)reportDiscardedEvent {
[RSMetricsReporter report:EVENTS_DISCARDED forMetricType:COUNT withProperties:@{TYPE: OPT_OUT} andValue:1];
[RSMetricsReporter report:SDKMETRICS_EVENTS_DISCARDED forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_OPT_OUT} andValue:1];
}

- (void)shutdown {
Expand Down
10 changes: 5 additions & 5 deletions Sources/Classes/RSCloudModeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ - (void) startCloudModeProcessor {
NSString* payload = [RSCloudModeManager getPayloadFromMessages:dbMessage];
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Payload: %@", payload]];
[RSLogger logInfo:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: EventCount: %lu", (unsigned long)dbMessage.messageIds.count]];
[RSMetricsReporter report:CM_EVENT forMetricType:COUNT withProperties:@{TYPE: MESSAGES} andValue:(float)dbMessage.messages.count];
[RSMetricsReporter report:SDKMETRICS_CM_EVENT forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_MESSAGES} andValue:(float)dbMessage.messages.count];
response = [strongSelf->networkManager sendNetworkRequest:payload toEndpoint:BATCH_ENDPOINT withRequestMethod:POST];
if (response.state == NETWORK_SUCCESS) {
[RSLogger logDebug:[[NSString alloc] initWithFormat:@"RSCloudModeManager: CloudModeProcessor: Updating status as CLOUDMODEPROCESSING DONE for events (%@)",[RSUtils getCSVString:dbMessage.messageIds]]];
[RSMetricsReporter report:CM_ATTEMPT_SUCCESS forMetricType:COUNT withProperties:nil andValue:(float)dbMessage.messages.count];
[RSMetricsReporter report:SDKMETRICS_CM_ATTEMPT_SUCCESS forMetricType:COUNT withProperties:nil andValue:(float)dbMessage.messages.count];
[strongSelf->dbPersistentManager updateEventsWithIds:dbMessage.messageIds withStatus:CLOUD_MODE_PROCESSING_DONE];
[strongSelf->dbPersistentManager clearProcessedEventsFromDB];
sleepCount = 0;
Expand All @@ -65,12 +65,12 @@ - (void) startCloudModeProcessor {
break;
} else if (response.state == INVALID_URL) {
[RSLogger logError:@"RSCloudModeManager: CloudModeProcessor: Invalid Data Plane URL. Aborting the Cloud Mode Processor"];
[RSMetricsReporter report:CM_ATTEMPT_ABORT forMetricType:COUNT withProperties:@{TYPE: DATA_PLANE_URL_INVALID} andValue:1];
[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)]];
[RSMetricsReporter report:CM_ATTEMPT_RETRY forMetricType:COUNT withProperties:nil andValue:1];
[RSMetricsReporter report:SDKMETRICS_CM_ATTEMPT_RETRY forMetricType:COUNT withProperties:nil andValue:1];
usleep(abs(sleepCount - strongSelf->config.sleepTimeout) * 1000000);
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ + (NSString*) getPayloadFromMessages: (RSDBMessage*)dbMessage{
// check totalBatchSize
if(totalBatchSize > MAX_BATCH_SIZE) {
[RSLogger logDebug:[NSString stringWithFormat:@"RSCloudModeManager: getPayloadFromMessages: MAX_BATCH_SIZE reached at index: %i | Total: %i",index, totalBatchSize]];
[RSMetricsReporter report:EVENTS_DISCARDED forMetricType:COUNT withProperties:@{TYPE: BATCH_SIZE_INVALID} andValue:1];
[RSMetricsReporter report:SDKMETRICS_EVENTS_DISCARDED forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_BATCH_SIZE_INVALID} andValue:1];
break;
}
[json appendString:message];
Expand Down
2 changes: 1 addition & 1 deletion Sources/Classes/RSConsentFilterHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ - (void)updateDeniedConsentIds:(id<RSConsentFilter>)_consentFilter {
dispatch_sync(queue, ^{
if (consentedIntegrationsDict[factoryKey] && ![consentedIntegrationsDict[factoryKey] boolValue]) {
[filteredList removeObject:destination];
[RSMetricsReporter report:DM_DISCARD forMetricType:COUNT withProperties:@{TYPE: DM_DISSENTED, INTEGRATION: destination.destinationDefinition.displayName} andValue:1];
[RSMetricsReporter report:SDKMETRICS_DM_DISCARD forMetricType:COUNT withProperties:@{SDKMETRICS_TYPE: SDKMETRICS_DM_DISSENTED, SDKMETRICS_INTEGRATION: destination.destinationDefinition.displayName} andValue:1];
}
});
}
Expand Down
Loading

0 comments on commit 4766914

Please sign in to comment.