Skip to content

Commit 4da6dc6

Browse files
Merge pull request #380 from Kommunicate-io/dev
Release 1.5.2
2 parents 157dc4c + d3aed35 commit 4da6dc6

15 files changed

Lines changed: 112 additions & 16 deletions

CHANGELOG.md

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

33
The changelog for [KommunicateChatUI-iOS-SDK](https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK). Also see the [releases](https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK/releases) on Github.
44

5+
## [1.5.2] 2025-10-22
6+
- Fixed the glass effect bug with iOS 26 versions.
7+
- Fixed dark icon issue with iOS 26 versions.
8+
59
## [1.5.1] 2025-09-16
610
- Form UI Customisation Added.
711
- Video Preview Inhancement.

Demo/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ PODS:
1515
- iOSSnapshotTestCase/SwiftSupport (8.0.0):
1616
- iOSSnapshotTestCase/Core
1717
- Kingfisher (7.10.2)
18-
- KommunicateChatUI-iOS-SDK (1.5.1):
19-
- KommunicateChatUI-iOS-SDK/Complete (= 1.5.1)
20-
- KommunicateChatUI-iOS-SDK/Complete (1.5.1):
18+
- KommunicateChatUI-iOS-SDK (1.5.2):
19+
- KommunicateChatUI-iOS-SDK/Complete (= 1.5.2)
20+
- KommunicateChatUI-iOS-SDK/Complete (1.5.2):
2121
- iOSDropDown
2222
- Kingfisher (~> 7.10.0)
2323
- KommunicateChatUI-iOS-SDK/RichMessageKit
2424
- KommunicateCore-iOS-SDK (= 1.3.1)
2525
- SwipeCellKit (~> 2.7.1)
26-
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.5.1)
26+
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.5.2)
2727
- KommunicateCore-iOS-SDK (1.3.1)
2828
- Nimble (13.7.1):
2929
- CwlPreconditionTesting (~> 2.2.0)
@@ -76,7 +76,7 @@ SPEC CHECKSUMS:
7676
iOSDropDown: ce9daa584eaa5567cafc1b633e3cc7eb6d9cea42
7777
iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f
7878
Kingfisher: 99edc495d3b7607e6425f0d6f6847b2abd6d716d
79-
KommunicateChatUI-iOS-SDK: fe35f0d194e5ca6cd2c2f75416666a67550155fa
79+
KommunicateChatUI-iOS-SDK: 58362240dfcd580de4f8ac6fb04a32b83bf49df5
8080
KommunicateCore-iOS-SDK: 90a88f9bd76a4fc53984e925027ae80d60b04ea3
8181
Nimble: 317d713c30c3336dd8571da1889f7ec3afc626e8
8282
Nimble-Snapshots: 240ea76ee8e52dfc1387b8d0d9bf1db3420cabbd

KommunicateChatUI-iOS-SDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KommunicateChatUI-iOS-SDK'
3-
s.version = '1.5.1'
3+
s.version = '1.5.2'
44
s.license = { :type => "BSD 3-Clause", :file => "LICENSE" }
55
s.summary = 'KommunicateChatUI-iOS-SDK Kit'
66
s.homepage = 'https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK'

Sources/Controllers/KMChatBaseViewController.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open class KMChatBaseViewController: UIViewController, KMChatConfigurable {
4343
if configuration.hideNavigationBarBottomLine {
4444
navigationController?.navigationBar.hideBottomHairline()
4545
}
46+
configureNavigationBarButtonsForIOS26()
4647
}
4748

4849
override open func viewDidLoad() {
@@ -99,4 +100,15 @@ open class KMChatBaseViewController: UIViewController, KMChatConfigurable {
99100
backButton.accessibilityIdentifier = "conversationBackButton"
100101
return backButton
101102
}
103+
104+
open func configureNavigationBarButtonsForIOS26() {
105+
if #available(iOS 26.0, *) {
106+
navigationItem.rightBarButtonItems?.forEach {
107+
$0.hidesSharedBackground = true
108+
}
109+
navigationItem.leftBarButtonItems?.forEach {
110+
$0.hidesSharedBackground = true
111+
}
112+
}
113+
}
102114
}

Sources/Controllers/KMChatConversationListViewController.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ open class KMChatConversationListViewController: KMChatBaseViewController, Local
240240
if !configuration.hideBackButtonInConversationList {
241241
navigationItem.leftBarButtonItem = leftBarButtonItem
242242
}
243+
configureNavigationBarButtonsForIOS26()
243244
}
244245

