diff --git a/ios/current.md b/ios/current.md index 25f7f09a..18c5a2ab 100644 --- a/ios/current.md +++ b/ios/current.md @@ -3063,64 +3063,24 @@ config.starRatingDismissButtonTitle = "No, thanks."

- When the widgets are created, you need to use 2 calls in your SDK: one to get - all available widgets for a user and another to display a chosen widget. + After you have created widgets on your dashboard, you can reach the methods to + show them from the feedback interface of your Countly instance:

-

To get your available widget list, use the call below.

Objective-C Swift
-

-[Countly.sharedInstance getFeedbackWidgets:^(NSArray * feedbackWidgets, NSError * error)
-{
-  if (error)
-  {
-    NSLog(@"Getting widgets list failed. Error: %@", error);
-  }
-  else
-  {
-    NSLog(@"Getting widgets list successfully completed. %@", [feedbackWidgets description]);
-  }
-}];
-    
+
[Countly.sharedInstance feedback];

- When feedback widgets are fetched successfully, completionHandler - will be executed with an array of CountlyFeedbackWidget objects. - Otherwise, completionHandler will be executed with an - NSError. -

-

- Calls to this method will be ignored and completionHandler will - not be executed if:
- - Consent for CLYConsentFeedback is not given, while - requiresConsent flag is set on initial configuration.
- - Current device ID is CLYTemporaryDeviceID. -

-

- Once you get the list, you can inspect CountlyFeedbackWidget objects - in it, by checking their type, ID, and - name properties to decide which one to display. And when you decide, - you can use present method on CountlyFeedbackWidget - object to display it. + You can display a random active widget for the widget type you want with one + of these methods:

@@ -3128,47 +3088,101 @@ Countly.sharedInstance().getFeedbackWidgets Swift
-
CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget present];
+    
[presentNPS]
+[presentSurvey]
+[presentRating]
+// Example:
+[Countly.sharedInstance.feedback presentNPS];
     
-

Optionally you can pass appear and dismiss callback blocks:

+

+ If you want to show a specific widget according to its name, ID or one of its + tags then you can use these methods: +

