Skip to content

Commit

Permalink
Temp renaming reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
ijunaid committed Oct 23, 2024
1 parent a6e1d0a commit dab794c
Show file tree
Hide file tree
Showing 10 changed files with 681 additions and 603 deletions.
4 changes: 2 additions & 2 deletions Countly.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import "CountlyFeedbackWidget.h"
#import "CountlyViewTracking.h"
#import "CountlyContentBuilder.h"
#import "CountlyFeedbacksNew.h"
#import "CountlyFeedbacks.h"
#import "Resettable.h"
#if (TARGET_OS_IOS || TARGET_OS_OSX)
#import <UserNotifications/UserNotifications.h>
Expand Down Expand Up @@ -690,7 +690,7 @@ NS_ASSUME_NONNULL_BEGIN
* Interface variable to access feedback widget functionalities.
* @discussion Feedback widget interface for developer to interact with SDK.
*/
- (CountlyFeedbacksNew *) feedback;
- (CountlyFeedbacks *) feedback;
#endif


Expand Down
22 changes: 11 additions & 11 deletions Countly.m
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ - (void)startWithConfig:(CountlyConfig *)config
}

#if (TARGET_OS_IOS)
CountlyFeedbacks.sharedInstance.message = config.starRatingMessage;
CountlyFeedbacks.sharedInstance.sessionCount = config.starRatingSessionCount;
CountlyFeedbacks.sharedInstance.disableAskingForEachAppVersion = config.starRatingDisableAskingForEachAppVersion;
CountlyFeedbacks.sharedInstance.ratingCompletionForAutoAsk = config.starRatingCompletion;
[CountlyFeedbacks.sharedInstance checkForStarRatingAutoAsk];
CountlyFeedbacksInternal.sharedInstance.message = config.starRatingMessage;
CountlyFeedbacksInternal.sharedInstance.sessionCount = config.starRatingSessionCount;
CountlyFeedbacksInternal.sharedInstance.disableAskingForEachAppVersion = config.starRatingDisableAskingForEachAppVersion;
CountlyFeedbacksInternal.sharedInstance.ratingCompletionForAutoAsk = config.starRatingCompletion;
[CountlyFeedbacksInternal.sharedInstance checkForStarRatingAutoAsk];
#endif

if(config.disableLocation)
Expand Down Expand Up @@ -1240,7 +1240,7 @@ - (void)askForStarRating:(void(^)(NSInteger rating))completion
{
CLY_LOG_I(@"%s %@", __FUNCTION__, completion);

[CountlyFeedbacks.sharedInstance showDialog:completion];
[CountlyFeedbacksInternal.sharedInstance showDialog:completion];
}

- (void)presentFeedbackWidgetWithID:(NSString *)widgetID completionHandler:(void (^)(NSError * error))completionHandler
Expand All @@ -1262,31 +1262,31 @@ - (void)presentRatingWidgetWithID:(NSString *)widgetID closeButtonText:(NSString

CLY_LOG_I(@"%s %@ %@ %@", __FUNCTION__, widgetID, closeButtonText, completionHandler);

[CountlyFeedbacks.sharedInstance presentRatingWidgetWithID:widgetID closeButtonText:closeButtonText completionHandler:completionHandler];
[CountlyFeedbacksInternal.sharedInstance presentRatingWidgetWithID:widgetID closeButtonText:closeButtonText completionHandler:completionHandler];
}

- (void)recordRatingWidgetWithID:(NSString *)widgetID rating:(NSInteger)rating email:(NSString * _Nullable)email comment:(NSString * _Nullable)comment userCanBeContacted:(BOOL)userCanBeContacted
{
CLY_LOG_I(@"%s %@ %ld %@ %@ %d", __FUNCTION__, widgetID, (long)rating, email, comment, userCanBeContacted);

[CountlyFeedbacks.sharedInstance recordRatingWidgetWithID:widgetID rating:rating email:email comment:comment userCanBeContacted:userCanBeContacted];
[CountlyFeedbacksInternal.sharedInstance recordRatingWidgetWithID:widgetID rating:rating email:email comment:comment userCanBeContacted:userCanBeContacted];
}

- (void)getFeedbackWidgets:(void (^)(NSArray <CountlyFeedbackWidget *> *feedbackWidgets, NSError * error))completionHandler
{
CLY_LOG_I(@"%s %@", __FUNCTION__, completionHandler);

[CountlyFeedbacks.sharedInstance getFeedbackWidgets:completionHandler];
[CountlyFeedbacksInternal.sharedInstance getFeedbackWidgets:completionHandler];
}

