Skip to content

Commit c053be9

Browse files
Release - swiftui/1.1.3
1 parent f36fbe5 commit c053be9

File tree

43 files changed

+537
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+537
-112
lines changed

CHANGELOG.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,2 @@
1-
## New Interfaces
2-
- Use `GlobalOptions.hidesSharedBackgroundForCustomNavBarButton` to hide or show the default liquid glass effect from customized SendbirdSwiftUI navigation bar buttons in iOS 26 or above.
3-
- Set this flag to `true` to hide it.
4-
5-
## Improvements
6-
- Updated **SendbirdSwiftUI** to be built with Xcode 26.0.
7-
8-
## ⚠️ Compatibility Notice
9-
**SendbirdSwiftUI** v1.1.1 or earlier is not compatible with **SendbirdChatSDK** v4.32.0 or higher.
10-
Please use **SendbirdChatSDK** <= 4.30.0 with **SendbirdSwiftUI** <= v1.1.1.
11-
12-
To use **SendbirdChatSDK** ≥ 4.32.0, please update **SendbirdSwiftUI** to v1.1.2 or later.
13-
1+
## Improvements
2+
- Fixed missing navigation bar when using SendbirdSwiftUI views in a TabView

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ let package = Package(
1616
dependencies: [
1717
.package(
1818
url: "https://github.com/sendbird/sendbird-chat-sdk-ios",
19-
from: "4.32.0"
19+
from: "4.34.1"
2020
),
2121
.package(
2222
url: "https://github.com/sendbird/sendbird-uikit-ios-spm",
23-
from: "3.32.3"
23+
from: "3.32.4"
2424
),
2525
],
2626
targets: [
2727
.binaryTarget(
2828
name: "SendbirdSwiftUI",
29-
url: "https://github.com/sendbird/sendbird-swiftui-ios/releases/download/1.1.2/SendbirdSwiftUI.xcframework.zip", // SendbirdSwiftUI_URL
30-
checksum: "91c877b1b9e66e8d456a4b461ab52b3a7f6a0b7959c02fc183dd3d0c4c5d2199" // SendbirdSwiftUI_CHECKSUM
29+
url: "https://github.com/sendbird/sendbird-swiftui-ios/releases/download/1.1.3/SendbirdSwiftUI.xcframework.zip", // SendbirdSwiftUI_URL
30+
checksum: "7d0e6ebf7305cdd7aae183b4810d12ebf5dc440900f8b242de1b2affd3a7c81a" // SendbirdSwiftUI_CHECKSUM
3131
),
3232
.target(
3333
name: "SendbirdSwiftUITarget",

Sample/QuickStartSwiftUI.xcodeproj/project.pbxproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
193FF15E70578558727AB9AA /* SBUFeedNotificationCellParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68C5044109960435BBDBF86 /* SBUFeedNotificationCellParams.swift */; };
124124
1985015BBDC92D9FFFCDCC12 /* GroupChannelViewConverter.Input.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FB13DE92ED80900AD05054 /* GroupChannelViewConverter.Input.swift */; };
125125
19B611A4548CFA8C5102D78C /* SBUBaseChannelListModule.Header.swift in Sources */ = {isa = PBXBuildFile; fileRef = E60ABCC74B32B1B8BD7232BD /* SBUBaseChannelListModule.Header.swift */; };
126+
1A30E0BD7EAEA23DBB08D0F8 /* SBUBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B125726A8A83C3A03771C4B /* SBUBaseViewModel.swift */; };
126127
1A4D92E04F069A9308EBDEBC /* SBUMultipleFilesMessageCellParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3046107CAA8EAABF90DD8218 /* SBUMultipleFilesMessageCellParams.swift */; };
127128
1A64C2B2F4DE4F40EB6D4143 /* CustomOpenModerations.SwiftUI.View.CustomMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 031A3770C7F979E10B2F46B2 /* CustomOpenModerations.SwiftUI.View.CustomMain.swift */; };
128129
1A83A9D1452EB3E5A9746056 /* CustomOpenChannel.ViewConverter.Input.entireView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C2CA31E5B4CC3F3DAE26D97 /* CustomOpenChannel.ViewConverter.Input.entireView.swift */; };
@@ -1314,6 +1315,7 @@
13141315
2ADEBE78ECAF2FB8B6CD1A96 /* SBUDownloadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUDownloadManager.swift; sourceTree = "<group>"; };
13151316
2AF37FB8A55745647820E475 /* SBUBarButtonItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUBarButtonItem.swift; sourceTree = "<group>"; };
13161317
2AFB3ABEC66B7B5DF2B1C6C1 /* SBUDashboardConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUDashboardConfig.swift; sourceTree = "<group>"; };
1318+
2B125726A8A83C3A03771C4B /* SBUBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUBaseViewModel.swift; sourceTree = "<group>"; };
13171319
2B41B61973E52E8F8B861399 /* CustomCreateOpenChannel.ViewConverter.List.profileImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomCreateOpenChannel.ViewConverter.List.profileImage.swift; sourceTree = "<group>"; };
13181320
2B50481174F97B1EE25DA725 /* Sendbird.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sendbird.swift; sourceTree = "<group>"; };
13191321
2B719C1C7BCA50103B2FD33F /* CreateGroupChannelView+SubViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CreateGroupChannelView+SubViewBuilder.swift"; sourceTree = "<group>"; };
@@ -2491,6 +2493,7 @@
24912493
115DD1E49CB4A60C09E572DF /* Common */ = {
24922494
isa = PBXGroup;
24932495
children = (
2496+
2B125726A8A83C3A03771C4B /* SBUBaseViewModel.swift */,
24942497
43029E52C382D59F27DB2770 /* SBUCommonDelegate.swift */,
24952498
);
24962499
path = Common;
@@ -7141,6 +7144,7 @@
71417144
D7C7A88AFF4A08EF7105823E /* SBUBaseSelectUserViewModel.swift in Sources */,
71427145
3995D511AD5734E72ED66070 /* SBUBaseViewController.Unavailable.swift in Sources */,
71437146
D79DA58655048691F33C1324 /* SBUBaseViewController.swift in Sources */,
7147+
1A30E0BD7EAEA23DBB08D0F8 /* SBUBaseViewModel.swift in Sources */,
71447148
CEB27644D5A809454035EEF4 /* SBUBottomSheetController.swift in Sources */,
71457149
7D8DB25B63042F2D7F505632 /* SBUCacheManager.Config.swift in Sources */,
71467150
AB791AB930FFFD5BFBB6F305 /* SBUCacheManager.DiskCache.swift in Sources */,
@@ -7647,7 +7651,7 @@
76477651
"@executable_path/Frameworks",
76487652
"@loader_path/Frameworks",
76497653
);
7650-
MARKETING_VERSION = 1.1.2;
7654+
MARKETING_VERSION = 1.1.3;
76517655
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample;
76527656
PRODUCT_NAME = "$(TARGET_NAME)";
76537657
SDKROOT = iphoneos;
@@ -7679,7 +7683,7 @@
76797683
"@executable_path/Frameworks",
76807684
"@loader_path/Frameworks",
76817685
);
7682-
MARKETING_VERSION = 1.1.2;
7686+
MARKETING_VERSION = 1.1.3;
76837687
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample.SwiftUINotificationService;
76847688
PRODUCT_NAME = "$(TARGET_NAME)";
76857689
SDKROOT = iphoneos;
@@ -7769,7 +7773,7 @@
77697773
"@executable_path/Frameworks",
77707774
"@loader_path/Frameworks",
77717775
);
7772-
MARKETING_VERSION = 1.1.2;
7776+
MARKETING_VERSION = 1.1.3;
77737777
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample;
77747778
PRODUCT_NAME = "$(TARGET_NAME)";
77757779
SDKROOT = iphoneos;
@@ -7856,7 +7860,7 @@
78567860
"@executable_path/Frameworks",
78577861
"@loader_path/Frameworks",
78587862
);
7859-
MARKETING_VERSION = 1.1.2;
7863+
MARKETING_VERSION = 1.1.3;
78607864
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample.SwiftUINotificationService;
78617865
PRODUCT_NAME = "$(TARGET_NAME)";
78627866
SDKROOT = iphoneos;
@@ -7905,15 +7909,15 @@
79057909
repositoryURL = "https://github.com/sendbird/sendbird-chat-sdk-ios";
79067910
requirement = {
79077911
kind = upToNextMajorVersion;
7908-
minimumVersion = 4.32.0;
7912+
minimumVersion = 4.34.1;
79097913
};
79107914
};
79117915
BA2412B4C520C201A8099145 /* XCRemoteSwiftPackageReference "sendbird-uikit-ios-spm" */ = {
79127916
isa = XCRemoteSwiftPackageReference;
79137917
repositoryURL = "https://github.com/sendbird/sendbird-uikit-ios-spm";
79147918
requirement = {
79157919
kind = upToNextMajorVersion;
7916-
minimumVersion = 3.32.3;
7920+
minimumVersion = 3.32.4;
79177921
};
79187922
};
79197923
/* End XCRemoteSwiftPackageReference section */