- Objective-C - Swift +
+
+ Objective-C + Swift +
+
+
[presentNPS:nameIDorTag
+[presentSurvey:nameIDorTag]
+[presentRating:nameIDorTag]
+// Example:
+[Countly.sharedInstance.feedback presentNPS:@"/home-page"];
+        
+
+ +
-
-
CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget presentWithAppearBlock:^
-{
-  NSLog(@"Appeared!");
-}
-andDismissBlock:^
-{
-  NSLog(@"Dismissed!");
+
+

+ If an empty nameIDorTag is provided it will show the first feedback widget by + its type. +

+

+ If you need to know when the widget is appeared or closed you can use these methods + to provide a callback which will be called when the widget appeared/closes: +

+
+
+
+
+ Objective-C + Swift +
+
+
[presentNPS:nameIDorTag widgetCallback:]
+[presentSurvey:nameIDorTag widgetCallback:]
+[presentRating:nameIDorTag widgetCallback:]
+// Example:
+[Countly.sharedInstance.feedback presentNPS:@"MyNetPromoterScore" widgetCallback:^(WidgetState widgetState) {
+//...
 }];
-    
-
- +
+
+

+ widgetState enum has two values + WIDGET_APPEARED and + WIDGET_CLOSED, on the basis of widget state you know + about whether widget is appeared or closed. +

+

+ For more in-depth information on retrieving feedback widgets, understanding object + structures, or presenting them yourself, please refer to the following + resource. +

Manual Reporting

Optionally you can fetch feedback widget data and create your own UI using: @@ -3180,34 +3194,55 @@ andDismiss:


-CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget getWidgetData:^(NSDictionary * widgetData, NSError * error)
+[Countly.sharedInstance getFeedbackWidgets:^(NSArray * feedbackWidgets, NSError * error)
 {
   if (error)
   {
-    NSLog(@"Getting widget data failed. Error: %@", error);
+    NSLog(@"Getting widgets list failed. Error: %@", error);
   }
   else
   {
-    NSLog(@"Getting widget data successfully completed. %@", [widgetData description]);
+    CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
+    [aFeedbackWidget getWidgetData:^(NSDictionary * widgetData, NSError * error)
+    {
+      if (error)
+      {
+        NSLog(@"Getting widget data failed. Error: %@", error);
+      }
+      else
+      {
+        NSLog(@"Getting widget data successfully completed. %@", [widgetData description]);
+      }
+    }];
   }
 }];
     

@@ -4241,7 +4276,7 @@ Countly.sharedInstance().cancelConsent(forFeature: CLYConsentEvents)config.sdkInternalLimits().setMaxStackTraceLineLength(300); -

SDK Behavior Settings

+

Server Configuration

Server Configuration is enabled by default. Changes made on SDK Manager SDK Configuration on your server will affect SDK behavior directly. @@ -4263,6 +4298,23 @@ Countly.sharedInstance().cancelConsent(forFeature: CLYConsentEvents)config.sdkBehaviorSettings = "json server config"; +

+ If you want to disable automatic config updates from the server, you can prevent + the SDK from making server configuration fetch requests. This is useful if you're + trying to reduce network traffic or control request counts. +

+
+
+ Objective-C + Swift +
+
+
config.disableSDKBehaviorSettingsUpdates = YES;
+
+ +

Attribution

Direct Attribution

@@ -5328,4 +5380,4 @@ Countly.sharedInstance().changeDeviceIDWithoutMerge("new_device_id")kCountlyPNKeyNotificationID = @"i" key in it - \ No newline at end of file + diff --git a/ios/next.md b/ios/next.md index ab1c0f4a..1bee2d3d 100644 --- a/ios/next.md +++ b/ios/next.md @@ -3063,64 +3063,24 @@ config.starRatingDismissButtonTitle = "No, thanks."

- When the widgets are created, you need to use 2 calls in your SDK: one to get - all available widgets for a user and another to display a chosen widget. + After you have created widgets on your dashboard, you can reach the methods to + show them from the feedback interface of your Countly instance:

-

To get your available widget list, use the call below.

Objective-C Swift
-

-[Countly.sharedInstance getFeedbackWidgets:^(NSArray * feedbackWidgets, NSError * error)
-{
-  if (error)
-  {
-    NSLog(@"Getting widgets list failed. Error: %@", error);
-  }
-  else
-  {
-    NSLog(@"Getting widgets list successfully completed. %@", [feedbackWidgets description]);
-  }
-}];
-    
+
[Countly.sharedInstance feedback];

- When feedback widgets are fetched successfully, completionHandler - will be executed with an array of CountlyFeedbackWidget objects. - Otherwise, completionHandler will be executed with an - NSError. -

-

- Calls to this method will be ignored and completionHandler will - not be executed if:
- - Consent for CLYConsentFeedback is not given, while - requiresConsent flag is set on initial configuration.
- - Current device ID is CLYTemporaryDeviceID. -

-

- Once you get the list, you can inspect CountlyFeedbackWidget objects - in it, by checking their type, ID, and - name properties to decide which one to display. And when you decide, - you can use present method on CountlyFeedbackWidget - object to display it. + You can display a random active widget for the widget type you want with one + of these methods:

@@ -3128,47 +3088,101 @@ Countly.sharedInstance().getFeedbackWidgets Swift
-
CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget present];
+    
[presentNPS]
+[presentSurvey]
+[presentRating]
+// Example:
+[Countly.sharedInstance.feedback presentNPS];
     
-

Optionally you can pass appear and dismiss callback blocks:

+

+ If you want to show a specific widget according to its name, ID or one of its + tags then you can use these methods: +

- Objective-C - Swift +
+
+ Objective-C + Swift +
+
+
[presentNPS:nameIDorTag
+[presentSurvey:nameIDorTag]
+[presentRating:nameIDorTag]
+// Example:
+[Countly.sharedInstance.feedback presentNPS:@"/home-page"];
+        
+
+ +
-
-
CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget presentWithAppearBlock:^
-{
-  NSLog(@"Appeared!");
-}
-andDismissBlock:^
-{
-  NSLog(@"Dismissed!");
+
+

+ If an empty nameIDorTag is provided it will show the first feedback widget by + its type. +

+

+ If you need to know when the widget is appeared or closed you can use these methods + to provide a callback which will be called when the widget appeared/closes: +

+
+
+
+
+ Objective-C + Swift +
+
+
[presentNPS:nameIDorTag widgetCallback:]
+[presentSurvey:nameIDorTag widgetCallback:]
+[presentRating:nameIDorTag widgetCallback:]
+// Example:
+[Countly.sharedInstance.feedback presentNPS:@"MyNetPromoterScore" widgetCallback:^(WidgetState widgetState) {
+//...
 }];
-    
-
- +
+
+

+ widgetState enum has two values + WIDGET_APPEARED and + WIDGET_CLOSED, on the basis of widget state you know + about whether widget is appeared or closed. +

+

+ For more in-depth information on retrieving feedback widgets, understanding object + structures, or presenting them yourself, please refer to the following + resource. +

Manual Reporting

Optionally you can fetch feedback widget data and create your own UI using: @@ -3180,34 +3194,55 @@ andDismiss:


-CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
-[aFeedbackWidget getWidgetData:^(NSDictionary * widgetData, NSError * error)
+[Countly.sharedInstance getFeedbackWidgets:^(NSArray * feedbackWidgets, NSError * error)
 {
   if (error)
   {
-    NSLog(@"Getting widget data failed. Error: %@", error);
+    NSLog(@"Getting widgets list failed. Error: %@", error);
   }
   else
   {
-    NSLog(@"Getting widget data successfully completed. %@", [widgetData description]);
+    CountlyFeedbackWidget * aFeedbackWidget = feedbackWidgets.firstObject; //assuming we want to display the first one in the list
+    [aFeedbackWidget getWidgetData:^(NSDictionary * widgetData, NSError * error)
+    {
+      if (error)
+      {
+        NSLog(@"Getting widget data failed. Error: %@", error);
+      }
+      else
+      {
+        NSLog(@"Getting widget data successfully completed. %@", [widgetData description]);
+      }
+    }];
   }
 }];
     

@@ -5345,4 +5380,4 @@ Countly.sharedInstance().changeDeviceIDWithoutMerge("new_device_id")kCountlyPNKeyNotificationID = @"i" key in it - \ No newline at end of file +