@@ -69,12 +69,7 @@ - (void)presentWithAppearBlock:(void(^ __nullable)(void))appearBlock andDismissB
6969 }
7070 };
7171
72- if (self.widgetVersion ) {
73- [self presentWidget_new: widgetCallback];
74- } else {
75- [self presentWithCallback: widgetCallback];
76- }
77-
72+ [self presentWithCallback: widgetCallback];
7873}
7974
8075- (void )presentWidget_new : (WidgetCallback) widgetCallback ;
@@ -112,8 +107,8 @@ - (void)presentWithCallback:(WidgetCallback) widgetCallback;
112107 CLY_LOG_I (@" %s %@ " , __FUNCTION__, widgetCallback);
113108 if (!CountlyConsentManager.sharedInstance .consentForFeedback )
114109 return ;
115-
116- if (self.widgetVersion ) {
110+
111+ if (self.widgetVersion && ![ self .widgetVersion isKindOfClass: [ NSNull class ]] ) {
117112 [self presentWidget_new: widgetCallback];
118113 return ;
119114 }
@@ -280,7 +275,12 @@ - (NSURL *)generateWidgetURL {
280275 [URL appendFormat: @" ?%@ " , queryString];
281276
282277 // Create custom parameters
283- NSDictionary *customParams = @{@" tc" : @" 1" , @" rw" : @" 1" , @" xb" : @" 1" };
278+ NSMutableDictionary *customParams = [@{@" tc" : @" 1" } mutableCopy];
279+
280+ if (self.widgetVersion && ![self .widgetVersion isKindOfClass: [NSNull class ]]) {
281+ customParams[@" rw" ] = @" 1" ;
282+ customParams[@" xb" ] = @" 1" ;
283+ }
284284
285285 // Create JSON data from custom parameters
286286 NSError *error;
0 commit comments