Sample/project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ options:
1212
packages:
1313
SendbirdChatSDK:
1414
url: https://github.com/sendbird/sendbird-chat-sdk-ios
15-
from: 4.32.0
15+
from: 4.34.1
1616
SendbirdUIKit:
1717
url: https://github.com/sendbird/sendbird-uikit-ios-spm
18-
from: 3.32.3
18+
from: 3.32.4
1919

2020
schemes:
2121
QuickStartSwiftUI:
@@ -43,7 +43,7 @@ settingGroups:
4343
FRAMEWORK_SEARCH_PATHS: ''
4444
IPHONEOS_DEPLOYMENT_TARGET: '15.0'
4545
LD_RUNPATH_SEARCH_PATHS: ["$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks"]
46-
MARKETING_VERSION: '1.1.2'
46+
MARKETING_VERSION: '1.1.3'
4747
PRODUCT_NAME: "$(TARGET_NAME)"
4848
SDKROOT: iphoneos
4949
SWIFT_VERSION: '5.0'

Sources/SwiftUI/Common/GlobalOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class GlobalOptions {
2525
/// GlobalOptions.hidesSharedBackgroundForUIBarButtonItem = true // removes liquid glass effect from custom SendbirdSwiftUI navigation bar buttons.
2626
/// ```
2727
///
28-
/// - Since: [SWIFTUI_NEXT_VERSION]
28+
/// - Since: 1.1.2
2929
@available(iOS 26, *)
3030
public static var hidesSharedBackgroundForCustomNavBarButton: Bool = false
3131
}