- (CountlyContentBuilder *) content
{
return CountlyContentBuilder.sharedInstance;
}

- (CountlyFeedbacksNew *) feedback
- (CountlyFeedbacks *) feedback
{
return CountlyFeedbacksNew.sharedInstance;
return CountlyFeedbacks.sharedInstance;
}

#endif
Expand Down
32 changes: 16 additions & 16 deletions Countly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
39924ED62BEBD20F00139F91 /* CountlyCrashData.m in Sources */ = {isa = PBXBuildFile; fileRef = 39924ED52BEBD20F00139F91 /* CountlyCrashData.m */; };
39924ED82BEBD22100139F91 /* CountlyCrashData.h in Headers */ = {isa = PBXBuildFile; fileRef = 39924ED72BEBD22100139F91 /* CountlyCrashData.h */; settings = {ATTRIBUTES = (Public, ); }; };
399B46502C52813700AD384E /* CountlyLocationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399B464F2C52813700AD384E /* CountlyLocationTests.swift */; };
39BDF7572CC7CA870066DE7C /* CountlyFeedbacksNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BDF7562CC7CA870066DE7C /* CountlyFeedbacksNew.h */; settings = {ATTRIBUTES = (Public, ); }; };
39BDF7592CC7CA920066DE7C /* CountlyFeedbacksNew.m in Sources */ = {isa = PBXBuildFile; fileRef = 39BDF7582CC7CA920066DE7C /* CountlyFeedbacksNew.m */; };
39BDF7572CC7CA870066DE7C /* CountlyFeedbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BDF7562CC7CA870066DE7C /* CountlyFeedbacks.h */; settings = {ATTRIBUTES = (Public, ); }; };
39BDF7592CC7CA920066DE7C /* CountlyFeedbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 39BDF7582CC7CA920066DE7C /* CountlyFeedbacks.m */; };
39EE1F102C8B341E0016D1BF /* CountlyExperimentalConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 3903429B2C8051B400238C96 /* CountlyExperimentalConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
3B20A9872245225A00E3D7AE /* Countly.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B20A9852245225A00E3D7AE /* Countly.h */; settings = {ATTRIBUTES = (Public, ); }; };
3B20A9B22245228700E3D7AE /* CountlyConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B20A98D2245228300E3D7AE /* CountlyConnectionManager.h */; };
Expand Down Expand Up @@ -87,8 +87,8 @@
D219374C248AC71C00E5798B /* CountlyPerformanceMonitoring.m in Sources */ = {isa = PBXBuildFile; fileRef = D219374A248AC71C00E5798B /* CountlyPerformanceMonitoring.m */; };
D249BF5E254D3D180058A6C2 /* CountlyFeedbackWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = D249BF5C254D3D170058A6C2 /* CountlyFeedbackWidget.h */; settings = {ATTRIBUTES = (Public, ); }; };
D249BF5F254D3D180058A6C2 /* CountlyFeedbackWidget.m in Sources */ = {isa = PBXBuildFile; fileRef = D249BF5D254D3D180058A6C2 /* CountlyFeedbackWidget.m */; };
D2CFEF972545FBE80026B044 /* CountlyFeedbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = D2CFEF952545FBE80026B044 /* CountlyFeedbacks.h */; };
D2CFEF982545FBE80026B044 /* CountlyFeedbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CFEF962545FBE80026B044 /* CountlyFeedbacks.m */; };
D2CFEF972545FBE80026B044 /* CountlyFeedbacksInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D2CFEF952545FBE80026B044 /* CountlyFeedbacksInternal.h */; };
D2CFEF982545FBE80026B044 /* CountlyFeedbacksInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CFEF962545FBE80026B044 /* CountlyFeedbacksInternal.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -145,8 +145,8 @@
39924ED52BEBD20F00139F91 /* CountlyCrashData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountlyCrashData.m; sourceTree = "<group>"; };
39924ED72BEBD22100139F91 /* CountlyCrashData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CountlyCrashData.h; sourceTree = "<group>"; };
399B464F2C52813700AD384E /* CountlyLocationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountlyLocationTests.swift; sourceTree = "<group>"; };
39BDF7562CC7CA870066DE7C /* CountlyFeedbacksNew.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CountlyFeedbacksNew.h; sourceTree = "<group>"; };
39BDF7582CC7CA920066DE7C /* CountlyFeedbacksNew.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountlyFeedbacksNew.m; sourceTree = "<group>"; };
39BDF7562CC7CA870066DE7C /* CountlyFeedbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CountlyFeedbacks.h; sourceTree = "<group>"; };
39BDF7582CC7CA920066DE7C /* CountlyFeedbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountlyFeedbacks.m; sourceTree = "<group>"; };
3B20A9822245225A00E3D7AE /* Countly.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Countly.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B20A9852245225A00E3D7AE /* Countly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Countly.h; sourceTree = "<group>"; };
3B20A9862245225A00E3D7AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -185,8 +185,8 @@
D219374A248AC71C00E5798B /* CountlyPerformanceMonitoring.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyPerformanceMonitoring.m; sourceTree = "<group>"; };
D249BF5C254D3D170058A6C2 /* CountlyFeedbackWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountlyFeedbackWidget.h; sourceTree = "<group>"; };
D249BF5D254D3D180058A6C2 /* CountlyFeedbackWidget.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyFeedbackWidget.m; sourceTree = "<group>"; };
D2CFEF952545FBE80026B044 /* CountlyFeedbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountlyFeedbacks.h; sourceTree = "<group>"; };
D2CFEF962545FBE80026B044 /* CountlyFeedbacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyFeedbacks.m; sourceTree = "<group>"; };
D2CFEF952545FBE80026B044 /* CountlyFeedbacksInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountlyFeedbacksInternal.h; sourceTree = "<group>"; };
D2CFEF962545FBE80026B044 /* CountlyFeedbacksInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountlyFeedbacksInternal.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -228,8 +228,8 @@
3B20A9782245225A00E3D7AE = {
isa = PBXGroup;
children = (
39BDF7562CC7CA870066DE7C /* CountlyFeedbacksNew.h */,
39BDF7582CC7CA920066DE7C /* CountlyFeedbacksNew.m */,
39BDF7562CC7CA870066DE7C /* CountlyFeedbacks.h */,
39BDF7582CC7CA920066DE7C /* CountlyFeedbacks.m */,
39002D092C8B2E450049394F /* CountlyContentConfig.h */,
39002D0A2C8B2E450049394F /* CountlyContentConfig.m */,
3961C6AF2C6633C000DD38BA /* CountlyWebViewManager.h */,
Expand Down Expand Up @@ -280,8 +280,8 @@
3B20A9AA2245228500E3D7AE /* CountlyDeviceInfo.m */,
3B20A99E2245228400E3D7AE /* CountlyEvent.h */,
3B20A9952245228400E3D7AE /* CountlyEvent.m */,
D2CFEF952545FBE80026B044 /* CountlyFeedbacks.h */,
D2CFEF962545FBE80026B044 /* CountlyFeedbacks.m */,
D2CFEF952545FBE80026B044 /* CountlyFeedbacksInternal.h */,
D2CFEF962545FBE80026B044 /* CountlyFeedbacksInternal.m */,
D249BF5C254D3D170058A6C2 /* CountlyFeedbackWidget.h */,
D249BF5D254D3D180058A6C2 /* CountlyFeedbackWidget.m */,
3B20A99A2245228400E3D7AE /* CountlyLocationManager.h */,
Expand Down Expand Up @@ -332,7 +332,7 @@
files = (
39924ECE2BEBD0B700139F91 /* CountlyCrashesConfig.h in Headers */,
1A478D032AB314750056A5E7 /* CountlyExperimentInformation.h in Headers */,
39BDF7572CC7CA870066DE7C /* CountlyFeedbacksNew.h in Headers */,
39BDF7572CC7CA870066DE7C /* CountlyFeedbacks.h in Headers */,
3B20A9D32245228700E3D7AE /* CountlyPushNotifications.h in Headers */,
3B20A9C42245228700E3D7AE /* CountlyUserDetails.h in Headers */,
3961C6B72C6633C000DD38BA /* PassThroughBackgroundView.h in Headers */,
Expand Down Expand Up @@ -364,7 +364,7 @@
D249BF5E254D3D180058A6C2 /* CountlyFeedbackWidget.h in Headers */,
39924ED82BEBD22100139F91 /* CountlyCrashData.h in Headers */,
399117D22C69F73D00DC4C66 /* CountlyContentBuilderInternal.h in Headers */,
D2CFEF972545FBE80026B044 /* CountlyFeedbacks.h in Headers */,
D2CFEF972545FBE80026B044 /* CountlyFeedbacksInternal.h in Headers */,
39002D0B2C8B2E450049394F /* CountlyContentConfig.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -496,11 +496,11 @@
3B20A9D42245228700E3D7AE /* CountlyPersistency.m in Sources */,
3B20A9B32245228700E3D7AE /* CountlyNotificationService.m in Sources */,
3948A8572BAC2E7D002D09AA /* CountlySDKLimitsConfig.m in Sources */,
D2CFEF982545FBE80026B044 /* CountlyFeedbacks.m in Sources */,
D2CFEF982545FBE80026B044 /* CountlyFeedbacksInternal.m in Sources */,
1A3110632A7128CD001CB507 /* CountlyViewData.m in Sources */,
3961C6B92C6633C000DD38BA /* PassThroughBackgroundView.m in Sources */,
399117D32C69F73D00DC4C66 /* CountlyContentBuilderInternal.m in Sources */,
39BDF7592CC7CA920066DE7C /* CountlyFeedbacksNew.m in Sources */,
39BDF7592CC7CA920066DE7C /* CountlyFeedbacks.m in Sources */,
1A423E9E2A271E46008C4757 /* CountlyRCData.m in Sources */,
3B20A9CB2245228700E3D7AE /* CountlyRemoteConfig.m in Sources */,
3B20A9BD2245228700E3D7AE /* CountlyConnectionManager.m in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion CountlyCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import "CountlyCrashReporter.h"
#import "CountlyConfig.h"
#import "CountlyViewTrackingInternal.h"
#import "CountlyFeedbacks.h"
#import "CountlyFeedbacksInternal.h"
#import "CountlyFeedbackWidget.h"
#import "CountlyPushNotifications.h"
#import "CountlyNotificationService.h"
Expand Down
2 changes: 1 addition & 1 deletion CountlyConsentManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ - (void)setConsentForFeedback:(BOOL)consentForFeedback
{
CLY_LOG_D(@"Consent for Feedback is given.");

[CountlyFeedbacks.sharedInstance checkForStarRatingAutoAsk];
[CountlyFeedbacksInternal.sharedInstance checkForStarRatingAutoAsk];
}
else
{
Expand Down
35 changes: 12 additions & 23 deletions CountlyFeedbacks.h
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
// CountlyFeedbacksInternal.h
// CountlyFeedbacks.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
//

#import <Foundation/Foundation.h>
#import "CountlyConfig.h"
#import "CountlyFeedbackWidget.h"

@class CountlyFeedbackWidget;

extern NSString* const kCountlyFBKeyPlatform;
extern NSString* const kCountlyFBKeyAppVersion;
extern NSString* const kCountlyFBKeyWidgetID;
extern NSString* const kCountlyFBKeyID;

extern NSString* const kCountlyReservedEventStarRating;

@interface CountlyFeedbacks : NSObject
@interface CountlyFeedbacks: NSObject
#if (TARGET_OS_IOS)
+ (instancetype)sharedInstance;

- (void)showDialog:(void(^)(NSInteger rating))completion;
- (void)presentRatingWidgetWithID:(NSString *)widgetID closeButtonText:(NSString *)closeButtonText completionHandler:(void (^)(NSError * error))completionHandler;
- (void)recordRatingWidgetWithID:(NSString *)widgetID rating:(NSInteger)rating email:(NSString *)email comment:(NSString *)comment userCanBeContacted:(BOOL)userCanBeContacted;
- (void)checkForStarRatingAutoAsk;

- (void)getFeedbackWidgets:(void (^)(NSArray <CountlyFeedbackWidget *> *feedbackWidgets, NSError *error))completionHandler;

- (void) presentNPS;
- (void) presentNPS:(NSString *)nameIDorTag;
- (void) presentNPS:(NSString *)nameIDorTag widgetCallback:(WidgetCallback) widgetCallback;

- (void) presentSurvey;
- (void) presentSurvey:(NSString *)nameIDorTag;
- (void) presentSurvey:(NSString *)nameIDorTag widgetCallback:(WidgetCallback) widgetCallback;

- (void) presentRating;
- (void) presentRating:(NSString *)nameIDorTag;
- (void) presentRating:(NSString *)nameIDorTag widgetCallback:(WidgetCallback) widgetCallback;

@property (nonatomic) NSString* message;
@property (nonatomic) NSString* dismissButtonTitle;
@property (nonatomic) NSUInteger sessionCount;
@property (nonatomic) BOOL disableAskingForEachAppVersion;
@property (nonatomic, copy) void (^ratingCompletionForAutoAsk)(NSInteger);
- (void)getAvailableFeedbackWidgets:(void (^)(NSArray <CountlyFeedbackWidget *> *feedbackWidgets, NSError * error))completionHandler;
#endif
@end
Loading

0 comments on commit dab794c

Please sign in to comment.