From 467ecf987056309de61a90d3067ad3b848c2bbab Mon Sep 17 00:00:00 2001 From: SonalKachare Date: Thu, 6 Oct 2022 19:17:49 +0530 Subject: [PATCH 1/2] Updated name to Signed call --- CleverTapSDK/CTConstants.h | 6 +++--- CleverTapSDK/CTDeviceInfo.h | 4 ++-- CleverTapSDK/CTDeviceInfo.m | 10 +++++----- CleverTapSDK/CTEventBuilder.h | 2 +- CleverTapSDK/CTEventBuilder.m | 26 +++++++++++++------------- CleverTapSDK/CleverTap.h | 20 ++++++++++---------- CleverTapSDK/CleverTap.m | 12 ++++++------ 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/CleverTapSDK/CTConstants.h b/CleverTapSDK/CTConstants.h index 4716b3a8..91f38adc 100644 --- a/CleverTapSDK/CTConstants.h +++ b/CleverTapSDK/CTConstants.h @@ -30,9 +30,9 @@ extern NSString *const kCTNotifViewedApiDomain; #define CLTAP_GEOFENCE_ENTERED_EVENT_NAME @"Geocluster Entered" #define CLTAP_GEOFENCE_EXITED_EVENT_NAME @"Geocluster Exited" -#define CLTAP_DIRECT_CALL_OUTGOING_EVENT_NAME @"DCOutgoing" -#define CLTAP_DIRECT_CALL_INCOMING_EVENT_NAME @"DCIncoming" -#define CLTAP_DIRECT_CALL_END_EVENT_NAME @"DCEnd" +#define CLTAP_SIGNED_CALL_OUTGOING_EVENT_NAME @"SCOutgoing" +#define CLTAP_SIGNED_CALL_INCOMING_EVENT_NAME @"SCIncoming" +#define CLTAP_SIGNED_CALL_END_EVENT_NAME @"SCEnd" #define CLTAP_PREFS_LAST_DAILY_PUSHED_EVENTS_DATE @"lastDailyEventsPushedDate" #define CLTAP_SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) diff --git a/CleverTapSDK/CTDeviceInfo.h b/CleverTapSDK/CTDeviceInfo.h index 023d0df3..78e10058 100644 --- a/CleverTapSDK/CTDeviceInfo.h +++ b/CleverTapSDK/CTDeviceInfo.h @@ -25,12 +25,12 @@ @property (atomic, readwrite) NSString *library; @property (assign, readonly) BOOL wifi; @property (strong, readonly) NSMutableArray* validationErrors; -@property (strong, readonly) NSString *directCallSDKVersion; +@property (strong, readonly) NSString *signedCallSDKVersion; - (instancetype)initWithConfig:(CleverTapInstanceConfig *)config andCleverTapID:(NSString *)cleverTapID; - (void)forceUpdateDeviceID:(NSString *)newDeviceID; - (void)forceNewDeviceID; - (void)forceUpdateCustomDeviceID:(NSString *)cleverTapID; - (BOOL)isErrorDeviceID; -- (void)setDirectCallSDKVersion: (NSString *)version; +- (void)setSignedCallSDKVersion: (NSString *)version; @end diff --git a/CleverTapSDK/CTDeviceInfo.m b/CleverTapSDK/CTDeviceInfo.m index f552b7ca..7ad74088 100644 --- a/CleverTapSDK/CTDeviceInfo.m +++ b/CleverTapSDK/CTDeviceInfo.m @@ -39,7 +39,7 @@ static NSString *_radio; static NSString *_deviceWidth; static NSString *_deviceHeight; -static NSString *_directCallSDKVersion; +static NSString *_signedCallSDKVersion; #if !CLEVERTAP_NO_REACHABILITY_SUPPORT SCNetworkReachabilityRef _reachability; @@ -470,12 +470,12 @@ - (NSString *)getCurrentRadioAccessTechnology { } #endif -- (void)setDirectCallSDKVersion: (NSString *)version { - _directCallSDKVersion = version; +- (void)setSignedCallSDKVersion: (NSString *)version { + _signedCallSDKVersion = version; } -- (NSString *)directCallSDKVersion { - return _directCallSDKVersion; +- (NSString *)signedCallSDKVersion { + return _signedCallSDKVersion; } @end diff --git a/CleverTapSDK/CTEventBuilder.h b/CleverTapSDK/CTEventBuilder.h index c0de1cff..d3a84635 100644 --- a/CleverTapSDK/CTEventBuilder.h +++ b/CleverTapSDK/CTEventBuilder.h @@ -38,7 +38,7 @@ forGeofenceDetails:(NSDictionary * _Nonnull)geofenceDetails completionHandler:(void(^ _Nonnull)(NSDictionary * _Nullable event, NSArray * _Nullable errors))completion; -+ (void)buildDirectCallEvent:(int)eventRawValue ++ (void)buildSignedCallEvent:(int)eventRawValue forCallDetails:(NSDictionary * _Nonnull)callDetails completionHandler:(void(^ _Nonnull)(NSDictionary * _Nullable event, NSArray * _Nullable errors))completion; diff --git a/CleverTapSDK/CTEventBuilder.m b/CleverTapSDK/CTEventBuilder.m index d9ffb131..c3715256 100644 --- a/CleverTapSDK/CTEventBuilder.m +++ b/CleverTapSDK/CTEventBuilder.m @@ -423,15 +423,15 @@ + (void)buildGeofenceStateEvent:(BOOL)entered } /** - * Raises and logs Direct Call system events + * Raises and logs Signed Call system events */ -+ (void)buildDirectCallEvent:(int)eventRawValue ++ (void)buildSignedCallEvent:(int)eventRawValue forCallDetails:(NSDictionary * _Nonnull)callDetails completionHandler:(void(^ _Nonnull)(NSDictionary * _Nullable event, NSArray * _Nullable errors))completion { NSMutableArray *errors = [NSMutableArray new]; CTValidationResult *error = [[CTValidationResult alloc] init]; [error setErrorCode: 524]; - [error setErrorDesc: @"Direct Call does not have any field"]; + [error setErrorDesc: @"Signed Call does not have any field"]; @try { NSMutableDictionary *eventDic = [NSMutableDictionary new]; NSMutableDictionary *notif = [NSMutableDictionary new]; @@ -439,32 +439,32 @@ + (void)buildDirectCallEvent:(int)eventRawValue if ([notif count] == 0) { [errors addObject: error]; - CleverTapLogStaticDebug(@"Direct Call does not have any field"); + CleverTapLogStaticDebug(@"Signed Call does not have any field"); } - NSString *directCallEvent; + NSString *signedCallEvent; switch (eventRawValue) { case 0: - directCallEvent = CLTAP_DIRECT_CALL_OUTGOING_EVENT_NAME; + signedCallEvent = CLTAP_SIGNED_CALL_OUTGOING_EVENT_NAME; case 1: - directCallEvent = CLTAP_DIRECT_CALL_INCOMING_EVENT_NAME; + signedCallEvent = CLTAP_SIGNED_CALL_INCOMING_EVENT_NAME; case 2: - directCallEvent = CLTAP_DIRECT_CALL_END_EVENT_NAME; + signedCallEvent = CLTAP_SIGNED_CALL_END_EVENT_NAME; default: break; } - if (directCallEvent) { - eventDic[@"evtName"] = directCallEvent; + if (signedCallEvent) { + eventDic[@"evtName"] = signedCallEvent; eventDic[@"evtData"] = notif; completion(eventDic, errors); } else { CTValidationResult *error = [[CTValidationResult alloc] init]; [error setErrorCode: 525]; - [error setErrorDesc: @"Direct Call did not specify event name"]; + [error setErrorDesc: @"Signed Call did not specify event name"]; [errors addObject: error]; - CleverTapLogStaticDebug(@"Direct Call did not specify event name"); + CleverTapLogStaticDebug(@"Signed Call did not specify event name"); completion(nil, errors); } } @catch (NSException *e) { - CleverTapLogStaticDebug(@"Unable to build direct call event: %@", e.debugDescription); + CleverTapLogStaticDebug(@"Unable to build signed call event: %@", e.debugDescription); completion(nil, errors); } } diff --git a/CleverTapSDK/CleverTap.h b/CleverTapSDK/CleverTap.h index 1beb194b..d4416d0c 100644 --- a/CleverTapSDK/CleverTap.h +++ b/CleverTapSDK/CleverTap.h @@ -47,10 +47,10 @@ typedef NS_ENUM(int, CleverTapChannel) { CleverTapInAppNotification = 2 }; -typedef NS_ENUM(int, CTDirectCallEvent) { - DIRECT_CALL_OUTGOING_EVENT = 0, - DIRECT_CALL_INCOMING_EVENT, - DIRECT_CALL_END_EVENT +typedef NS_ENUM(int, CTSignedCallEvent) { + SIGNED_CALL_OUTGOING_EVENT = 0, + SIGNED_CALL_INCOMING_EVENT, + SIGNED_CALL_END_EVENT }; @interface CleverTap : NSObject @@ -68,9 +68,9 @@ typedef NS_ENUM(int, CTDirectCallEvent) { @property (nonatomic, strong, readonly, nonnull) CleverTapInstanceConfig *config; /** - CleverTap region/ domain value for direct call domain setup + CleverTap region/ domain value for signed call domain setup */ -@property (nonatomic, strong, readwrite, nullable) NSString *directCallDomain; +@property (nonatomic, strong, readwrite, nullable) NSString *signedCallDomain; /* ------------------------------------------------------------------------------------------------------ @@ -1261,17 +1261,17 @@ extern NSString * _Nonnull const CleverTapProfileDidInitializeNotification; @param calldetails call details dictionary */ -- (void)recordDirectCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *_Nonnull)calldetails; +- (void)recordSignedCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *_Nonnull)calldetails; /*! @method @abstract - Record Direct Call SDK version. + Record Signed Call SDK version. - @param version Direct call SDK version + @param version Signed call SDK version */ -- (void)setDirectCallVersion:(NSString* _Nullable)version; +- (void)setSignedCallVersion:(NSString* _Nullable)version; /*! @method diff --git a/CleverTapSDK/CleverTap.m b/CleverTapSDK/CleverTap.m index 99c03f3e..4537fd6e 100644 --- a/CleverTapSDK/CleverTap.m +++ b/CleverTapSDK/CleverTap.m @@ -1154,7 +1154,7 @@ - (NSArray *)insertHeader:(NSDictionary *)header inBatch:(NSArray *)batch { - (NSDictionary *)generateAppFields { NSMutableDictionary *evtData = [NSMutableDictionary new]; - evtData[@"dcv"] = self.deviceInfo.directCallSDKVersion; + evtData[@"scv"] = self.deviceInfo.signedCallSDKVersion; evtData[@"Version"] = self.deviceInfo.appVersion; @@ -4865,10 +4865,10 @@ - (void)_buildGeofenceStateEvent:(BOOL)entered forGeofenceDetails:(NSDictionary #pragma mark - Direct Call Public APIs -- (void)recordDirectCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *)calldetails { +- (void)recordSignedCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *)calldetails { #if !defined(CLEVERTAP_TVOS) [self runSerialAsync:^{ - [CTEventBuilder buildDirectCallEvent: eventRawValue forCallDetails:calldetails completionHandler:^(NSDictionary * _Nullable event, NSArray * _Nullable errors) { + [CTEventBuilder buildSignedCallEvent: eventRawValue forCallDetails:calldetails completionHandler:^(NSDictionary * _Nullable event, NSArray * _Nullable errors) { if (event) { [self queueEvent:event withType:CleverTapEventTypeRaised]; }; @@ -4880,8 +4880,8 @@ - (void)recordDirectCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *) #endif } -- (void)setDirectCallVersion:(NSString *)version { - [self.deviceInfo setDirectCallSDKVersion: version]; +- (void)setSignedCallVersion:(NSString *)version { + [self.deviceInfo setSignedCallSDKVersion: version]; } - (void)setDomainDelegate:(id)delegate { @@ -4920,7 +4920,7 @@ - (NSString *)getDomainString { NSString *dotString = [@"." stringByAppendingString: listItems[i]]; domainItem = [domainItem stringByAppendingString: dotString]; } - self.directCallDomain = domainItem; + self.signedCallDomain = domainItem; return domainItem; } else { return nil; From cc80260574778b1df90513ba42c9afab78bfe303 Mon Sep 17 00:00:00 2001 From: SonalKachare Date: Mon, 10 Oct 2022 13:55:23 +0530 Subject: [PATCH 2/2] Updates DC to SignedCall --- CleverTapSDK/CleverTap.h | 2 +- CleverTapSDK/CleverTap.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CleverTapSDK/CleverTap.h b/CleverTapSDK/CleverTap.h index d4416d0c..e9fda1c7 100644 --- a/CleverTapSDK/CleverTap.h +++ b/CleverTapSDK/CleverTap.h @@ -1257,7 +1257,7 @@ extern NSString * _Nonnull const CleverTapProfileDidInitializeNotification; @method @abstract - Record Direct Call System Events. + Record Signed Call System Events. @param calldetails call details dictionary */ diff --git a/CleverTapSDK/CleverTap.m b/CleverTapSDK/CleverTap.m index 4537fd6e..3f21a452 100644 --- a/CleverTapSDK/CleverTap.m +++ b/CleverTapSDK/CleverTap.m @@ -4863,7 +4863,7 @@ - (void)_buildGeofenceStateEvent:(BOOL)entered forGeofenceDetails:(NSDictionary #endif } -#pragma mark - Direct Call Public APIs +#pragma mark - Signed Call Public APIs - (void)recordSignedCallEvent:(int)eventRawValue forCallDetails:(NSDictionary *)calldetails { #if !defined(CLEVERTAP_TVOS)