Sources/SwiftUI/Util/SwiftUIViewController.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,18 @@ extension SwiftUIViewController: UIViewControllerRepresentable {
138138
return false
139139
}
140140

141+
142+
// A navigation controller is considered present only if the currently selected tab contains one;
143+
// navigation controllers in other tabs are independent and not reused here.
141144
private func findNavigationController(in tabBarController: UITabBarController) -> Bool {
142-
// Check each tab within the UITabBarController
143-
if let viewControllers = tabBarController.viewControllers {
144-
for viewController in viewControllers {
145-
// Search the UINavigationController in each tab
146-
if findNavigationController(from: viewController) {
147-
return true
148-
}
149-
}
145+
// Only consider the currently selected tab (each tab manages its own navigation stack).
146+
if let selectedViewController = tabBarController.selectedViewController {
147+
return findNavigationController(from: selectedViewController)
148+
}
149+
150+
// Fallback to the first tab if none is explicitly selected.
151+
if let firstViewController = tabBarController.viewControllers?.first {
152+
return findNavigationController(from: firstViewController)
150153
}
151154
return false
152155
}

Sources/SwiftUI/Util/WrapperUIViews.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ class SwiftUIBarButtonItem: UIBarButtonItem {
5151
self.customView = containerView
5252

5353
// Remove default liquid glass effect from custom navigation bar button
54+
#if compiler(>=6.2)
5455
if #available(iOS 26.0, *) {
5556
if GlobalOptions.hidesSharedBackgroundForCustomNavBarButton {
5657
self.hidesSharedBackground = true
5758
}
5859
}
60+
#endif
5961
}
6062

