From 69144b874596b0b5386465020a1b976a107943d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20To=CC=88r?= <3296904+yusuftor@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:27:29 +0200 Subject: [PATCH] fix: build error on Xcode 26.0 from ambiguous CGFloat arithmetic The fontScale expression mixed a CGFloat with Double and Int literals, relying on the implicit CGFloat<->Double conversion. Xcode 26.0's type-checker rejects it as an ambiguous use of '*' (with a cascading error on the DispatchQueue.main.sync overload); later toolchains resolve it. Converting to Double explicitly leaves one solution on every toolchain. Bumps the version to 4.16.3. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 6 ++++++ Sources/SuperwallKit/Misc/Constants.swift | 2 +- .../SuperwallKit/Network/Device Helper/DeviceHelper.swift | 2 +- SuperwallKit.podspec | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 974a4adb3..6996d7851 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The changelog for `SuperwallKit`. Also see the [releases](https://github.com/superwall/Superwall-iOS/releases) on GitHub. +## 4.16.3 + +### Fixes + +- Fixes a build error when compiling the SDK with Xcode 26.0. + ## 4.16.2 ### Enhancements diff --git a/Sources/SuperwallKit/Misc/Constants.swift b/Sources/SuperwallKit/Misc/Constants.swift index 20f05d6af..d238a7fd6 100644 --- a/Sources/SuperwallKit/Misc/Constants.swift +++ b/Sources/SuperwallKit/Misc/Constants.swift @@ -18,5 +18,5 @@ let sdkVersion = """ */ let sdkVersion = """ -4.16.2 +4.16.3 """ diff --git a/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift b/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift index f6119fb6c..c59f84159 100644 --- a/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift +++ b/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift @@ -491,7 +491,7 @@ class DeviceHelper { for: UIScreen.main.traitCollection.userInterfaceStyle ), fontSize: Int(scaledValue.rounded()), - fontScale: ((scaledValue / 16.0) * 100).rounded() / 100, + fontScale: ((Double(scaledValue) / 16.0) * 100).rounded() / 100, preferredContentSizeCategory: contentSizeCategoryToken(for: category) ) } diff --git a/SuperwallKit.podspec b/SuperwallKit.podspec index abfcfc425..7e88ffd14 100644 --- a/SuperwallKit.podspec +++ b/SuperwallKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SuperwallKit" - s.version = "4.16.2" + s.version = "4.16.3" s.summary = "Superwall: In-App Paywalls Made Easy" 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"