Skip to content

Commit

Permalink
Merge pull request #203 from Countly/staging
Browse files Browse the repository at this point in the history
For 22.06.1
  • Loading branch information
ArtursKadikis committed Aug 22, 2022
2 parents 8c3d4e4 + fc2f570 commit 33dff45
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 14 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 22.06.1
- Fixed user details consent issue on SDK start
- Updated feedback widget internal webview design and layout

- Other various improvements
- Updated HeaderDocs, internal logs, inline notes and pragma marks



## 22.06.0
- Added `CountlyAutoViewTrackingName` protocol for supporting custom view titles with AutoViewTracking
- Added `setNewURLSessionConfiguration:` method to be able change URL session configuraion on the go (thanks @angelix)
Expand Down
2 changes: 1 addition & 1 deletion Countly-PL.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Countly-PL'
s.version = '22.06.0'
s.version = '22.06.1'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
s.homepage = 'https://github.com/Countly/countly-sdk-ios'
Expand Down
4 changes: 2 additions & 2 deletions Countly.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param widgetID ID of the feedback widget created on Countly Server.
* @param completionHandler A completion handler block to be executed when feedback widget is dismissed by user or there is an error.
*/
- (void)presentFeedbackWidgetWithID:(NSString *)widgetID completionHandler:(void (^)(NSError * __nullable error))completionHandler DEPRECATED_MSG_ATTRIBUTE("Use 'presentRatingWidgetWithID:' method instead!");
- (void)presentFeedbackWidgetWithID:(NSString *)widgetID completionHandler:(void (^)(NSError * __nullable error))completionHandler DEPRECATED_MSG_ATTRIBUTE("Use 'presentRatingWidgetWithID:completionHandler' method instead!");

/**
* Presents rating widget with given ID in a WKWebView placed in a UIViewController.
Expand Down Expand Up @@ -599,7 +599,7 @@ NS_ASSUME_NONNULL_BEGIN

/**
* Records indirect attribution with given key-value pairs.
* @discussion Keys could be a predefined CLYAttributionKey or any non-zero length valid string.
* @discussion Keys could be a predefined @c CLYAttributionKey or any non-zero length valid string.
* @discussion This method sends an immediate request.
* @discussion Calls to this method will be ignored if:
* @discussion - Consent for @c CLYConsentAttribution is not given, while @c requiresConsent flag is set on initial configuration.
Expand Down
2 changes: 1 addition & 1 deletion Countly.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Countly'
s.version = '22.06.0'
s.version = '22.06.1'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.summary = 'Countly is an innovative, real-time, open source mobile analytics platform.'
s.homepage = 'https://github.com/Countly/countly-sdk-ios'
Expand Down
4 changes: 2 additions & 2 deletions Countly.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 22.06.0;
MARKETING_VERSION = 22.06.1;
PRODUCT_BUNDLE_IDENTIFIER = ly.count.CountlyiOSSDK;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -439,7 +439,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 22.06.0;
MARKETING_VERSION = 22.06.1;
PRODUCT_BUNDLE_IDENTIFIER = ly.count.CountlyiOSSDK;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 2 additions & 0 deletions CountlyCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#if (TARGET_OS_IOS)
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>
#endif

#if (TARGET_OS_WATCH)
Expand Down Expand Up @@ -104,6 +105,7 @@ void CountlyPrint(NSString *stringToPrint);

#if (TARGET_OS_IOS)
@interface CLYInternalViewController : UIViewController
@property (nonatomic, weak) WKWebView* webView;
@end

@interface CLYButton : UIButton
Expand Down
24 changes: 23 additions & 1 deletion CountlyCommon.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ @interface CountlyCommon ()
#endif
@end

NSString* const kCountlySDKVersion = @"22.06.0";
NSString* const kCountlySDKVersion = @"22.06.1";
NSString* const kCountlySDKName = @"objc-native-ios";

NSString* const kCountlyErrorDomain = @"ly.count.ErrorDomain";
Expand Down Expand Up @@ -293,6 +293,28 @@ - (void)tryPresentingViewController:(UIViewController *)viewController withCompl
#if (TARGET_OS_IOS)
@implementation CLYInternalViewController : UIViewController

- (void)viewWillLayoutSubviews
{
[super viewWillLayoutSubviews];

if (self.webView)
{
CGRect frame = CGRectInset(self.view.bounds, 20.0, 20.0);

UIEdgeInsets insets = UIEdgeInsetsZero;
if (@available(iOS 11.0, *))
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
insets = UIApplication.sharedApplication.keyWindow.safeAreaInsets;
#pragma GCC diagnostic pop
}

frame = UIEdgeInsetsInsetRect(frame, insets);
self.webView.frame = frame;
}
}

@end


Expand Down
7 changes: 4 additions & 3 deletions CountlyConsentManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ - (void)giveConsentForFeatures:(NSArray *)features
//NOTE: Otherwise, if location consent is given after sessions consent, begin_session request will be sent with an empty string as location.
if ([features containsObject:CLYConsentLocation] && !self.consentForLocation)
self.consentForLocation = YES;

if ([features containsObject:CLYConsentUserDetails] && !self.consentForUserDetails)
self.consentForUserDetails = YES;

if ([features containsObject:CLYConsentSessions] && !self.consentForSessions)
self.consentForSessions = YES;

if ([features containsObject:CLYConsentEvents] && !self.consentForEvents)
self.consentForEvents = YES;

if ([features containsObject:CLYConsentUserDetails] && !self.consentForUserDetails)
self.consentForUserDetails = YES;

if ([features containsObject:CLYConsentCrashReporting] && !self.consentForCrashReporting)
self.consentForCrashReporting = YES;

Expand Down Expand Up @@ -260,6 +260,7 @@ - (void)setConsentForUserDetails:(BOOL)consentForUserDetails
if (consentForUserDetails)
{
CLY_LOG_D(@"Consent for UserDetails is given.");
[Countly.user save];
}
else
{
Expand Down
12 changes: 8 additions & 4 deletions CountlyFeedbackWidget.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ - (void)presentWithAppearBlock:(void(^ __nullable)(void))appearBlock andDismissB
return;

__block CLYInternalViewController* webVC = CLYInternalViewController.new;
webVC.view.backgroundColor = UIColor.whiteColor;
webVC.view.bounds = UIScreen.mainScreen.bounds;
webVC.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.4];
webVC.modalPresentationStyle = UIModalPresentationCustom;

WKWebView* webView = [WKWebView.alloc initWithFrame:webVC.view.bounds];
webView.layer.shadowColor = UIColor.blackColor.CGColor;
webView.layer.shadowOpacity = 0.5;
webView.layer.shadowOffset = (CGSize){0.0f, 5.0f};
webView.layer.masksToBounds = NO;
webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[webVC.view addSubview:webView];
webVC.webView = webView;
NSURLRequest* request = [self displayRequest];
[webView loadRequest:request];

Expand All @@ -76,8 +80,8 @@ - (void)presentWithAppearBlock:(void(^ __nullable)(void))appearBlock andDismissB

[self recordReservedEventForDismissing];
};
[webVC.view addSubview:dismissButton];
[dismissButton positionToTopRightConsideringStatusBar];
[webView addSubview:dismissButton];
[dismissButton positionToTopRight];

[CountlyCommon.sharedInstance tryPresentingViewController:webVC withCompletion:appearBlock];
}
Expand Down

0 comments on commit 33dff45

Please sign in to comment.