245246
func setupNavigationRightButtons() {
@@ -251,7 +252,8 @@ open class KMChatConversationListViewController: KMChatBaseViewController, Local
251252
let barButton = UIBarButtonItem(
252253
image: UIImage(named: "search", in: Bundle.km, compatibleWith: nil),
253254
style: .plain,
254-
target: self, action: #selector(searchTapped)
255+
target: self,
256+
action: #selector(searchTapped)
255257
)
256258
rightBarButtonItems.append(barButton)
257259
}
@@ -261,16 +263,17 @@ open class KMChatConversationListViewController: KMChatBaseViewController, Local
261263
}
262264

263265
for item in navigationItems {
264-
let uiBarButtonItem = item.barButton(target: self, action: #selector(customButtonEvent(_:)))
265-
266-
if let barButtonItem = uiBarButtonItem {
266+
if let barButtonItem = item.barButton(target: self, action: #selector(customButtonEvent(_:))) {
267267
rightBarButtonItems.append(barButtonItem)
268268
}
269269
}
270+
270271
if !rightBarButtonItems.isEmpty {
271-
let rightButtons = rightBarButtonItems.prefix(3)
272-
navigationItem.rightBarButtonItems = Array(rightButtons)
272+
let rightButtons = Array(rightBarButtonItems.prefix(3))
273+
navigationItem.rightBarButtonItems = rightButtons
273274
}
275+
276+
configureNavigationBarButtonsForIOS26()
274277
}
275278

276279
func setupSearchController() {

Sources/Controllers/KMChatConversationViewController.swift

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,14 @@ open class KMChatConversationViewController: KMChatBaseViewController, Localizab
438438
}
439439
let profile = weakSelf.viewModel.conversationProfileFrom(contact: nil, channel: channel)
440440
weakSelf.navigationBar.updateView(profile: profile)
441+
if #available(iOS 26.0, *) {
442+
weakSelf.navigationItem.rightBarButtonItems?.forEach {
443+
$0.hidesSharedBackground = true
444+
}
445+
weakSelf.navigationItem.leftBarButtonItems?.forEach {
446+
$0.hidesSharedBackground = true
447+
}
448+
}
441449
weakSelf.newMessagesAdded()
442450
})
443451

@@ -469,6 +477,14 @@ open class KMChatConversationViewController: KMChatBaseViewController, Localizab
469477
self.viewModel.currentConversationProfile(completion: { profile in
470478
guard let profile = profile else { return }
471479
self.navigationBar.updateView(profile: profile)
480+
if #available(iOS 26.0, *) {
481+
self.navigationItem.rightBarButtonItems?.forEach {
482+
$0.hidesSharedBackground = true
483+
}
484+
self.navigationItem.leftBarButtonItems?.forEach {
485+
$0.hidesSharedBackground = true
486+
}
487+
}
472488
})
473489
#if canImport(ChatProvidersSDK)
474490
guard KMZendeskChatHandler.shared.isZendeskEnabled(),
@@ -840,6 +856,7 @@ open class KMChatConversationViewController: KMChatBaseViewController, Localizab
840856
guard !items.contains(where: { $0.customView == navigationBar }) else { return }
841857
items.append(UIBarButtonItem(customView: navigationBar))
842858
navigationItem.leftBarButtonItems = items
859+
configureNavigationBarButtonsForIOS26()
843860
}
844861

845862
private func prepareTable() {
@@ -2671,6 +2688,7 @@ extension KMChatConversationViewController: KMChatConversationViewModelDelegate
26712688
public func updateDisplay(contact: ALContact?, channel: KMCoreChannel?) {
26722689
let profile = viewModel.conversationProfileFrom(contact: contact, channel: channel)
26732690
navigationBar.updateView(profile: profile)
2691+
configureNavigationBarButtonsForIOS26()
26742692
}
26752693

26762694
// Call this if the last message is not fully visible.
@@ -2695,13 +2713,14 @@ extension KMChatConversationViewController: KMChatConversationViewModelDelegate
26952713
if configuration.rightNavBarSystemIconForConversationView == .refresh {
26962714
selector = #selector(KMChatConversationViewController.refreshButtonAction(_:))
26972715
let refresh = UIImage(named: "refreshIcon", in: Bundle.km, compatibleWith: nil)
2698-
let refreshIcon = refresh?.withRenderingMode(.alwaysOriginal).scale(with: CGSize(width: 20, height: 20))
2716+
let refreshIcon = refresh?.withRenderingMode(.alwaysTemplate).scale(with: CGSize(width: 20, height: 20))
26992717
button = UIBarButtonItem(
27002718
image: refreshIcon,
27012719
style: .plain,
27022720
target: self,
27032721
action: selector
27042722
)
2723+
button.tintColor = configuration.refreshButtonIconColor
27052724

27062725
} else {
27072726
button = UIBarButtonItem(
@@ -2757,6 +2776,7 @@ extension KMChatConversationViewController: KMChatConversationViewModelDelegate
27572776
if !rightBarButtonItems.isEmpty {
27582777
navigationItem.rightBarButtonItems = rightBarButtonItems
27592778
}
2779+
configureNavigationBarButtonsForIOS26()
27602780
}
27612781

27622782
@objc open func showFeedback() {}
@@ -2806,6 +2826,7 @@ extension KMChatConversationViewController: KMChatConversationViewModelDelegate
28062826
self.loadingIndicator.stopLoading()
28072827
self.navigationBar.updateView(profile: profile)
28082828
}
2829+
configureNavigationBarButtonsForIOS26()
28092830
}
28102831

