Skip to content

Commit 2b80009

Browse files
authored
Release 18.14.1 (#3323)
* Fix banner if image is taller than text * Release 18.14.1
1 parent 3315848 commit 2b80009

9 files changed

+30
-24
lines changed

Airship.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AIRSHIP_VERSION="18.14.0"
1+
AIRSHIP_VERSION="18.14.1"
22

33
Pod::Spec.new do |s|
44
s.version = AIRSHIP_VERSION

Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageBannerView.swift

+12-12
Original file line numberDiff line numberDiff line change
@@ -184,29 +184,29 @@ struct InAppMessageBannerView: View {
184184
private var banner: some View {
185185
messageBody
186186
.frame(maxWidth: theme.maxWidth)
187-
.background(
188-
(displayContent.backgroundColor?.color ?? Color.white)
189-
.cornerRadius(displayContent.borderRadius ?? 0)
190-
.edgesIgnoringSafeArea(displayContent.placement == .top ? .top : .bottom)
191-
.shadow(
192-
color: theme.shadow.color,
193-
radius: theme.shadow.radius,
194-
x: theme.shadow.xOffset,
195-
y: theme.shadow.yOffset
196-
)
197-
)
198187
.background(
199188
GeometryReader(content: { contentMetrics -> Color in
200189
let size = contentMetrics.size
201190
DispatchQueue.main.async {
202-
if self.bannerConstraints.size != lastSize {
191+
if self.lastSize != size {
203192
self.bannerConstraints.size = size
204193
self.lastSize = size
205194
}
206195
}
207196
return Color.airshipTappableClear
208197
})
209198
)
199+
.background(
200+
(displayContent.backgroundColor?.color ?? Color.white)
201+
.cornerRadius(displayContent.borderRadius ?? 0)
202+
.edgesIgnoringSafeArea(displayContent.placement == .top ? .top : .bottom)
203+
.shadow(
204+
color: theme.shadow.color,
205+
radius: theme.shadow.radius,
206+
x: theme.shadow.xOffset,
207+
y: theme.shadow.yOffset
208+
)
209+
)
210210
.showing(isShowing: isShowing)
211211
.padding(theme.padding)
212212
.applyTransitioningPlacement(placement: displayContent.placement ?? .bottom)

Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageHostingController.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class InAppMessageBannerViewController: InAppMessageHostingController<InAppMessa
8383
super.viewDidAppear(animated)
8484

8585
createBannerConstraints()
86-
handleBannerConstraints()
86+
handleBannerConstraints(size: self.bannerConstraints.size)
8787

8888
if UIAccessibility.isVoiceOverRunning {
8989
DispatchQueue.main.asyncAfter(deadline: .now() + InAppMessageBannerView.animationInOutDuration) {
@@ -92,7 +92,7 @@ class InAppMessageBannerViewController: InAppMessageHostingController<InAppMessa
9292
}
9393

9494
subscription = bannerConstraints.$size.sink { [weak self] size in
95-
self?.handleBannerConstraints()
95+
self?.handleBannerConstraints(size: size)
9696
}
9797
}
9898

@@ -113,22 +113,22 @@ class InAppMessageBannerViewController: InAppMessageHostingController<InAppMessa
113113
}
114114
}
115115

116-
func handleBannerConstraints() {
116+
func handleBannerConstraints(size: CGSize) {
117117
self.centerXConstraint?.isActive = true
118118
self.heightConstraint?.isActive = true
119119
self.widthConstraint?.isActive = true
120-
self.widthConstraint?.constant = self.bannerConstraints.size.width
120+
self.widthConstraint?.constant = size.width
121121

122122
switch self.placement {
123123
case .top:
124124
self.topConstraint?.isActive = true
125125
self.bottomConstraint?.isActive = false
126-
self.heightConstraint?.constant = self.bannerConstraints.size.height + self.view.safeAreaInsets.top
126+
self.heightConstraint?.constant = size.height + self.view.safeAreaInsets.top
127127

128128
default:
129129
self.topConstraint?.isActive = false
130130
self.bottomConstraint?.isActive = true
131-
self.heightConstraint?.constant = self.bannerConstraints.size.height + self.view.safeAreaInsets.bottom
131+
self.heightConstraint?.constant = size.height + self.view.safeAreaInsets.bottom
132132
}
133133

134134
self.view.layoutIfNeeded()

Airship/AirshipConfig.xcconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//* Copyright Airship and Contributors */
22

3-
CURRENT_PROJECT_VERSION = 18.14.0
3+
CURRENT_PROJECT_VERSION = 18.14.1
44

55
// Uncomment to include the preview build warning
66
// OTHER_CFLAGS = $(inherited) -DUA_PREVIEW=1

Airship/AirshipCore/Source/AirshipVersion.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Foundation
44

55
public struct AirshipVersion {
6-
public static let version = "18.14.0"
6+
public static let version = "18.14.1"
77
public static func get() -> String {
88
return version
99
}

AirshipContentExtension.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AIRSHIP_VERSION="18.14.0"
1+
AIRSHIP_VERSION="18.14.1"
22

33
Pod::Spec.new do |s|
44
s.version = AIRSHIP_VERSION

AirshipDebug.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AIRSHIP_VERSION="18.14.0"
1+
AIRSHIP_VERSION="18.14.1"
22

33
Pod::Spec.new do |s|
44
s.version = AIRSHIP_VERSION

AirshipServiceExtension.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AIRSHIP_VERSION="18.14.0"
1+
AIRSHIP_VERSION="18.14.1"
22

33
Pod::Spec.new do |s|
44
s.version = AIRSHIP_VERSION

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11

22
# iOS Changelog
33

4+
## Version 18.14.1 December 20, 2024
5+
Patch release to fix Banner In-App Automations if the image is taller than the text.
6+
7+
### Changes
8+
- Fix Banner In-App Automation sizing issue.
9+
410
## Version 18.14.0 December 19, 2024
511
Minor release that fixes issues with Banner In-App Automations, reduces power usage with In-App Automations & Scenes, and updates how Feature Flags are resolved.
612

0 commit comments

Comments
 (0)