6163
required init?(coder: NSCoder) {

Sources/uikit/Constant/SBUStringSet.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public class SBUStringSet {
4646
public static var Alert_Allow_PhotoLibrary_Access_Message = "PhotoLibrary access required to get your photos and videos"
4747
/// A text used to ask the user permission for microphone usage.
4848
public static var Alert_Allow_Microphone_Access = "Please allow microphone usage from settings"
49+
50+
public static var Alert_Busy_Server_Title = "Something went wrong.\nYou'll be reconnected \nshortly."
51+
public static var Alert_Busy_Server_Message = "Estimated waiting time:"
4952

5053
// MARK: - Date Format
5154
public static var Date_Yesterday = "Yesterday"

Sources/uikit/View/Channel/SBUBaseChannelViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import SafariServices
1414
import PhotosUI
1515

1616
@objcMembers
17-
open class SBUBaseChannelViewController: SBUBaseViewController, SBUBaseChannelViewModelDelegate, SBUBaseChannelModuleHeaderDelegate, SBUBaseChannelModuleListDelegate, SBUBaseChannelModuleListDataSource, SBUBaseChannelModuleInputDelegate, SBUBaseChannelModuleInputDataSource, SBUBaseChannelViewModelDataSource, UIGestureRecognizerDelegate, UIViewControllerTransitioningDelegate, PHPickerViewControllerDelegate, UIImagePickerControllerDelegate, UIDocumentPickerDelegate, UIDocumentInteractionControllerDelegate, SBUSelectablePhotoViewDelegate, SBUFileViewControllerDelegate, SBUCommonViewModelDelegate, SBUAlertViewDelegate {
17+
open class SBUBaseChannelViewController: SBUBaseViewController, SBUBaseChannelViewModelDelegate, SBUBaseChannelModuleHeaderDelegate, SBUBaseChannelModuleListDelegate, SBUBaseChannelModuleListDataSource, SBUBaseChannelModuleInputDelegate, SBUBaseChannelModuleInputDataSource, SBUBaseChannelViewModelDataSource, UIGestureRecognizerDelegate, UIViewControllerTransitioningDelegate, PHPickerViewControllerDelegate, UIImagePickerControllerDelegate, UIDocumentPickerDelegate, UIDocumentInteractionControllerDelegate, SBUSelectablePhotoViewDelegate, SBUFileViewControllerDelegate, SBUAlertViewDelegate {
1818

1919
// MARK: - UI Properties (Public)
2020
public var baseHeaderComponent: SBUBaseChannelModule.Header?
@@ -1490,11 +1490,11 @@ open class SBUBaseChannelViewController: SBUBaseViewController, SBUBaseChannelVi
14901490
open func didDismissAlertView() { }
14911491

14921492
// MARK: - SBUCommonViewModelDelegate
1493-
open func shouldUpdateLoadingState(_ isLoading: Bool) {
1493+
open override func shouldUpdateLoadingState(_ isLoading: Bool) {
14941494
self.showLoading(isLoading)
14951495
}
14961496

1497-
open func didReceiveError(_ error: SBError?, isBlocker: Bool) {
1497+
open override func didReceiveError(_ error: SBError?, isBlocker: Bool) {
14981498
self.showLoading(false)
14991499
if self.baseViewModel?.fullMessageList.isEmpty == true, isBlocker {
15001500
self.baseListComponent?.updateEmptyView(type: .error)

Sources/uikit/View/Channel/SBUChatNotificationChannelViewController.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import SafariServices
1717
open class SBUChatNotificationChannelViewController: SBUBaseViewController,
1818
SBUChatNotificationChannelViewModelDelegate, SBUChatNotificationChannelViewModelDataSource,
1919
SBUChatNotificationChannelModuleListDelegate, SBUChatNotificationChannelModuleListDataSource,
20-
SBUChatNotificationChannelModuleHeaderDelegate,
21-
SBUCommonViewModelDelegate {
20+
SBUChatNotificationChannelModuleHeaderDelegate {
2221

2322
// MARK: - Module components (Public)
2423
public var headerComponent: SBUChatNotificationChannelModule.Header?
@@ -728,11 +727,11 @@ open class SBUChatNotificationChannelViewController: SBUBaseViewController,
728727
}
729728

730729
// MARK: - SBUCommonViewModelDelegate
731-
open func shouldUpdateLoadingState(_ isLoading: Bool) {
730+
open override func shouldUpdateLoadingState(_ isLoading: Bool) {
732731
self.showLoading(isLoading)
733732
}
734733

735-
open func didReceiveError(_ error: SendbirdChatSDK.SBError?, isBlocker: Bool) {
734+
open override func didReceiveError(_ error: SendbirdChatSDK.SBError?, isBlocker: Bool) {
736735
if self.viewModel?.notifications.isEmpty == true, isBlocker {
737736
self.listComponent?.updateEmptyView(type: .error)
738737
self.listComponent?.reloadTableView()

0 commit comments

Comments
 (0)