28112832
public func showChatBarForOperator() {

Sources/Controllers/KMChatCustomCameraViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ final class KMChatCustomCameraViewController: KMChatBaseViewController, AVCaptur
182182
private func setupNavigation() {
183183
var backImage = UIImage(named: "icon_back", in: Bundle.km, compatibleWith: nil)
184184
backImage = backImage?.imageFlippedForRightToLeftLayoutDirection()
185-
navigationItem.leftBarButtonItem = UIBarButtonItem(image: backImage, style: .plain, target: self, action: #selector(dismissCameraPress(_:)))
185+
var backButton = UIBarButtonItem(image: backImage, style: .plain, target: self, action: #selector(dismissCameraPress(_:)))
186+
backButton.tintColor = configuration.bottomSheetNavIconColor
187+
navigationItem.leftBarButtonItem = backButton
188+
configureNavigationBarButtonsForIOS26()
186189
}
187190

188191
private func setupView() {

Sources/Controllers/KMChatCustomPickerViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class KMChatCustomPickerViewController: KMChatBaseViewController, Localizable {
4444
super.viewDidLoad()
4545
view.backgroundColor = UIColor.kmDynamicColor(light: UIColor.white, dark: UIColor.appBarDarkColor())
4646
doneButton.title = localizedString(forKey: "DoneButton", withDefaultValue: SystemMessage.ButtonName.Done, fileName: localizedStringFileName)
47+
doneButton.tintColor = configuration.bottomSheetNavIconColor
4748
title = localizedString(forKey: "PhotosTitle", withDefaultValue: SystemMessage.LabelName.Photos, fileName: localizedStringFileName)
4849
checkPhotoLibraryPermission()
4950
previewGallery.delegate = self
@@ -79,7 +80,10 @@ class KMChatCustomPickerViewController: KMChatBaseViewController, Localizable {
7980
private func setupNavigation() {
8081
var backImage = UIImage(named: "icon_back", in: Bundle.km, compatibleWith: nil)
8182
backImage = backImage?.imageFlippedForRightToLeftLayoutDirection()
82-
navigationItem.leftBarButtonItem = UIBarButtonItem(image: backImage, style: .plain, target: self, action: #selector(dismissAction(_:)))
83+
var backButton = UIBarButtonItem(image: backImage, style: .plain, target: self, action: #selector(dismissAction(_:)))
84+
backButton.tintColor = configuration.bottomSheetNavIconColor
85+
navigationItem.leftBarButtonItem = backButton
86+
configureNavigationBarButtonsForIOS26()
8387
}
8488

8589
private func checkPhotoLibraryPermission() {

Sources/Controllers/KMChatDocumentViewerController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ class KMChatDocumentViewerController: UIViewController, WKNavigationDelegate {
4444
super.viewWillAppear(animated)
4545
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(showShare(_:)))
4646
title = fileName
47+
if #available(iOS 26.0, *) {
48+
navigationItem.rightBarButtonItems?.forEach {
49+
$0.hidesSharedBackground = true
50+
}
51+
navigationItem.leftBarButtonItems?.forEach {
52+
$0.hidesSharedBackground = true
53+
}
54+
}
4755
}
4856

4957
@objc func showShare(_: Any?) {

Sources/Controllers/KMChatGroupDescriptionController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ class KMChatGroupDescriptionController: KMChatBaseViewController, Localizable {
174174
let saveButtonTitleText = localizedString(forKey: "SaveButtonTitle", withDefaultValue: SystemMessage.ButtonName.Save, fileName: configuration.localizedStringFileName)
175175
let saveButonItem = UIBarButtonItem(title: saveButtonTitleText, style: .plain, target: self, action: #selector(saveButtonAction))
176176
navigationItem.rightBarButtonItem = saveButonItem
177+
configureNavigationBarButtonsForIOS26()
177178
}
178179

179180
private func setupView() {

0 commit comments

Comments
 (0)