diff --git a/Framework/Info.plist b/Framework/Info.plist
index b6d898c4..b7b3ddc7 100644
--- a/Framework/Info.plist
+++ b/Framework/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 5.12.5
+ 5.12.6
CFBundleSignature
????
CFBundleVersion
diff --git a/Qonversion.podspec b/Qonversion.podspec
index 83d47d4b..43762146 100644
--- a/Qonversion.podspec
+++ b/Qonversion.podspec
@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
idfa_exclude_files = ['Sources/Qonversion/IDFA']
s.name = 'Qonversion'
s.swift_version = '5.5'
- s.version = '5.12.5'
+ s.version = '5.12.6'
s.summary = 'qonversion.io'
s.description = <<-DESC
Deep Analytics for iOS Subscriptions
diff --git a/Sources/Qonversion/Automations/Main/QONAutomationsFlowCoordinator/QONAutomationsFlowCoordinator.m b/Sources/Qonversion/Automations/Main/QONAutomationsFlowCoordinator/QONAutomationsFlowCoordinator.m
index 76cb1703..99f11bab 100644
--- a/Sources/Qonversion/Automations/Main/QONAutomationsFlowCoordinator/QONAutomationsFlowCoordinator.m
+++ b/Sources/Qonversion/Automations/Main/QONAutomationsFlowCoordinator/QONAutomationsFlowCoordinator.m
@@ -136,11 +136,32 @@ - (void)showAutomationWithID:(NSString *)automationID completion:(nullable QONSh
if (configuration.presentationStyle == QONScreenPresentationStylePush) {
[presentationViewController.navigationController pushViewController:viewController animated:configuration.animated];
} else {
- QONAutomationsNavigationController *navigationController = [[QONAutomationsNavigationController alloc] initWithRootViewController:viewController];
- navigationController.navigationBarHidden = YES;
UIModalPresentationStyle style = configuration.presentationStyle == QONScreenPresentationStylePopover ? UIModalPresentationPopover : UIModalPresentationFullScreen;
- navigationController.modalPresentationStyle = style;
- [presentationViewController presentViewController:navigationController animated:configuration.animated completion:nil];
+
+ if (style == UIModalPresentationPopover) {
+ viewController.modalPresentationStyle = style;
+
+ UIView *sourceView = nil;
+ if ([weakSelf.screenCustomizationDelegate respondsToSelector:@selector(viewForPopoverPresentation)]) {
+ sourceView = [weakSelf.screenCustomizationDelegate viewForPopoverPresentation];
+ }
+
+ if (sourceView) {
+ viewController.popoverPresentationController.sourceRect = sourceView.bounds;
+ viewController.popoverPresentationController.sourceView = sourceView;
+ } else {
+ viewController.popoverPresentationController.permittedArrowDirections = 0;
+ viewController.popoverPresentationController.sourceRect = CGRectMake(CGRectGetMidX(presentationViewController.view.bounds), CGRectGetMidY(presentationViewController.view.bounds),0,0);
+ viewController.popoverPresentationController.sourceView = presentationViewController.view;
+ }
+
+ [presentationViewController presentViewController:viewController animated:configuration.animated completion:nil];
+ } else {
+ QONAutomationsNavigationController *navigationController = [[QONAutomationsNavigationController alloc] initWithRootViewController:viewController];
+ navigationController.navigationBarHidden = YES;
+ navigationController.modalPresentationStyle = style;
+ [presentationViewController presentViewController:navigationController animated:configuration.animated completion:nil];
+ }
}
run_block_on_main(completion, true, nil);
diff --git a/Sources/Qonversion/Public/QONConfiguration.m b/Sources/Qonversion/Public/QONConfiguration.m
index 546aeceb..06f6c848 100644
--- a/Sources/Qonversion/Public/QONConfiguration.m
+++ b/Sources/Qonversion/Public/QONConfiguration.m
@@ -9,7 +9,7 @@
#import "QONConfiguration.h"
#import "QNAPIConstants.h"
-static NSString *const kSDKVersion = @"5.12.5";
+static NSString *const kSDKVersion = @"5.12.6";
@interface QONConfiguration ()
diff --git a/Sources/Qonversion/Public/QONScreenCustomizationDelegate.h b/Sources/Qonversion/Public/QONScreenCustomizationDelegate.h
index a3fd809c..04744204 100644
--- a/Sources/Qonversion/Public/QONScreenCustomizationDelegate.h
+++ b/Sources/Qonversion/Public/QONScreenCustomizationDelegate.h
@@ -8,6 +8,8 @@
#import "QONScreenPresentationConfiguration.h"
+@class UIView;
+
/**
The delegate is responsible for customizing screens representation
*/
@@ -23,4 +25,12 @@ NS_SWIFT_NAME(Qonversion.ScreenCustomizationDelegate)
- (QONScreenPresentationConfiguration * _Nonnull)presentationConfigurationForScreen:(NSString * _Nonnull)screenId
NS_SWIFT_NAME(presentationConfigurationForScreen(_:));;
+/**
+ View for popover presentation style for iPad. A new popover will be presented from this view
+ Used only for Qonversion.ScreenPresentationStyle == .popover for iPad.
+ You can omit implementing this delegate function if you do not support iPad or do not use popover presentation style.
+ */
+- (UIView * _Nullable)viewForPopoverPresentation
+NS_SWIFT_NAME(viewForPopoverPresentation());
+
@end
diff --git a/fastlane/report.xml b/fastlane/report.xml
index 726432fb..921e0214 100644
--- a/fastlane/report.xml
+++ b/fastlane/report.xml
@@ -5,12 +5,12 @@
-
+
-
+