Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
### New Interfaces
- Added `func topView<Content: View> (@ViewBuilder content: @escaping (MessageInputViewContent.TopView.ViewConfig) -> Content) -> Self` in `GroupChannelView`
- Added `QuoteMessageInputView`
## Improvements
- Updated the SDK build base to Xcode 16.4.

### Improvements
We have fixed warnings caused by the underlying autolayouts.
## ⚠️ Compatibility Notice

**SendbirdSwiftUI v1.1.0 and earlier are not compatible with SendbirdChatSDK v4.28.1 or higher.**
Please use `SendbirdChatSDK ≤ 4.28.0` with SendbirdSwiftUI versions **up to v1.1.0**.

To use `SendbirdChatSDK ≥ 4.28.1`, please upgrade to `SendbirdSwiftUI v1.1.1` or later, which is built with Xcode 16.4.
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ let package = Package(
.package(
name: "SendbirdChatSDK",
url: "https://github.com/sendbird/sendbird-chat-sdk-ios",
from: "4.26.0"
from: "4.29.0"
),
],
targets: [
.binaryTarget(
name: "SendbirdSwiftUI",
url: "https://github.com/sendbird/sendbird-swiftui-ios/releases/download/1.1.0/SendbirdSwiftUI.xcframework.zip", // SendbirdSwiftUI_URL
checksum: "9e307422893d166726484e0aace0805bb7048810e0e074eddeb1e4b86aa33a6d" // SendbirdSwiftUI_CHECKSUM
url: "https://github.com/sendbird/sendbird-swiftui-ios/releases/download/1.1.1/SendbirdSwiftUI.xcframework.zip", // SendbirdSwiftUI_URL
checksum: "cc2815f523db320c30092e97a48bf0575496742f5a074130d5bf4dbc7f4e4d80" // SendbirdSwiftUI_CHECKSUM

),
.binaryTarget(
name: "SendbirdUIMessageTemplate",
url: "https://github.com/sendbird/sendbird-uikit-ios/releases/download/3.31.0/SendbirdUIMessageTemplate.xcframework.zip", // SendbirdUIMessageTemplate_URL
checksum: "c5943e894d0d5bfc15485614a929d6e630fe3b2f830ea6efe99468d66688c41e" // SendbirdUIMessageTemplate_CHECKSUM
url: "https://github.com/sendbird/sendbird-uikit-ios/releases/download/3.32.2/SendbirdUIMessageTemplate.xcframework.zip", // SendbirdUIMessageTemplate_URL
checksum: "380b1948377c740febd0b324e21b181e2fc3e3717eaf08886eb3d9196c0b9602" // SendbirdUIMessageTemplate_CHECKSUM
),
.target(
name: "SendbirdSwiftUITarget",
Expand Down
24 changes: 16 additions & 8 deletions Sample/QuickStartSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 77;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -515,6 +515,7 @@
772E4D392B5550DD3FDAD535 /* InviteUserViewConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA23C8AD569D84167F4DD526 /* InviteUserViewConverter.swift */; };
773421C3BDBEAAA97B75EA80 /* CreateGroupChannelView+SubViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B719C1C7BCA50103B2FD33F /* CreateGroupChannelView+SubViewBuilder.swift */; };
77804AA5E6072297F429A920 /* SBUMessageFormChipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4295DC2364062B88F929D80E /* SBUMessageFormChipView.swift */; };
7788754D0D288A31CBD190D8 /* SBUUnreadMessageNewLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD328583808CC526F8235AF3 /* SBUUnreadMessageNewLine.swift */; };
77AA724DB557C412388E3750 /* CustomGroupChannelRegisterOperator.ViewConverter.Header.rightView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9C266B8A2DF6EB7F1504782 /* CustomGroupChannelRegisterOperator.ViewConverter.Header.rightView.swift */; };
77AA82E38B8808BC31CF1A33 /* SBUMessageThreadModule.Header+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F41FB77D91238CE800D9F43 /* SBUMessageThreadModule.Header+SwiftUI.swift */; };
77F45EB93F523CDDECF16107 /* UIStackView.SBUIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD34FF666C940B94555A93F5 /* UIStackView.SBUIKit.swift */; };
Expand Down Expand Up @@ -1067,6 +1068,7 @@
F82E518CE6E0946B168BAA18 /* UIScrollView+SBUIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B75F4EBD4914A4295678613 /* UIScrollView+SBUIKit.swift */; };
F877982811AC508943632CCE /* SBUSelectablePhotoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A936C2B0F4BEFCCE17689484 /* SBUSelectablePhotoViewController.swift */; };
F8C970D71462EFD8D116E260 /* CustomOpenChannel.ViewConverter.Header.titleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5AFF1C0FFAF7FB44385303 /* CustomOpenChannel.ViewConverter.Header.titleView.swift */; };
F96CCBD1D2F86EBCA1F3782A /* SBUUnreadMessageInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A4E7790BAF5E7CEC138BEF6 /* SBUUnreadMessageInfoView.swift */; };
F9C2912608CC5EAA33B09C3C /* SBUMessageDateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 744D3897AF413516BB6A02CB /* SBUMessageDateView.swift */; };
F9CF4B42BDC33490C9BB589C /* CustomTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5251C5F71C7B463C54D6474C /* CustomTheme.swift */; };
F9E8A5C906219EB9DA3F6453 /* SBUGroupChannelModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D91401F0CEDB5A733BE00C20 /* SBUGroupChannelModule.swift */; };
Expand Down Expand Up @@ -1242,6 +1244,7 @@
19F7CEEE95BBF13CB214CF41 /* SBUGroupChannelViewController.Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUGroupChannelViewController.Deprecated.swift; sourceTree = "<group>"; };
1A01964E8998FC11F82F7F27 /* SBUGroupChannelModule.Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUGroupChannelModule.Deprecated.swift; sourceTree = "<group>"; };
1A44E48D1D24AA8A93786370 /* CustomGroupOperatorList.SwiftUI.View.CustomMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomGroupOperatorList.SwiftUI.View.CustomMain.swift; sourceTree = "<group>"; };
1A4E7790BAF5E7CEC138BEF6 /* SBUUnreadMessageInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUUnreadMessageInfoView.swift; sourceTree = "<group>"; };
1A8DD774054C5168961DF04B /* GroupChannelViewConverter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupChannelViewConverter.swift; sourceTree = "<group>"; };
1AE76A1AE751AA26FFB13901 /* GroupChannelSettingsViewConverter.Header.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupChannelSettingsViewConverter.Header.swift; sourceTree = "<group>"; };
1AF8CB593FE2D4951A3ED114 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -2201,6 +2204,7 @@
FC3E876887601735308273D9 /* SBUVoiceMessageInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUVoiceMessageInputView.swift; sourceTree = "<group>"; };
FCB7E275124DF45ADB981B0E /* SBUTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUTheme.swift; sourceTree = "<group>"; };
FD18A49461FC8A53036E3A08 /* SBUToastType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUToastType.swift; sourceTree = "<group>"; };
FD328583808CC526F8235AF3 /* SBUUnreadMessageNewLine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUUnreadMessageNewLine.swift; sourceTree = "<group>"; };
FD34FF666C940B94555A93F5 /* UIStackView.SBUIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStackView.SBUIKit.swift; sourceTree = "<group>"; };
FD8219759D395864DBC89499 /* SBURegisterOperatorModule.List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBURegisterOperatorModule.List.swift; sourceTree = "<group>"; };
FDA3D3D02D5E297D699CD2C2 /* SBUBaseSelectUserViewController.Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SBUBaseSelectUserViewController.Deprecated.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4385,6 +4389,7 @@
2E9AABB7CE646ADCDF873887 /* SBUNotificationTimelineView.swift */,
6B424207542E1A82DAC82A0D /* SBUOpenChannelMessageWebView.swift */,
B07065B5EEFA8858ADAD76CA /* SBUSelectableStackView.swift */,
FD328583808CC526F8235AF3 /* SBUUnreadMessageNewLine.swift */,
608274ACB42DDAE6A5976FC6 /* SBUUserMessageTextView.swift */,
08C31448CE461810A569DE1E /* SBUUserNameView.swift */,
);
Expand Down Expand Up @@ -5948,6 +5953,7 @@
children = (
EF67B852DBB45B4929297E29 /* SBUNewMessageInfo.swift */,
058F7755FCA9CC99DBB5B468 /* SBUNewNotificationInfo.swift */,
1A4E7790BAF5E7CEC138BEF6 /* SBUUnreadMessageInfoView.swift */,
);
path = NewMessageInfo;
sourceTree = "<group>";
Expand Down Expand Up @@ -6494,7 +6500,7 @@
4F892C552F42D67B95791C9C /* XCRemoteSwiftPackageReference "sendbird-chat-sdk-ios" */,
BA2412B4C520C201A8099145 /* XCRemoteSwiftPackageReference "sendbird-uikit-ios-spm" */,
);
preferredProjectObjectVersion = 54;
preferredProjectObjectVersion = 77;
projectDirPath = "";
projectRoot = "";
targets = (
Expand Down Expand Up @@ -7537,6 +7543,8 @@
E1AE7A7067D6B8B6970F08DA /* SBUUnderLineTextField.swift in Sources */,
544EEA8C932F1096A5F2C3B4 /* SBUUnknownMessageCell.swift in Sources */,
AEF0C3B8FA3F9DFB7A4D7D98 /* SBUUnknownMessageCellParams.swift in Sources */,
F96CCBD1D2F86EBCA1F3782A /* SBUUnreadMessageInfoView.swift in Sources */,
7788754D0D288A31CBD190D8 /* SBUUnreadMessageNewLine.swift in Sources */,
9CEE3F03D7428180C46396FF /* SBUUser.swift in Sources */,
749F372DA7755F9B0CD00F9F /* SBUUserCell.swift in Sources */,
A813DE7327B146C9A9A5676C /* SBUUserListModule.Deprecated.swift in Sources */,
Expand Down Expand Up @@ -7639,7 +7647,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -7671,7 +7679,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample.SwiftUINotificationService;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -7761,7 +7769,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -7848,7 +7856,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.sendbird.swiftui.sample.SwiftUINotificationService;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -7897,15 +7905,15 @@
repositoryURL = "https://github.com/sendbird/sendbird-chat-sdk-ios";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.26.0;
minimumVersion = 4.29.0;
};
};
BA2412B4C520C201A8099145 /* XCRemoteSwiftPackageReference "sendbird-uikit-ios-spm" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/sendbird/sendbird-uikit-ios-spm";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 3.31.0;
minimumVersion = 3.32.2;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
6 changes: 3 additions & 3 deletions Sample/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ options:
packages:
SendbirdChatSDK:
url: https://github.com/sendbird/sendbird-chat-sdk-ios
from: 4.26.0
from: 4.29.0
SendbirdUIKit:
url: https://github.com/sendbird/sendbird-uikit-ios-spm
from: 3.31.0
from: 3.32.2

schemes:
QuickStartSwiftUI:
Expand Down Expand Up @@ -43,7 +43,7 @@ settingGroups:
FRAMEWORK_SEARCH_PATHS: ''
IPHONEOS_DEPLOYMENT_TARGET: '15.0'
LD_RUNPATH_SEARCH_PATHS: ["$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks"]
MARKETING_VERSION: '1.1.0'
MARKETING_VERSION: '1.1.1'
PRODUCT_NAME: "$(TARGET_NAME)"
SDKROOT: iphoneos
SWIFT_VERSION: '5.0'
Expand Down
1 change: 1 addition & 0 deletions Sources/uikit/Configuration/SBUConfig.CodingKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ extension SBUConfig.GroupChannel.Channel {
case replyType
case threadReplySelectType
case input
case isMarkAsUnreadEnabled = "enableMarkAsUnread" // 3.32.0
}
}

Expand Down
11 changes: 10 additions & 1 deletion Sources/uikit/Configuration/SBUConfig.GroupChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ extension SBUConfig.GroupChannel {
set { _isSuperGroupReactionsEnabled = newValue }
}

/// Enable the feature to mark message as unread.
///
/// - Since: 3.32.0
@SBUPrioritizedConfig public var isMarkAsUnreadEnabled: Bool = false

/// Enable the feature to mention specific members in a message for notification.
///
/// - NOTE: If it's `true`, it sets new ``SBUUserMentionConfiguration`` instance to ``SBUGlobals/userMentionConfig`` if needed. If it's `false`, ``SBUGlobals/userMentionConfig`` is set to `nil`
Expand Down Expand Up @@ -183,7 +188,8 @@ extension SBUConfig.GroupChannel {
self._isFormTypeMessageEnabled.setDashboardValue(channel.isFormTypeMessageEnabled)
self._isFeedbackEnabled.setDashboardValue(channel.isFeedbackEnabled)
self._isMarkdownForUserMessageEnabled.setDashboardValue(channel.isMarkdownForUserMessageEnabled)

self._isMarkAsUnreadEnabled.setDashboardValue(channel.isMarkAsUnreadEnabled)

self.input.updateWithDashboardData(channel.input)
}

Expand All @@ -207,6 +213,7 @@ extension SBUConfig.GroupChannel {
SendbirdUI.config.groupChannel.channel.isFeedbackEnabled
self.isMarkdownForUserMessageEnabled = (try? container.decode(Bool.self, forKey: .isMarkdownForUserMessageEnabled)) ??
SendbirdUI.config.groupChannel.channel.isMarkdownForUserMessageEnabled
self.isMarkAsUnreadEnabled = (try? container.decode(Bool.self, forKey: .isMarkAsUnreadEnabled)) ?? SendbirdUI.config.groupChannel.channel.isMarkAsUnreadEnabled

self.input = try container.decode(SBUConfig.GroupChannel.Channel.Input.self, forKey: .input)
}
Expand All @@ -227,6 +234,8 @@ extension SBUConfig.GroupChannel {
try container.encode(self._isSuperGroupReactionsEnabled, forKey: .isSuperGroupReactionsEnabled)
try container.encode(self.isFeedbackEnabled, forKey: .isFeedbackEnabled)
try container.encode(self.isMarkdownForUserMessageEnabled, forKey: .isMarkdownForUserMessageEnabled)
try container.encode(self.isMarkAsUnreadEnabled, forKey: .isMarkAsUnreadEnabled)

try container.encode(self.input, forKey: .input)
}
}
Expand Down
18 changes: 17 additions & 1 deletion Sources/uikit/Constant/SBUStringSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class SBUStringSet {
public static var Settings = "Settings"
public static var Reply = "Reply"
public static var Submit = "Submit" // 3.11.0
public static var MarkAsUnread = "Mark as unread" // 3.32.0

// MARK: - Alert
public static var Alert_Delete = "Are you sure you want to delete?"
Expand Down Expand Up @@ -109,7 +110,22 @@ public class SBUStringSet {
return ""
}
}
public static var Channel_State_Banner_Frozen = "Channel frozen"
public static var Channel_State_Banner_Frozen = "Channel is frozen"
/// - Since: 3.32.0
public static var Channel_Unread_Message: (UInt) -> String = { count in
switch count {
case 1:
return "1 unread message"
case 2...99:
return "\(count) unread messages"
case 100...:
return "99+ unread messages"
default:
return ""
}
}
/// - Since: 3.32.0
public static var Channel_Unread_Message_Newline = "New messages"

// MARK: - Open Channel
public static var Open_Channel_Name_Default = "Open Channel"
Expand Down
3 changes: 3 additions & 0 deletions Sources/uikit/Enums/SBUIconSetType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public enum SBUIconSetType: String, Hashable {
case iconStop
case iconGood // 3.15.0
case iconBad // 3.15.0
case iconMarkAsUnread // 3.32.0

// MARK: - Metric

Expand Down Expand Up @@ -209,6 +210,7 @@ public enum SBUIconSetType: String, Hashable {
case .iconStop: SBUIconSet.iconStop = SBUIconSetType.iconStop.load()
case .iconBad: SBUIconSet.iconBad = SBUIconSetType.iconBad.load()
case .iconGood: SBUIconSet.iconGood = SBUIconSetType.iconGood.load()
case .iconMarkAsUnread: SBUIconSet.iconMarkAsUnread = SBUIconSetType.iconMarkAsUnread.load()
}

SBUIconSetType.customizedIcons.remove(self)
Expand Down Expand Up @@ -282,6 +284,7 @@ public enum SBUIconSetType: String, Hashable {
case .iconStop: return SBUIconSet.iconStop
case .iconGood: return SBUIconSet.iconGood
case .iconBad: return SBUIconSet.iconBad
case .iconMarkAsUnread: return SBUIconSet.iconMarkAsUnread
}
}
}
24 changes: 23 additions & 1 deletion Sources/uikit/Extension/Shared/UIView+SBUIKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ extension UIView {
}
}

// Round Corners
// MARK: - Round Corners
extension UIView {
func roundCorners(corners: UIRectCorner, radius: CGFloat) {
self.clipsToBounds = true
Expand All @@ -1298,6 +1298,28 @@ extension UIView {
}
}

// Shadows
extension UIView {
func applyMultipleShadows(cornerRadius: CGFloat = 20, backgroundColor: UIColor, shadowConfigs: [(radius: CGFloat, offset: CGSize, color: UIColor)]) {
// Clear existing shadow sublayers
self.layer.sublayers?.removeAll { $0.name == "shadowLayer" }

for shadowConfig in shadowConfigs {
let shadowLayer = CALayer()
shadowLayer.name = "shadowLayer"
shadowLayer.frame = self.bounds
shadowLayer.backgroundColor = backgroundColor.cgColor
shadowLayer.cornerRadius = cornerRadius
shadowLayer.shadowColor = shadowConfig.color.cgColor
shadowLayer.shadowOffset = shadowConfig.offset
shadowLayer.shadowRadius = shadowConfig.radius
shadowLayer.shadowOpacity = 1
shadowLayer.shadowPath = UIBezierPath(roundedRect: self.bounds, cornerRadius: cornerRadius).cgPath
self.layer.insertSublayer(shadowLayer, at: 0)
}
}
}

// MARK: - Image
extension UIView {
func asImage() -> UIImage {
Expand Down
Loading