Skip to content

Commit fb0372c

Browse files
authored
Merge pull request #427 from superwall/develop
4.12.9
2 parents bc90448 + c5fa658 commit fb0372c

File tree

6 files changed

+41
-10
lines changed

6 files changed

+41
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
The changelog for `SuperwallKit`. Also see the [releases](https://github.com/superwall/Superwall-iOS/releases) on GitHub.
44

5+
## 4.12.9
6+
7+
### Fixes
8+
9+
- Updates Superscript version to 1.0.13. This fixes an issue with String and Int comparison. View the original Rust release changelog [here](https://github.com/superwall/superscript/releases/tag/1.0.13).
10+
- Fixes an issue where dismissing a modally presented paywall didn't fire `paywall_decline`.
11+
512
## 4.12.8
613

714
### Enhancements

Examples/Advanced/Advanced.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
)
2020
],
2121
dependencies: [
22-
.package(url: "https://github.com/superwall/Superscript-iOS", .exact("1.0.12"))
22+
.package(url: "https://github.com/superwall/Superscript-iOS", .exact("1.0.13"))
2323
],
2424
targets: [
2525
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

Sources/SuperwallKit/Misc/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ let sdkVersion = """
1818
*/
1919

2020
let sdkVersion = """
21-
4.12.8
21+
4.12.9
2222
"""

Sources/SuperwallKit/Paywall/View Controller/PaywallViewController.swift

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,20 @@ extension PaywallViewController: UIAdaptivePresentationControllerDelegate {
10411041
)
10421042
}
10431043

1044+
public func presentationControllerDidDismiss(
1045+
_ presentationController: UIPresentationController
1046+
) {
1047+
// Guard against double-dismiss: if didAttemptToDismiss already
1048+
// triggered our dismiss(), closeReason will already be set.
1049+
guard paywall.closeReason == .none else {
1050+
return
1051+
}
1052+
dismiss(
1053+
result: .declined,
1054+
closeReason: .manualClose
1055+
)
1056+
}
1057+
10441058
/// Marks that a redeem succeeded while the checkout web view is open.
10451059
/// Cancels any pending transaction abandon tracking.
10461060
func markRedeemInitiated() {
@@ -1294,10 +1308,20 @@ extension PaywallViewController {
12941308
// Fetch intro offer eligibility tokens for SK2 purchases on iOS 18.2+
12951309
fetchIntroOfferTokens()
12961310

1297-
if willShowSurvey {
1298-
didDisableSwipeForSurvey = true
1311+
switch presentationStyle {
1312+
case .modal, .drawer:
1313+
let shouldShowSurvey = willShowSurvey
12991314
presentationController?.delegate = self
1300-
isModalInPresentation = true
1315+
if shouldShowSurvey {
1316+
didDisableSwipeForSurvey = true
1317+
isModalInPresentation = true
1318+
}
1319+
default:
1320+
if willShowSurvey {
1321+
didDisableSwipeForSurvey = true
1322+
presentationController?.delegate = self
1323+
isModalInPresentation = true
1324+
}
13011325
}
13021326
addShimmerView(onPresent: true)
13031327

SuperwallKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SuperwallKit"
4-
s.version = "4.12.8"
4+
s.version = "4.12.9"
55
s.summary = "Superwall: In-App Paywalls Made Easy"
66
s.description = "Paywall infrastructure for mobile apps :) we make things like editing your paywall and running price tests as easy as clicking a few buttons. superwall.com"
77

0 commit comments

Comments
 (0)