Skip to content

Commit

Permalink
Merge pull request #322 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release v6.2.0
  • Loading branch information
AishwaryaNanna authored Apr 4, 2024
2 parents 94db7cf + 162a5e6 commit e8ba1e9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 72 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Change Log
All notable changes to this project will be documented in this file.

### [Version 6.2.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/6.2.0) (April 4, 2024)

#### Changed
- Updates privacy manifests.

#### Fixed
- Fixes a bug where client side in-apps were not discarded when rendering status is set to "discard".

### [Version 6.1.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/6.1.0) (February 22, 2024)

#### Added
Expand Down
6 changes: 3 additions & 3 deletions CleverTapLocation/CleverTapLocation/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePreciseLocation</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
Expand Down
2 changes: 1 addition & 1 deletion CleverTapSDK/CleverTapBuildInfo.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define WR_SDK_REVISION @"60100"
#define WR_SDK_REVISION @"60200"
5 changes: 5 additions & 0 deletions CleverTapSDK/InApps/CTInAppDisplayManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ - (void)_showNotificationIfAvailable {
}

- (void)prepareNotificationForDisplay:(NSDictionary*)jsonObj {
if (self.inAppRenderingStatus == CleverTapInAppDiscard) {
CleverTapLogDebug(self.config.logLevel, @"%@: InApp Notifications are set to be discarded, not saving and showing the InApp Notification", self);
return;
}

if (!self.instance.isAppForeground) {
CleverTapLogInternal(self.config.logLevel, @"%@: Application is not in the foreground, won't prepare in-app: %@", self, jsonObj);
return;
Expand Down
26 changes: 13 additions & 13 deletions CleverTapSDK/InApps/CleverTap+InAppsResponseHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ - (void)handleInAppResponse:(NSDictionary *)jsonResp {
NSString *mode = jsonResp[CLTAP_INAPP_MODE_JSON_RESPONSE_KEY];
[self.inAppStore setMode:mode];

// Parse SS App Launched notifications
NSArray *inAppNotifsAppLaunched = jsonResp[CLTAP_INAPP_SS_APP_LAUNCHED_JSON_RESPONSE_KEY];
if (inAppNotifsAppLaunched) {
@try {
[self.inAppEvaluationManager evaluateOnAppLaunchedServerSide:inAppNotifsAppLaunched];
} @catch (NSException *e) {
CleverTapLogInternal(self.config.logLevel, @"%@: Error evaluating App Launched notifications JSON: %@", self, e.debugDescription);
}
}

// Handle stale in-apps
@try {
NSArray *stale = jsonResp[CLTAP_INAPP_STALE_JSON_RESPONSE_KEY];
Expand All @@ -68,13 +58,23 @@ - (void)handleInAppResponse:(NSDictionary *)jsonResp {
CleverTapLogInternal(self.config.logLevel, @"%@: Failed to handle inapp_stale update: %@", self, ex.debugDescription)
}

// Parse in-app notifications to be displayed
NSArray *inappsJSON = jsonResp[CLTAP_INAPP_JSON_RESPONSE_KEY];

if (self.inAppDisplayManager.inAppRenderingStatus == CleverTapInAppDiscard) {
CleverTapLogDebug(self.config.logLevel, @"%@: InApp Notifications are set to be discarded, not saving and showing the InApp Notification", self);
return;
}

// Parse SS App Launched notifications
NSArray *inAppNotifsAppLaunched = jsonResp[CLTAP_INAPP_SS_APP_LAUNCHED_JSON_RESPONSE_KEY];
if (inAppNotifsAppLaunched) {
@try {
[self.inAppEvaluationManager evaluateOnAppLaunchedServerSide:inAppNotifsAppLaunched];
} @catch (NSException *e) {
CleverTapLogInternal(self.config.logLevel, @"%@: Error evaluating App Launched notifications JSON: %@", self, e.debugDescription);
}
}

// Parse in-app notifications to be displayed
NSArray *inappsJSON = jsonResp[CLTAP_INAPP_JSON_RESPONSE_KEY];
if (inappsJSON) {
NSMutableArray *inappNotifs;
@try {
Expand Down
57 changes: 3 additions & 54 deletions CleverTapSDK/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,11 @@
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeName</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeEmailAddress</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePhoneNumber</string>
<string>NSPrivacyCollectedDataTypeUserID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeUserID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
Expand All @@ -59,9 +21,9 @@
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeDeviceID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
Expand All @@ -72,20 +34,7 @@
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePurchaseHistory</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
Expand Down
2 changes: 1 addition & 1 deletion sdk-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.2.0

0 comments on commit e8ba1e9

Please sign in to comment.