Conversation
[CM-2324] Bug : ALKConversationViewController.audioPause | IOS Agent App
[CM-1988] Updated Deprecated code and Resolved warnings
[CM-2323] Updated Table View Update Function to resolve Crash | iOS Agent App
[CM-2338] Show Typing Indicator in Bot Messages till Bot Replies | iOS SDK
[CM-2344] Add 4 Automation test Case | iOS SDK
[CM-82] Add linter in all the repos | iOS SDK
Updated PodFile to 1.4.2
WalkthroughThis pull request introduces a new GitHub Actions workflow to lint and build iOS code on pull requests targeting the master branch. The CHANGELOG and SDK version have been bumped to 1.4.2 with corresponding dependency updates. Numerous files across controllers, models, utilities, view models, and views receive extensive formatting refinements, cleanup of redundant methods (such as removed overrides like didReceiveMemoryWarning, loadView, and awakeFromNib), and minor logic adjustments. A new method to display a typing indicator in the conversation view model has also been added. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant VM as ConversationViewModel
participant Bot as Bot
participant UI as Chat Interface
U->>VM: Send message or initiate chat
VM->>UI: Call showTypingIndicatorTillBotNewMessage()
UI-->>VM: Typing indicator displayed
Bot-->>VM: New message received
VM->>UI: Hide typing indicator
Suggested reviewers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (20)
Sources/Utilities/Date+Extension.swift (1)
71-77: Standardize Function Signature FormattingThe formatting change in the
formatedDatemethod now brings the opening brace onto the same line as the function signature. This improvement increases consistency with other similar updates across the codebase and enhances readability. The implementation logic remains unaffected.Additionally, you might consider renaming the function to
formattedDateto align with common naming conventions.Sources/Utilities/TextViewSizeCalcultor.swift (3)
1-7: Possible Filename InconsistencyThe file is named "TextViewSizeCalcultor.swift", whereas the struct defined inside is "TextViewSizeCalculator". Consider renaming the file to match the struct name for improved readability and consistency.
13-15: Improve Signature Formatting ReadabilityThe first
heightmethod’s signature has been reformatted to remove the newline before the opening brace. This compact style is consistent with modern Swift formatting, enhancing readability without altering functionality.
21-23: Ensure Consistent Method Signature FormattingSimilarly, the
heightmethod that accepts anNSAttributedStringhas been reformatted to remove the extra newline before the opening brace. This consistent styling across methods simplifies maintenance and improves visual alignment.Sources/Views/ALKAudioRecordingView.swift (2)
216-221: Refactor and Extract Delta Calculation inmoveViewThe updated conditional formatting in the non-RTL branch now consolidates the condition on a single line, which improves visual consistency. To further enhance the readability and maintainability of this block, consider extracting the repeated expression
(location.x - previousGestureLocation)into a local variable (for example,let delta = location.x - previousGestureLocation). This small refactor avoids duplicate computation and makes the intent clearer.Example diff:
- let newPos = slideView.frame.origin.x + (location.x - previousGestureLocation) - if newPos > slideToCancelStartLocation { - return - } - if slideView.frame.origin.x <= recordingViewStartLocation, - redDot.frame.origin.x + (location.x - previousGestureLocation) <= redDotStartLocation { - recordingView.frame.origin.x += (location.x - previousGestureLocation) - redDot.frame.origin.x += (location.x - previousGestureLocation) - if recordingView.frame.origin.x <= 0.0 { - delegate?.cancelAudioRecording() - } - } + let delta = location.x - previousGestureLocation + let newPos = slideView.frame.origin.x + delta + if newPos > slideToCancelStartLocation { + return + } + if slideView.frame.origin.x <= recordingViewStartLocation, + redDot.frame.origin.x + delta <= redDotStartLocation { + recordingView.frame.origin.x += delta + redDot.frame.origin.x += delta + if recordingView.frame.origin.x <= 0.0 { + delegate?.cancelAudioRecording() + } + }
238-240: Enhance Readability inmoveViewRTLby Extracting DeltaA similar improvement can be applied to the RTL branch in the
moveViewRTLmethod. Extracting the delta value will avoid repeating the calculation and will help in maintaining consistency across both methods.Example diff:
- let newPos = slideView.frame.origin.x + (location.x - previousGestureLocation) - if newPos < slideToCancelStartLocation { - return - } - let slideViewEnd = slideView.frame.origin.x + slideView.frame.size.width - if slideViewEnd >= recordingViewStartLocation, - redDot.frame.origin.x + (location.x - previousGestureLocation) >= redDotStartLocation { - recordingView.frame.origin.x += (location.x - previousGestureLocation) - redDot.frame.origin.x += (location.x - previousGestureLocation) - if recordingView.frame.origin.x + recordingView.frame.size.width >= redDotStartLocation + 30 { - delegate?.cancelAudioRecording() - } - } + let delta = location.x - previousGestureLocation + let newPos = slideView.frame.origin.x + delta + if newPos < slideToCancelStartLocation { + return + } + let slideViewEnd = slideView.frame.origin.x + slideView.frame.size.width + if slideViewEnd >= recordingViewStartLocation, + redDot.frame.origin.x + delta >= redDotStartLocation { + recordingView.frame.origin.x += delta + redDot.frame.origin.x += delta + if recordingView.frame.origin.x + recordingView.frame.size.width >= redDotStartLocation + 30 { + delegate?.cancelAudioRecording() + } + }Sources/Views/ALKFormCell.swift (1)
581-597: Refined Dropdown Option Validation Logic
The block handling dropdown option validation (lines 581–597) has been reformatted to improve clarity:
- Extraction of the
disabledflag from the selected option is now clearly defined.- The subsequent conditional branch checks whether
disabledisnilversus having a value, and then determines validity based on the presence of a valid value.Suggestion: Although force-unwrapping (
disabled!) is safe in this context (following a nil‑check), consider using optional binding (e.g.if let disabled = disabled { … }) for added safety and clarity.Sources/LinkPreview/ALKLinkPreviewManager.swift (1)
48-50: Streamlined Optional Unwrapping for Encoding Conversion
The optional unwrapping of theencodingand conversion from the IANA charset to an NSString encoding has been reformatted to a single, clearer statement. Consider, as a future improvement, adding fallback handling or logging if the conversion fails; this would improve robustness when dealing with unexpected encoding values.Sources/Views/ALKInformationCell.swift (1)
144-150: Consider usingstaticinstead ofclassin final classes.Since
ALKInformationCellis declared asfinal, it's recommended to usestaticinstead ofclassfor these methods.- class func topPadding() -> CGFloat { + static func topPadding() -> CGFloat { return Padding.View.top } - class func bottomPadding() -> CGFloat { + static func bottomPadding() -> CGFloat { return Padding.View.bottom }🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 144-144: Prefer
staticoverclassin a final class(static_over_final_class)
[Warning] 148-148: Prefer
staticoverclassin a final class(static_over_final_class)
Sources/Controllers/ALKMultipleLanguageSelectionViewController.swift (1)
12-12: Consider shortening the class name.The static analysis tool flagged that the type name 'ALKMultipleLanguageSelectionViewController' exceeds the recommended 40-character limit. While this isn't critical, shorter names can improve code readability.
🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 12-12: Type name 'ALKMultipleLanguageSelectionViewController' should be between 3 and 40 characters long
(type_name)
Sources/Utilities/KMZendeskChatHandler.swift (1)
34-34: Consider using more specific SwiftLint disables.The file uses a blanket disable for
type_body_length. Consider using more specific directives like// swiftlint:disable:next type_body_lengthto limit the scope of the disabled rule.🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 34-34: Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible`
(blanket_disable_command)
CHANGELOG.md (1)
5-10: New Changelog Entry for Version 1.4.2.
The changelog entry effectively summarizes the internal refactors, the new typing indicator for bot messages, and TableView update improvements. Consider correcting the typo “depricated” to “deprecated” for enhanced clarity and professionalism.Sources/Controllers/ALKConversationListTableViewController.swift (1)
121-123: Conditional Check for Long Press Deletion
The new guard (line 122) usingconfiguration.enableDeleteConversationOnLongpressensures that the long-press gesture recognizer for deleting conversations is only added when explicitly enabled. This adds safety and makes the intent clearer.Sources/Views/ALKChatBaseCell.swift (1)
62-62: Improved code clarity by removing unused variable.The replaced code captured the
superviewbut never used it, which was unnecessary. Using_clearly indicates intent to ignore this value..github/workflows/ios_linter_build_check.yaml (1)
51-63: Update the GitHub script action version.The static analysis tool indicates that version 6 of the
actions/github-scriptaction might be too old. Consider updating to the latest version to ensure compatibility with GitHub Actions.- uses: actions/github-script@v6 + uses: actions/github-script@v7🧰 Tools
🪛 actionlint (1.7.4)
53-53: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
Sources/CustomEvent/ALKCustomEventHandler.swift (3)
24-32: Improved URL handling with fallback option.The code now has better flexibility in handling URLs in the
faqClickcase. It first attempts to use a URL object directly and falls back to creating a URL from a string. This makes the code more robust by handling different data types.
34-37: Control flow improved with if-let instead of guard.Changing from
guardtoif letimproves the control flow by allowing the method to continue execution if the message is not available, rather than exiting early. This provides more flexibility in event handling.
61-66: Improved rich message handling with default values.Instead of using complex
guardstatements, the code now uses nil coalescing operators to provide default values. This ensures the delegate is called even if some data is missing, providing better resilience.Sources/Controllers/ALKCreateGroupViewController.swift (1)
503-505: Condition formatting improvedThe multi-line condition has been consolidated to a single line while maintaining the same logic, improving readability.
Note: There's a typo in
CollectionViewSection.addMemeber(should be "addMember") that existed prior to this change.Sources/Controllers/ALKConversationViewController.swift (1)
1092-1092: Consider improving the guard statement.Using
guard let _ =pattern is not idiomatic Swift for checking conditions.-guard let _ = viewModel.lastMessage?.messageModel.isCustomDataRichMessage(), +guard viewModel.lastMessage?.messageModel.isCustomDataRichMessage() == true, let placeholder = viewModel.lastMessage?.messageModel.getKmField()?.placeholder else {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Demo/Podfile.lockis excluded by!**/*.lock
📒 Files selected for processing (107)
.github/workflows/ios_linter_build_check.yaml(1 hunks)CHANGELOG.md(1 hunks)KommunicateChatUI-iOS-SDK.podspec(2 hunks)Package.resolved(1 hunks)Package.swift(1 hunks)Sources/Controllers/ALKAlertViewController.swift(0 hunks)Sources/Controllers/ALKBaseViewController.swift(1 hunks)Sources/Controllers/ALKConversationListTableViewController.swift(5 hunks)Sources/Controllers/ALKConversationListViewController.swift(8 hunks)Sources/Controllers/ALKConversationViewController+Alert.swift(1 hunks)Sources/Controllers/ALKConversationViewController+AutoComplete.swift(3 hunks)Sources/Controllers/ALKConversationViewController+TableView.swift(8 hunks)Sources/Controllers/ALKConversationViewController+UIImagePicker.swift(2 hunks)Sources/Controllers/ALKConversationViewController.swift(40 hunks)Sources/Controllers/ALKCreateGroupViewController.swift(5 hunks)Sources/Controllers/ALKCustomCameraPreviewViewController.swift(0 hunks)Sources/Controllers/ALKCustomCameraViewController.swift(5 hunks)Sources/Controllers/ALKCustomCropImageViewController.swift(0 hunks)Sources/Controllers/ALKCustomPickerViewController.swift(4 hunks)Sources/Controllers/ALKCustomVideoCaptureController.swift(1 hunks)Sources/Controllers/ALKCustomVideoPreviewViewController.swift(0 hunks)Sources/Controllers/ALKDocumentViewerController.swift(1 hunks)Sources/Controllers/ALKFormDatePickerViewController.swift(1 hunks)Sources/Controllers/ALKGroupDescriptionController.swift(2 hunks)Sources/Controllers/ALKMapViewController.swift(0 hunks)Sources/Controllers/ALKMultipleLanguageSelectionViewController.swift(3 hunks)Sources/Controllers/ALKNewChatViewController.swift(2 hunks)Sources/Controllers/ALKParticipantSelectionViewContoller.swift(2 hunks)Sources/Controllers/ALKPhotoPicker.swift(1 hunks)Sources/Controllers/ALKSearchResultViewController.swift(1 hunks)Sources/Controllers/ALKWebViewController.swift(1 hunks)Sources/Controllers/KMAutoCompleteManager.swift(3 hunks)Sources/Controllers/KMMuteConversationViewController.swift(2 hunks)Sources/CustomEvent/ALKCustomEventCallback.swift(1 hunks)Sources/CustomEvent/ALKCustomEventHandler.swift(1 hunks)Sources/CustomEvent/KMCustomEvent.swift(0 hunks)Sources/LinkPreview/ALKLinkPreviewManager.swift(5 hunks)Sources/Models/ALKChatBarConfiguration.swift(1 hunks)Sources/Models/ALKConfiguration.swift(2 hunks)Sources/Models/ALKGenericCard.swift(0 hunks)Sources/Models/ALKMessageModel.swift(4 hunks)Sources/Models/ALKNavigationItem.swift(1 hunks)Sources/Models/KMAutoCompleteItem.swift(1 hunks)Sources/Models/KMDocumentConfiguration.swift(1 hunks)Sources/Models/KMFormTemplate.swift(2 hunks)Sources/Models/KMListTemplateModel.swift(1 hunks)Sources/Models/KMVideoTemplate.swift(1 hunks)Sources/Utilities/ALKActivityIndicator.swift(2 hunks)Sources/Utilities/ALKAppSettingsUserDefaults.swift(9 hunks)Sources/Utilities/ALKHTTPManager.swift(2 hunks)Sources/Utilities/ALKImageView+Extension.swift(1 hunks)Sources/Utilities/ALKMessageViewModel+Extension.swift(1 hunks)Sources/Utilities/ALKRichMessageAutoSuggestion.swift(1 hunks)Sources/Utilities/ALKRichMessageStyle.swift(1 hunks)Sources/Utilities/ALKVideoUploadManager.swift(3 hunks)Sources/Utilities/ALMessage+Extension.swift(4 hunks)Sources/Utilities/Data+Extension.swift(1 hunks)Sources/Utilities/Date+Extension.swift(1 hunks)Sources/Utilities/KMConversationScreenConfiguration.swift(1 hunks)Sources/Utilities/KMMultipleSelectionConfiguration.swift(2 hunks)Sources/Utilities/KMTextToSpeech.swift(4 hunks)Sources/Utilities/KMZendeskChatHandler.swift(20 hunks)Sources/Utilities/LayoutProxy.swift(4 hunks)Sources/Utilities/MessageMention.swift(1 hunks)Sources/Utilities/NotificationHelper.swift(4 hunks)Sources/Utilities/RatingHelper.swift(2 hunks)Sources/Utilities/ReceivedMessageCaptionViewSizeCalculator.swift(0 hunks)Sources/Utilities/String+AutoComplete.swift(1 hunks)Sources/Utilities/String+Extension.swift(1 hunks)Sources/Utilities/TextViewSizeCalcultor.swift(1 hunks)Sources/Utilities/UIAlertController+Extension.swift(1 hunks)Sources/Utilities/UIColor+Extension.swift(1 hunks)Sources/Utilities/UIViewController+Extension.swift(1 hunks)Sources/ViewModels/ALKConversationViewModel.swift(34 hunks)Sources/ViewModels/ALKFormViewModelItem.swift(3 hunks)Sources/ViewModels/ALKGroupDescriptionViewModel.swift(1 hunks)Sources/ViewModels/SearchResultViewModel.swift(1 hunks)Sources/Views/ALKAttatchmentView.swift(1 hunks)Sources/Views/ALKAudioRecordingView.swift(2 hunks)Sources/Views/ALKChatBar.swift(7 hunks)Sources/Views/ALKChatBaseCell.swift(2 hunks)Sources/Views/ALKChatCell.swift(3 hunks)Sources/Views/ALKDocumentCell.swift(0 hunks)Sources/Views/ALKEmailView.swift(4 hunks)Sources/Views/ALKFormCell.swift(14 hunks)Sources/Views/ALKFormMultiSelectItemCell.swift(3 hunks)Sources/Views/ALKFormSingleSelectItemCell.swift(2 hunks)Sources/Views/ALKFormTextItemCell.swift(0 hunks)Sources/Views/ALKFriendFormCell.swift(1 hunks)Sources/Views/ALKFriendLinkPreviewCell.swift(2 hunks)Sources/Views/ALKFriendMessageCell.swift(2 hunks)Sources/Views/ALKFriendMessageQuickReplyCell.swift(2 hunks)Sources/Views/ALKFriendNewChatCell.swift(0 hunks)Sources/Views/ALKGenericCardCell.swift(2 hunks)Sources/Views/ALKGroupDescriptionCell.swift(2 hunks)Sources/Views/ALKGroupMemberCell.swift(1 hunks)Sources/Views/ALKInformationCell.swift(8 hunks)Sources/Views/ALKLinkPreviewBaseCell.swift(2 hunks)Sources/Views/ALKLinkView.swift(1 hunks)Sources/Views/ALKListTemplateCell.swift(4 hunks)Sources/Views/ALKLoadingIndicator.swift(1 hunks)Sources/Views/ALKLocationCell.swift(2 hunks)Sources/Views/ALKMessageBaseCell.swift(7 hunks)Sources/Views/ALKMessageButtonCell.swift(2 hunks)Sources/Views/ALKMyFormCell.swift(1 hunks)Sources/Views/ALKMyLinkPreviewCell.swift(3 hunks)Sources/Views/ALKMyMessageCell.swift(3 hunks)
⛔ Files not processed due to max files limit (28)
- Sources/Views/ALKMyMessageQuickReplyCell.swift
- Sources/Views/ALKPhotoCell.swift
- Sources/Views/ALKReplyMessageCell.swift
- Sources/Views/ALKReplyMessageView.swift
- Sources/Views/ALKTemplateMessageCell.swift
- Sources/Views/ALKVideoCell.swift
- Sources/Views/ALKVoiceCell.swift
- Sources/Views/KMAudioRecordButton.swift
- Sources/Views/KMAutoCompleteManager+TableView.swift
- Sources/Views/KMConversationInfoView.swift
- Sources/Views/KMCustomCaptionViewController.swift
- Sources/Views/KMFormDropDownCell.swift
- Sources/Views/KMFormMultiSelectButtonItemCell.swift
- Sources/Views/KMFriendSourceURLViewCell.swift
- Sources/Views/KMFriendVideoTemplateCell.swift
- Sources/Views/KMLabelWithIconView.swift
- Sources/Views/KMLanguageView.swift
- Sources/Views/KMListTemplateView.swift
- Sources/Views/KMMentionAutoCompleteCell.swift
- Sources/Views/KMMultiSelectButton.swift
- Sources/Views/KMMyVideoTemplateCell.swift
- Sources/Views/KMStaticTopMessageCell.swift
- Sources/Views/KMTextViewPopUP.swift
- Sources/Views/KMTypingIndicator.swift
- Sources/Views/KMVideoCell.swift
- Sources/Views/KMVideoTemplateCell.swift
- Sources/Views/SpeechToTextButton.swift
- Sources/Views/TranslucentView.swift
💤 Files with no reviewable changes (11)
- Sources/CustomEvent/KMCustomEvent.swift
- Sources/Utilities/ReceivedMessageCaptionViewSizeCalculator.swift
- Sources/Models/ALKGenericCard.swift
- Sources/Controllers/ALKAlertViewController.swift
- Sources/Views/ALKFriendNewChatCell.swift
- Sources/Controllers/ALKCustomVideoPreviewViewController.swift
- Sources/Views/ALKDocumentCell.swift
- Sources/Controllers/ALKCustomCameraPreviewViewController.swift
- Sources/Controllers/ALKCustomCropImageViewController.swift
- Sources/Controllers/ALKMapViewController.swift
- Sources/Views/ALKFormTextItemCell.swift
🧰 Additional context used
🧠 Learnings (1)
Sources/Controllers/ALKConversationViewController.swift (1)
Learnt from: AbhijeetRanjan308
PR: Kommunicate-io/KommunicateChatUI-iOS-SDK#330
File: Sources/ViewModels/ALKConversationViewModel.swift:801-810
Timestamp: 2025-03-18T00:05:46.362Z
Learning: In `ALKConversationViewModel.swift`, within the `ALKConversationViewModel` class, when updating the user's email in the `send(message:isOpenGroup:metadata:)` method, callbacks are avoided to ensure that multiple tasks are executed immediately without delay. The code needs to execute without delay, and the UI handles any failures by prompting the email collection UI again elsewhere in the code.
🧬 Code Definitions (13)
Sources/Controllers/ALKConversationViewController+TableView.swift (8)
Sources/Controllers/ALKConversationViewController.swift (1) (1)
listTemplateSelected(1569:1596)Sources/ViewModels/ALKConversationViewModel.swift (3) (3)
heightForRow(339:523)messageForRow(300:303)messageForRow(330:333)Sources/Controllers/ALKConversationViewController.swift (1) (1)
listTemplateSelected(1569:1596)Sources/ViewModels/ALKConversationViewModel.swift (3) (3)
heightForRow(339:523)messageForRow(300:303)messageForRow(330:333)Sources/Controllers/ALKConversationViewController.swift (1) (1)
listTemplateSelected(1569:1596)Sources/ViewModels/ALKConversationViewModel.swift (3) (3)
heightForRow(339:523)messageForRow(300:303)messageForRow(330:333)Sources/Controllers/ALKConversationViewController.swift (1) (1)
listTemplateSelected(1569:1596)Sources/ViewModels/ALKConversationViewModel.swift (3) (3)
heightForRow(339:523)messageForRow(300:303)messageForRow(330:333)
Sources/Views/ALKLocationCell.swift (15)
Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)Sources/Utilities/UIViewController+Extension.swift (1) (1)
topViewController(27:31)
Sources/Views/ALKFriendMessageQuickReplyCell.swift (13)
Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)Sources/Utilities/ALKMessageViewModel+Extension.swift (1) (1)
suggestedReply(118:131)
Sources/Views/ALKLinkPreviewBaseCell.swift (10)
Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)Sources/Views/ALKChatBaseCell.swift (2) (2)
menuWillShow(39:41)menuWillHide(43:49)
Sources/LinkPreview/ALKLinkPreviewManager.swift (11)
Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)
Sources/Views/ALKChatCell.swift (12)
Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)
Sources/CustomEvent/ALKCustomEventHandler.swift (6)
Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)Sources/Controllers/ALKConversationViewController.swift (1) (1)
messageSent(2603:2625)
Sources/Views/ALKInformationCell.swift (17)
Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)Sources/Views/ALKFriendFormCell.swift (1) (1)
setupViews(82:85)
Sources/Views/ALKMessageBaseCell.swift (14)
Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
displayNames(1876:1883)
Sources/Controllers/ALKCreateGroupViewController.swift (19)
Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)Sources/Utilities/UIColor+Extension.swift (1) (1)
placeholderGray(74:76)
Sources/Models/KMFormTemplate.swift (18)
Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)Sources/LinkPreview/KMLinkPreviewMeta.swift (1) (1)
value(39:52)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
selected(1417:1426)
Sources/Utilities/KMZendeskChatHandler.swift (7)
Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)Sources/ViewModels/ALKConversationViewModel.swift (1) (1)
sendFile(1885:1904)
Sources/ViewModels/ALKConversationViewModel.swift (12)
Sources/Controllers/ALKConversationViewController.swift (1) (1)
showInvalidReplyAlert(2246:2266)Sources/CustomEvent/ALKCustomEventHandler.swift (1) (1)
publish(21:81)Sources/Utilities/String+Extension.swift (2) (2)
isValidEmail(67:71)isValidEmail(75:78)Sources/Utilities/KMZendeskChatHandler.swift (1) (1)
isZendeskEnabled(112:117)Sources/Controllers/ALKConversationViewController.swift (1) (1)
showInvalidReplyAlert(2246:2266)Sources/CustomEvent/ALKCustomEventHandler.swift (1) (1)
publish(21:81)Sources/Utilities/String+Extension.swift (2) (2)
isValidEmail(67:71)isValidEmail(75:78)Sources/Utilities/KMZendeskChatHandler.swift (1) (1)
isZendeskEnabled(112:117)Sources/Controllers/ALKConversationViewController.swift (1) (1)
showInvalidReplyAlert(2246:2266)Sources/CustomEvent/ALKCustomEventHandler.swift (1) (1)
publish(21:81)Sources/Utilities/String+Extension.swift (2) (2)
isValidEmail(67:71)isValidEmail(75:78)Sources/Utilities/KMZendeskChatHandler.swift (1) (1)
isZendeskEnabled(112:117)
🪛 SwiftLint (0.57.0)
Sources/Controllers/ALKMultipleLanguageSelectionViewController.swift
[Warning] 12-12: Type name 'ALKMultipleLanguageSelectionViewController' should be between 3 and 40 characters long
(type_name)
Sources/Views/ALKInformationCell.swift
[Warning] 148-148: Prefer static over class in a final class
(static_over_final_class)
Sources/Utilities/KMZendeskChatHandler.swift
[Warning] 34-34: Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible`
(blanket_disable_command)
Sources/Controllers/ALKConversationViewController.swift
[Error] 1561-1561: Force casts should be avoided
(force_cast)
Sources/ViewModels/ALKConversationViewModel.swift
[Warning] 1596-1596: where clauses are preferred over a single if inside a for
(for_where)
🪛 actionlint (1.7.4)
.github/workflows/ios_linter_build_check.yaml
53-53: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build and Lint
🔇 Additional comments (246)
Sources/Models/KMVideoTemplate.swift (1)
9-10: Formatting Improvements for Consistency.The changes remove the extraneous space before the colon in both the struct declaration and the
sourceproperty. This enhances uniformity across the codebase without altering functionality.Sources/Models/KMDocumentConfiguration.swift (1)
25-25: Improved Formatting for ReadabilityThe updated spacing in the array initialization for
documentOptionsnow clearly separates each element, which enhances readability and aligns with common Swift style guidelines. No functionality is affected by this change.Sources/Views/ALKFormSingleSelectItemCell.swift (3)
22-22: Improved syntax formatting for variable declarationThe spacing has been corrected to follow Swift style guidelines by removing the space before the colon.
60-67: Updated enum references in constraintsThe constraints now reference the renamed enums with proper capitalization, maintaining consistency with the enum declaration changes.
75-75: Improved enum naming conventionRenamed enums from
nameLabeltoNameLabelandcheckBoxImagetoCheckBoxImageto follow Swift's standard naming convention where enum names should be capitalized.Also applies to: 81-81
Sources/Views/ALKFormMultiSelectItemCell.swift (4)
22-22: Improved syntax formatting for variable declarationThe spacing has been corrected to follow Swift style guidelines by removing the space before the colon.
55-55: Simplified conditional statementRemoved unnecessary parentheses around the condition, maintaining the same logic while improving readability.
66-73: Updated enum references in constraintsThe constraints now reference the renamed enums with proper capitalization, maintaining consistency with the enum declaration changes.
80-80: Improved enum naming conventionRenamed enums from
nameLabeltoNameLabelandcheckBoxImagetoCheckBoxImageto follow Swift's standard naming convention where enum names should be capitalized.Also applies to: 86-86
Sources/ViewModels/ALKFormViewModelItem.swift (4)
97-99: Consistent Initializer Formatting for FormViewModelTextItemThe initializer has been reformatted so that its parameters and the closing parenthesis are now aligned more concisely. This improves readability and consistency with the codebase’s style guidelines.
116-118: Improved Parameter Alignment in FormViewModelTextAreaItemThe changes in the initializer for FormViewModelTextAreaItem (i.e. aligning the parameters on a single line after the method signature) enhance the overall clarity and consistency of the code formatting.
180-181: Enhanced Spacing in Property Declaration for Dropdown ItemThe property declaration for
titlein FormViewModelDropdownItem now includes a space before the colon — e.g.let title: String— which aligns with Swift style guidelines and improves code readability.
185-190: Refined Initializer Formatting for FormViewModelDropdownItemThe initializer for FormViewModelDropdownItem now properly formats the parameter list by adding a space after the comma (i.e.
name: String, options: [Option]). This minor adjustment improves clarity and maintains consistent style.Sources/Views/ALKAttatchmentView.swift (1)
84-86: Streamlined Conditional Logic indownload()The updated conditional now combines the check for a valid URL and the service availability flag in one concise line:
if let url = messageObject.fileMetaInfo?.url, !serviceEnabled {This refactor enhances readability while preserving the intent. Please verify that this logic correctly handles all intended scenarios.
Sources/Views/ALKAudioRecordingView.swift (1)
1-251: Overall Structure and ConsistencyThe refactoring in the conditional checks for both
moveViewandmoveViewRTLmethods is stylistic and aligns with the project’s internal code improvements aimed at enhancing clarity and maintainability. The logical flow remains intact, and these changes improve consistency in how the gesture movement delta is applied.Great work on these internal improvements!
Sources/Views/ALKFormCell.swift (13)
14-14: Declaration ofcellvariable for dropdown support
The propertyvar cell: KMFormDropDownCell?is now declared and is later used in dropdown-related code. Please verify that its lifecycle is appropriately managed so that it isn’t accessed erroneously outside dropdown contexts.
217-220: Streamlined Optional Binding in Text Field Case
The if‑let statement in the.textcell configuration has been reformatted (line 218) to directly extract the text fromformDataSubmit.textFields[indexPath.section]. This change improves readability and maintains functionality.
248-250: Consistent Formatting in Password Cell Value Extraction
The optional binding in the password cell branch (line 250 marked with “~”) is now consistent with the.textcase. The formatting makes the intent clearer when setting the text field’s content.
274-280: Improved Formatting in Single Select Logic
The condition in the singleselect cell (lines 274–280) has been reformatted. The optional binding for retrievingformDataand comparing the single select field value now reads more clearly.
314-317: Enhanced Clarity in Multi-Select (Multiple Selection Enabled) Branch
The conditional check and subsequent UI update for multi-select items (lines 314–317) now use a clear, well‑structured optional binding to determine if the option is selected. This improves code clarity in the configuration where multiple selection on checkboxes is enabled.
352-359: Consistent Optional Binding in Multi-Select (Standard) Branch
In the alternative multi-select branch (lines 352–359), the optional binding for retrieving the selection state has been reformatted for better readability. This ensures consistency with the overall style applied in similar cells.
427-431: Refined Dropdown Field Tuple Extraction
The retrieval of dropdown field data (lines 427–431) now uses a consistent if‑let binding to extract the tuple fromdropDownFields. The new tuple format[Int: (Int, String?)]is handled correctly here.
507-510: Updated Dropdown Option Selection Handling
Within theoptionSelectedmethod (lines 507–510), the assignmentformSubmittedData.dropDownFields[position] = (index, selectedText)reflects the updated tuple format. This ensures that when an option is selected, the value is stored consistently with the new definition in
FormDataSubmit.
512-516: Consistent Update in Default Dropdown Option Selection
In thedefaultOptionSelectedmethod (lines 512–516), the updated assignment todropDownFieldsnow uses the new tuple syntax correctly. This ensures uniformity between both dropdown update methods.
537-545: Improved Readability in Text Field Validation
In the.textvalidation branch (lines 537–545), the inline optional binding for retrieving the regex pattern (if let validation = textFieldModel?.validation, let regxPattern = validation.regex {) has been reformatted for clarity. This makes it easier to follow the validation logic.
553-562: Streamlined TextArea Validation Logic
Similarly, in the.textareavalidation branch (lines 553–562), the extraction of the regex pattern has been reformatted. This consistent style across similar validations aids in maintainability.
568-572: Guard Condition for Dropdown Validation
The guard statement on line 568 now cleanly checks for the existence of validation rules for a dropdown item. If no validation exists, it defaults the field to valid. This removes unnecessary complexity in further logic.
622-630: Tuple Formatting Update in FormDataSubmit
The declaration ofdropDownFieldsin theFormDataSubmitclass (line 628) now uses the tuple format[Int: (Int, String?)](note the space after the comma). This subtle change improves consistency and readability across the codebase.Sources/Controllers/ALKBaseViewController.swift (1)
38-41: Consolidated Conditional for Back Button Setup.
The conditional checking whether the first view controller is an instance ofALKConversationViewControllerhas been consolidated into a single line. This improves readability without altering the logic. Please verify that no unintended behavioral changes occur on the navigation flow.Sources/Views/ALKEmailView.swift (3)
70-70: Removed Unnecessary Trailing Comma in Constraint.
The removal of the trailing comma in theemailLabel.heightAnchorconstraint forALKEmailTopViewenhances consistency with Swift’s formatting conventions.
110-111: Formatted Attributed String Attributes.
In theALKEmailBottomView, the trailing comma has been removed from the attributes dictionary foremailLinkLabel. This minor formatting change improves readability and aligns with our code style guidelines.
155-156: Refined Constraints Format.
The trailing comma in the constraint definition foremailLinkLabel.heightAnchorhas been removed, resulting in cleaner constraint code.Sources/Models/KMFormTemplate.swift (3)
20-20: Standardized Spacing in Metadata Declaration.
The spacing in the declaration ofmetadatawithin theElementstruct has been standardized (frommetadata :tometadata:). This purely cosmetic adjustment improves code consistency.
31-33: Uniform Formatting for Option Properties.
The formatting adjustments for the properties in theOptionstruct (i.e.label,value,selected, anddisabled) improve readability by ensuring consistent spacing.
38-38: Consistent Spacing in Action Metadata Declaration.
The spacing standardization for themetadataproperty in theActionstruct aligns with the formatting changes across similar models in the project.Sources/Models/KMListTemplateModel.swift (1)
22-22: Standardized Article ID Declaration.
The declaration of thearticleIdproperty has been updated from[String:String?]?to[String: String?]?, standardizing the spacing for better legibility.Package.resolved (1)
36-37: Updated Dependency Version for KommunicateCore_iOS_SDK.
ThePackage.resolvedfile now reflects the upgrade ofKommunicateCore_iOS_SDKto version1.2.6with the new revision"891a2e23a214cc35e54097f8499f05a96fe40ef3". Please confirm that corresponding files (e.g.,PodspecandPackage.swift) have been updated accordingly to maintain dependency consistency.Sources/Utilities/ALKVideoUploadManager.swift (3)
30-31: Formatting improvement for better readability.The conditional statement has been reformatted to improve readability by removing the unnecessary line break.
83-83: Consistent type declaration formatting.The spacing around the colon in the dictionary type declaration has been standardized.
135-137: Consistent string format spacing.The spacing in the string format statements has been standardized for better code consistency.
Sources/Models/ALKMessageModel.swift (4)
72-72: Standardized property declaration spacing.Removed the space before the colon in the property declaration to maintain consistent formatting.
188-195: Standardized type declaration formatting.Removed the space before colons in property declarations within the
KMFieldstruct for consistent code style.
196-198: Standardized nested struct property declaration.Improved formatting in the nested
Actionstruct by removing the space before colon in the property declaration.
221-231: Standardized function signature formatting.Improved the formatting of the function signature and return type declaration by removing the space before the colon.
Package.swift (1)
19-19: Updated core SDK dependency version.The minimum required version of KommunicateCore_iOS_SDK has been bumped from 1.2.5 to 1.2.6, which likely includes important fixes or improvements needed for compatibility with this release.
Sources/Models/KMAutoCompleteItem.swift (1)
16-16: Standardized parameter declaration formatting.Removed the space before the colon in the parameter declaration to maintain consistent formatting across the codebase.
Sources/LinkPreview/ALKLinkPreviewManager.swift (1)
13-17: Consolidated Initializer Parameters
The initializer now presents its parameters in a more compact form by merging the declaration lines. This improves readability while retaining clarity.Sources/Controllers/ALKConversationViewController+UIImagePicker.swift (2)
11-13: Unified Protocol Conformance Declaration
The conformance to bothUIImagePickerControllerDelegateandUINavigationControllerDelegateis now succinctly declared on a single line. This enhances clarity without impacting functionality.
23-25: Consistent Media Type Check Formatting
The conditional check for the media type ("public.movie") has been reformatted to a more streamlined structure. This improves readability while preserving the original logic.KommunicateChatUI-iOS-SDK.podspec (2)
1-3: Version Increment Update
The SDK version has been updated to1.4.2, aligning with the PR objectives. Please ensure that the changelog and any related documentation are updated accordingly.
31-33: Dependency Version Bump for KommunicateCore-iOS-SDK
Updating the dependency toKommunicateCore-iOS-SDKversion1.2.6is correctly applied. It is advisable to verify compatibility and check for any breaking changes associated with this minor version bump.Sources/Utilities/KMConversationScreenConfiguration.swift (1)
15-16: Streamlined Optional Property Initialization
Changingpublic static var staticTopIcon: UIImage? = niltopublic static var staticTopIcon: UIImage?leverages Swift’s default initialization of optionals tonil. This simplifies the declaration without altering behavior.Sources/Utilities/MessageMention.swift (1)
196-198: Improved Conditional Formatting for Mention Validation
The condition that validates the range and checks the prefix has been consolidated into a single, more readable line. This maintains the functionality while improving clarity.Sources/Views/ALKLinkView.swift (1)
167-167: Formatting improvement for consistent Swift style.The code now follows standard Swift formatting conventions by removing extra space before the type declaration in the parameter list.
Sources/Utilities/KMTextToSpeech.swift (2)
13-14: Formatting improvement: Type declarations now follow standard Swift conventions.The spaces before colons in type declarations have been removed, following Swift style guidelines.
Also applies to: 24-24
38-38: Formatting improvement: Consistent spacing around braces.Proper spacing has been added before opening braces, improving code readability and consistency.
Also applies to: 55-55
Sources/Utilities/ALKRichMessageAutoSuggestion.swift (1)
18-18: Formatting improvement: Consistent spacing in control flow and type declarations.The changes ensure proper spacing before opening braces in guard statements and remove unnecessary spaces in dictionary type declarations, improving code readability.
Also applies to: 22-22
Sources/Utilities/LayoutProxy.swift (1)
54-54: Formatting improvement: Consistent brace placement.The opening braces have been moved to the same line as the function declarations, following a consistent style throughout the codebase.
Also applies to: 60-60, 82-82, 91-91, 100-100
Sources/Utilities/UIColor+Extension.swift (1)
17-20: Modernized Scanner API usage and improved color handling.The code has been updated to use modern Swift APIs:
scanner.scanLocation→scanner.currentIndexwith proper index handling- Changed from
UInt32toUInt64for the color variable- Updated to
scanHexInt64fromscanHexInt32These changes improve the code's robustness when handling hex color values and align with current Swift best practices.
Sources/Utilities/KMMultipleSelectionConfiguration.swift (3)
18-18: Consistent formatting applied to property declarations.The spacing around colons has been standardized, removing extra spaces before colons in property declarations. This improves code readability and ensures consistent style across the codebase.
20-20: Consistent formatting applied to property declarations.Spacing around the colon has been standardized to match Swift style guidelines, improving code readability and consistency.
40-40: Consistent formatting applied to property declarations.Spacing around the colon has been standardized, removing extra space before the colon in the property declaration, maintaining consistency with other properties in this struct.
Sources/Views/ALKFriendLinkPreviewCell.swift (2)
260-260: Removed unnecessary trailing comma.The trailing comma at the end of the constraint declaration has been removed, which improves code cleanliness while maintaining the same functionality.
336-336: Simplified reply message check with more concise type checking.The conditional check for reply messages has been improved by using the
isoperator, which simultaneously checks if the value exists and is of the correct type. This makes the code more concise and easier to read.Sources/Views/ALKChatBar.swift (5)
137-138: Simplified image rendering mode configuration.The conditional check for tintColor has been removed, now consistently applying the
.alwaysTemplaterendering mode to the image and setting the tint color directly. This simplification makes the code more straightforward and reduces unnecessary conditional logic.
258-258: Formatting improvement in text attributes dictionary.The NSAttributedString.Key.foregroundColor entry has been properly aligned with other dictionary entries, improving code readability.
505-505: Improved view addition formatting.The line break has been removed from the array of views being added for autolayout, making the code more compact while maintaining readability.
527-527: Formatting improvement in constraint setup.The constraint declaration has been cleaned up by removing unnecessary whitespace, maintaining consistent formatting across constraint definitions.
743-743: Simplified conditional check formatting.The unnecessary line break in the if condition has been removed, making the code more compact and consistent with the project's style.
Sources/Utilities/ALKImageView+Extension.swift (1)
25-25: Consistent method declaration style.The opening brace has been moved to the same line as the method signature, aligning with Swift style guidelines and making the code more consistent with the rest of the codebase.
Sources/Utilities/RatingHelper.swift (3)
11-11: Code style improvement.Updated class declaration to follow Swift style guidelines by removing the space before the colon.
15-15: Code style improvement.Updated parameter type declaration to follow Swift style guidelines by removing the space before the colon.
32-32: Code style improvement.Updated parameter type declaration to follow Swift style guidelines by removing the space before the colon.
Sources/Controllers/ALKCustomVideoCaptureController.swift (1)
202-207: Improved video orientation handling using modern scene-based approach.The code has been updated to use the modern scene-based approach introduced in iOS 13 instead of the deprecated
statusBarOrientationproperty. This makes the code more robust and future-proof.#!/bin/bash # Check for any remaining references to statusBarOrientation in the project rg "statusBarOrientation" --type swiftSources/Views/ALKInformationCell.swift (6)
17-17: Improved enum naming convention.Renamed enum value from
viewtoViewto follow Swift naming conventions where types (including enum cases that represent types) should be capitalized.
145-145: Updated references to renamed enum.References to the renamed enum have been properly updated throughout the code.
Also applies to: 149-149
130-138: Code formatting improvements.Improved code formatting for line view declarations.
264-270: Code formatting improvement.Improved formatting and spacing in the setupViews method.
293-293: Code formatting improvement.Improved code formatting for adding views for autolayout.
441-445: Improved Swift idioms in method signature.Changed return type from
Dictionary<String,Any>?to the more Swift-idiomatic[String: Any]?shorthand syntax. Also improved JSON deserialization with proper spacing.Sources/Utilities/UIAlertController+Extension.swift (3)
67-69: Improved enum naming convention.Renamed enum from
activityAlerttoActivityAlertto follow Swift naming conventions where types should be capitalized.
71-85: Updated to use modern scene-based window access.Improved window access by using the scene-based approach introduced in iOS 13, which is the recommended way to access the key window. This makes the code more robust and future-proof.
The implementation correctly:
- Gets the first connected scene
- Finds the key window
- Gets the root view controller
- Handles the presentation logic safely
87-90: Updated references to renamed enum.References to the renamed enum have been properly updated in the dismissIPActivityAlert method.
Sources/Utilities/ALMessage+Extension.swift (4)
107-107: Improved variable declaration to immutable constant.Changed
defaultMessagefrom a mutable variable (var) to an immutable constant (let), which is a better practice since the value isn't modified after assignment.
117-117: Improved code formatting.Added a space after the comma in the case statement for better readability.
260-260: Simplified conditional statement.Removed unnecessary parentheses around the condition
contentType == 10for cleaner code.
396-396: Improved code formatting.Removed unnecessary line break and parentheses for better readability.
Sources/Views/ALKFriendMessageQuickReplyCell.swift (2)
94-94: Used wildcard pattern for unused variable.Changed
if let check = viewModel.suggestedReply()toif let _ = viewModel.suggestedReply()since the variable wasn't being used within the conditional block. This is good Swift practice that avoids compiler warnings about unused variables.
211-211: Improved constraint formatting.Standardized the formatting of the trailing constraint to match the style of other constraints in the file.
Sources/Controllers/ALKMultipleLanguageSelectionViewController.swift (4)
12-12: Standardized type declaration formatting.Removed space before colon in class declaration for consistent Swift style.
🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 12-12: Type name 'ALKMultipleLanguageSelectionViewController' should be between 3 and 40 characters long
(type_name)
15-15: Standardized property declaration formatting.Removed space before colon in variable declaration for consistent Swift style.
91-91: Improved parameter list formatting.Added space after comma in function parameter list for better readability.
101-101: Improved array formatting.Added spaces after commas in array literal for better readability.
Sources/Models/ALKConfiguration.swift (1)
194-194: Standardized property declaration formatting.Removed spaces before colons in variable declarations for consistent Swift style throughout the file.
Also applies to: 221-221, 226-226, 229-229
Sources/Utilities/ALKHTTPManager.swift (4)
159-159: Improved formatting by removing extra space before comma.The comma formatting in this condition check has been standardized, improving readability and consistency.
164-164: Updated type declaration formatting to match Swift style guidelines.The spacing in the type declaration has been changed from
[String:String]to[String: String], which adheres to Swift style guidelines that recommend a space after the colon in type declarations.
198-198: Improved string formatting consistency by removing extra space.The extra space before the string parameter "data" has been removed, making the code more consistent.
200-200: Improved string formatting consistency by removing extra space.The extra space before
task.groupdIdhas been removed for consistent formatting throughout the codebase.Sources/Views/ALKMyLinkPreviewCell.swift (3)
222-223: Improved constraint activation formatting.The closing parenthesis for the
NSLayoutConstraint.activatecall has been moved to a new line, improving code readability.
260-261: Updated method declaration formatting.The method declaration formatting has been standardized to place the opening brace on the same line as the method signature, which is a common Swift style guideline.
280-282: Simplified conditional logic for reply message detection.The condition to check if a message is a reply has been simplified by directly checking if the metadata value is a String, rather than checking for nil and then checking the type.
Sources/Controllers/ALKCustomCameraViewController.swift (5)
131-131: Improved conditional formatting.The line break within the conditional statement has been removed, improving code readability without changing the logic.
152-153: Simplified conditional statement.The conditional structure for creating a UIImage from photo data has been simplified by removing a line break and redundant spacing.
264-265: Added support for limited photo library access.Added a new case to handle the
.limitedauthorization state for photo library access, which allows users to grant access to only specific photos. This is a good addition to support newer iOS features.
340-345: Updated interface orientation detection to use UIWindowScene.The code has been modernized to use
UIWindowSceneinstead of directly accessingUIApplicationfor determining the interface orientation. This approach is more aligned with Apple's current recommendations for window scene-based UI management.
496-496: Updated image data request method to include orientation information.The method call has been updated from
requestImageDatatorequestImageDataAndOrientation, which helps ensure that image orientation is properly handled when retrieving images from the photo library.Sources/Views/ALKGenericCardCell.swift (2)
45-45: Improved closure formatting.Added space before the opening brace in the closure syntax, improving code readability and consistency with Swift style guidelines.
134-134: Updated property declaration formatting.The property declaration format has been changed from
coverImageContentMode : ContentModetocoverImageContentMode: ContentMode, which follows Swift style guidelines that recommend no space before the colon and a space after.Sources/Controllers/ALKPhotoPicker.swift (2)
42-42: Good formatting improvement.The completion handler's parameter list formatting has been improved by removing unnecessary whitespace between parameters, enhancing code readability and consistency.
46-46: Improved variable declaration using constant.Changing from
vartoletforselectedGifsPathis appropriate since the array is initialized as empty and never modified. This better communicates the intent that the array is immutable after initialization.Sources/Views/ALKListTemplateCell.swift (3)
135-135: Style improvement: unnecessary parentheses removed.Removing parentheses from the if condition improves code readability while maintaining the same functionality.
265-266: Function signature formatting improved.The function signature formatting has been standardized, with proper spacing between the closing parenthesis and opening brace.
375-375: Improved closure syntax formatting.Adding a space before the opening brace in closure syntax improves code readability and follows Swift style conventions.
Also applies to: 392-392
Sources/Views/ALKMessageBaseCell.swift (3)
300-300: Function signature formatting improvement.The method signature formatting has been standardized for
messageHeight, with proper spacing and brace placement.
366-366: Improved if statement formatting.Removed unnecessary parentheses around the condition and added proper spacing, which improves readability while maintaining the same functionality.
Also applies to: 387-387
442-442: Minor formatting improvement in dictionary.The character encoding options are now consistently formatted.
Sources/Utilities/KMZendeskChatHandler.swift (9)
28-28: Parameter spacing improved in protocol method signature.Added proper spacing after the comma in the parameter list, improving readability.
36-36: Improved class declaration formatting.The class declaration now has consistent spacing between protocol conformances.
46-47: Variable declaration formatting improved.Added proper spacing after colons in variable declarations, following Swift style conventions.
Also applies to: 51-51
78-78: Conditional statement formatting improved.The multi-line conditional check is now properly formatted with consistent indentation and spacing.
Also applies to: 85-87
120-121: Closure syntax formatting improved.The
endChatmethod now uses consistent spacing before the opening brace in the closure, following Swift style conventions.
169-171: Multi-line conditional formatting improved.The multi-line if statement is now properly formatted with consistent spacing and alignment.
180-180: Dictionary literal formatting improved.Added proper spacing after colons in the dictionary literal, improving readability.
183-183: Variable declaration consistency.These variable declarations now follow consistent formatting patterns.
Also applies to: 210-210, 487-487
265-265: Multiple formatting improvements across functions.Numerous formatting improvements throughout the file, including:
- Proper spacing in parameter lists
- Consistent closure syntax
- Proper spacing in dictionary literals
- Consistent case statement indentation
- Improved alignment in method calls and variable declarations
These changes improve code readability and maintain consistent style without affecting functionality.
Also applies to: 272-272, 305-306, 348-348, 364-368, 382-382, 429-435, 453-453, 467-467, 496-496, 513-513, 521-521, 529-530, 539-541, 545-546
Sources/Utilities/Data+Extension.swift (1)
15-18: Streamline Attribute Dictionary Formatting.
Removing the extra line break between thedocumentTypeandcharacterEncodingentries results in a more compact options dictionary without affecting functionality.Sources/Views/ALKFriendFormCell.swift (2)
35-37: Clarify Padding Calculation Formatting.
The formatting for computingmaxWidth—subtracting the avatar’s width and leading padding fromUIScreen.main.bounds.width—is now clearer. Please verify that this layout computation aligns with your UI design requirements.
139-146: Consistency in Autolayout Views Array.
The removal of the trailing comma before thetimeLabelin the array passed toaddViewsForAutolayoutimproves code consistency and readability without impacting functionality.Sources/Utilities/String+Extension.swift (1)
89-93: Improved NSRange Initialization.
Switching toNSRange(location: 0, length: count)from the older NSMakeRange approach offers improved clarity while maintaining the original phone number validation logic.Sources/Utilities/ALKRichMessageStyle.swift (1)
17-21: Consistent Array Formatting instyles.
Removing the trailing comma in thestylesarray fosters consistency with the rest of the codebase. This stylistic change does not impact functionality.Sources/Controllers/ALKConversationViewController+Alert.swift (1)
23-23: Deprecated API usage updated correctlyThe UIActivityIndicatorView style has been updated from the deprecated
.grayto.medium, which is the recommended replacement for modern iOS versions. This update ensures compatibility with newer iOS versions and aligns with best practices.Sources/Views/ALKLoadingIndicator.swift (1)
13-13: Deprecated API usage updated correctlyThe UIActivityIndicatorView style has been updated from the deprecated
.grayto.medium, which is the recommended replacement for modern iOS versions. This update ensures compatibility with newer iOS versions and aligns with best practices.Sources/Models/ALKNavigationItem.swift (1)
64-64: Modern API usage improvementThe CGRect initialization has been updated from the legacy
CGRectMakefunction to the more modernCGRect(x:y:width:height:)initializer. This improves code readability and follows Swift's recommended initialization patterns.Sources/Views/ALKGroupMemberCell.swift (1)
88-88: Deprecated API usage updated correctlyThe UIActivityIndicatorView style has been updated from the deprecated
.grayto.medium, which is the recommended replacement for modern iOS versions. This update ensures compatibility with newer iOS versions and aligns with best practices.Sources/Controllers/KMMuteConversationViewController.swift (2)
40-41: Commenting Out Unnecessary Picker Property
The line settingpicker.showsSelectionIndicator = trueis now commented out with an explanatory note. This change adheres to updated requirements and removes an unnecessary UI element.
75-75: Minor Formatting in Localization Call
The formatting (or spacing) in the localized string call for the "OneYear" option has been updated. Although this change has no functional impact, it improves consistency with similar calls in the code.Sources/ViewModels/ALKGroupDescriptionViewModel.swift (1)
35-37: Closure Syntax Formatting Update
The closure passed toupdateChannelMetaDatahas been reformatted by moving the opening brace to the same line as the method call. This improves code readability without affecting functionality.Sources/Views/ALKMyFormCell.swift (1)
100-100: Removed Trailing Comma in View Setup
The trailing comma in theaddViewsForAutolayoutcall has been removed. This syntactical cleanup increases code neatness without impacting function.Sources/Controllers/ALKGroupDescriptionController.swift (2)
54-54: Updated Activity Indicator Style
The activity indicator’s style has been updated from.grayto.medium. This modernizes the UI and ensures consistency with similar changes across the codebase.
84-86: Initializer Formatting Improvement
The formatting of the initializer’s parameter list has been adjusted for better readability and consistency. This change is purely cosmetic and does not affect functionality.Sources/Utilities/ALKMessageViewModel+Extension.swift (1)
153-157: Improved Formatting for Action Type Conditions
The conditional checks for"submit"and"link"types have been reformatted, making the intent clearer. There is no change in logic—only an enhancement of readability in the conditions checking bothaction["type"]andobject["type"].Sources/Controllers/ALKWebViewController.swift (1)
17-17: Updated Activity Indicator Style
The UIActivityIndicatorView’s style has been updated from.grayto.mediumto harmonize with the design changes across the codebase.Sources/Controllers/ALKFormDatePickerViewController.swift (1)
127-127: Initializer Formatting Improvement
The initializer’s parameter list has been reformatted so that the closing brace now appears on the same line as the last parameter. This change improves readability without affecting functionality.Sources/Controllers/ALKDocumentViewerController.swift (1)
17-17: Consistent Activity Indicator Update
The activity indicator is now instantiated with the.mediumstyle, ensuring a consistent visual experience across different view controllers.Sources/Controllers/ALKConversationListTableViewController.swift (3)
139-139: Localized Delete Alert Initialization
The alert for conversation deletion now uses localized strings for both its title and message, supporting proper internationalization.
151-151: Improved Delete Button Localization
The delete button’s title is now retrieved using a localized string, which helps maintain a consistent user language experience.
169-175: Robust Error Handling on Deletion Failure
When the deletion of a conversation fails, the code now callsshowAlertWithSingleActionwith a localized failure message, giving immediate feedback to the user. Ensure that this UX behavior aligns with overall error handling standards.Sources/Utilities/NotificationHelper.swift (4)
125-129: Enhanced Refresh Conversation Formatting
In therefreshConversationmethod, the call toisChatThreadIsOpennow spans multiple lines with clearly aligned parameters. This formatting change improves readability without altering the underlying logic.
158-160: Simplified Conditional in isKMVCAtTop
The conditional now succinctly checks that if the top view controller is a UISearchController whose searchResultsController is an ALKSearchResultViewController, the function returns true. This minor formatting update is clear and effective.
180-184: Refined Notification Tap Handling
The updated condition cleanly unwraps a UISearchController’s presentingViewController as an ALKConversationListViewController. This change helps ensure that tapping a notification correctly navigates to the conversation list when a search interface is active.
226-242: Refactored Controller Stack Navigation
The declaration offindControllerInStackwas reformatted so that thecompletionparameter is aligned with the function signature. This change improves clarity without affecting functionality.Sources/Utilities/String+AutoComplete.swift (1)
39-39: LGTM: Code formatting improvement.This change improves code readability by simplifying the conditional check for whitespace characters.
Sources/Controllers/ALKNewChatViewController.swift (2)
32-32: Update to modern UIActivityIndicatorView style.Changing from
.grayto.mediumaligns with modern iOS standards, as the.graystyle is deprecated in newer iOS versions.
220-220: LGTM: Code formatting improvement.This change simplifies the conditional statement without altering its functionality, making the code more concise and readable.
Sources/Models/ALKChatBarConfiguration.swift (1)
43-43: LGTM: Removed redundant nil initialization.This change eliminates the redundant explicit
= nilinitialization since Swift optional properties already have an implicit default value ofnil. This follows Swift best practices.Sources/Views/ALKFriendMessageCell.swift (2)
258-258: LGTM: Code formatting improvement.This change removes a trailing comma after the last constraint in the NSLayoutConstraint activation array, which improves code consistency.
333-333: Improved type checking mechanism.Changed from
as? Stringtois Stringwhich is more appropriate for this conditional check since you're only testing the type and not using the cast value. This is more direct and slightly more efficient.Sources/Controllers/ALKSearchResultViewController.swift (1)
13-13: Updated activity indicator to use modern stylingChanged the activity indicator style from
.grayto.mediumto align with modern UIKit practices, as part of a broader update to activity indicator styling across the codebase.Sources/Controllers/ALKConversationViewController+TableView.swift (7)
44-49: Code cleanup: Simplified conditional statementRemoved unnecessary parentheses around the condition check while preserving the same logic.
320-321: Improved variable declarationChanged variable declaration from
vartoletsince the cell is not being reassigned after initialization, making the code more semantically correct.
407-408: Code cleanup: Improved method call formattingAdjusted the parameter alignment in the method call for better readability.
418-419: Code cleanup: Improved method call formattingAdjusted the parameter alignment in the method call for better readability, maintaining consistency with similar call on line 407.
546-548: Code cleanup: Improved conditional formattingRemoved unnecessary parentheses while preserving the same logic.
611-612: Code cleanup: Simplified conditional structureRemoved unnecessary parentheses around the condition check for better readability.
623-624: Code cleanup: Simplified conditional structureRemoved unnecessary parentheses around the condition check, maintaining consistency with similar changes in the file.
Sources/Controllers/ALKParticipantSelectionViewContoller.swift (2)
62-64: Code cleanup: Simplified conditional formattingRemoved unnecessary line break in the conditional statement while maintaining the same logic.
188-190: Improved error handling syntaxUpdated the error catching syntax from
catch (_)to the more concisecatch _, which is the preferred Swift syntax when the error variable is not used.Sources/Utilities/ALKActivityIndicator.swift (2)
24-24: Updated to modern UIActivityIndicatorView APIUpdated the activity indicator style from the deprecated
.whiteLargeto the modernUIActivityIndicatorView.Style.large, ensuring compatibility with newer iOS versions.
70-71: Code cleanup: Improved constraint formattingMinor formatting adjustment to the constraint definition for better readability, maintaining consistency with the project's code style.
Sources/Views/ALKChatBaseCell.swift (1)
89-89: Updated to modern UIMenuController API.The code has been simplified by replacing separate calls to
setTargetRectandsetMenuVisiblewith the more conciseshowMenu(from:rect:)method. This modernizes the code and improves readability.Sources/Utilities/UIViewController+Extension.swift (1)
28-30: Updated to modern scene-based window access.This change improves compatibility with newer iOS versions by replacing the deprecated
keyWindowapproach with the scene-based window access pattern. The code now correctly handles multi-scene applications and follows Apple's recommended practices.Sources/ViewModels/SearchResultViewModel.swift (1)
93-93: Consistent formatting.Moving the opening brace to the same line as the method signature improves code style consistency throughout the codebase.
Sources/Views/ALKMessageButtonCell.swift (2)
160-160: Removed unnecessary trailing comma.Cleanup of trailing comma in the constraint array improves code consistency.
361-361: Removed unnecessary trailing comma.Cleanup of trailing comma in the constraint array improves code consistency.
Sources/Views/ALKLocationCell.swift (2)
16-17: Clean formatting adjustment.The formatting change improves code readability by eliminating unnecessary line breaks in the class declaration.
50-55: Modernized window handling for iOS 13+.This update is an important improvement that replaces deprecated window handling with the scene-based approach introduced in iOS 13. The new implementation correctly:
- Gets the first connected window scene
- Finds the key window within that scene
- Retrieves the root view controller
This change makes the code more future-proof and compatible with modern iOS multi-window support.
Sources/Controllers/ALKConversationListViewController.swift (9)
58-58: Updated activity indicator style.The activity indicator style has been updated from
.grayto.medium, which aligns with modern iOS UI guidelines and avoids potential deprecation warnings.
107-107: Simplified conditional check.The conditional check has been streamlined using the
isoperator for type checking, making the code more readable.
328-328: Simplified conditional expression.The conditional expression has been simplified for better readability while preserving the original logic.
427-427: Improved string formatting for logging.Using
String(describing:)is a safer approach for logging optional values, preventing potential "Optional(...)" in logs and unwrapping the values more gracefully.
463-463: Simplified conditional check.Similar to other changes, this conditional check has been simplified using the
isoperator for better readability.
477-477: Simplified type checking.The conditional expression has been improved using the
isoperator to check if the visible controller is of the specified type.
413-413:Details
❓ Verification inconclusive
Changed method access level from
opentopublic.This is another instance of reducing method accessibility from
opentopublic.This is a breaking change if any external code was overriding this method. Ensure this change is intentional and documented in release notes.
Run this script to check if there are any external references to this method that might be affected:
🏁 Script executed:
#!/bin/bash # Check for potential overrides of rowUpdatedAt in external code rg -A 2 -B 2 "override\s+(func|function)\s+rowUpdatedAt" --type swiftLength of output: 71
Action: Verify and Document Impact of Access Modifier Change
The method’s access level was changed from
opentopublic, which may break external overrides. A search for “override rowUpdatedAt” using our regex returned no results, but the output quality is low. Please manually verify that no external modules have overridden this method, and ensure that this breaking change is clearly documented in the release notes.
- File:
Sources/Controllers/ALKConversationListViewController.swift(Line 413)- Concern: Changing the method access level might affect external code if any overrides exist.
- Next Step: Manually confirm (or run a broader search) for any overrides of
rowUpdatedAtin the codebase.
397-397:Details
❓ Verification inconclusive
Changed method access level from
opentopublic.This change reduces the accessibility of the method from
open(can be overridden outside the module) topublic(can be accessed but not overridden outside the module).Be aware that this is a breaking change if any external code was overriding this method. Ensure this change is intentional and properly communicated in release notes.
Run this script to check if there are any external references to this method that might be affected:
🏁 Script executed:
#!/bin/bash # Check for potential overrides of startedLoading() in external code rg -A 2 -B 2 "class\s+\w+\s*:\s*.*ALKConversationListViewController" --type swiftLength of output: 687
Review Update: Verify Impact of Access Level Change on External Overrides
The method
startedLoading()inALKConversationListViewControllerhas been changed fromopentopublic, which prevents overriding outside the module. Our search revealed that the only override occurs in the test mock:
- File:
Demo/KommunicateChatUI-Tests/Mocks/ALKConversationListViewControllerMock.swift
(The mock class overridesstartedLoading().)Since this occurs in a test target, please verify that this override is acceptable and intentional. If this behavior is necessary for testing or simulating subclass behavior, update the mock implementation accordingly or consider if the access level change should be reverted for cases where overriding is required. Also, ensure that this breaking change is clearly communicated in the release notes.
404-404:Details
❓ Verification inconclusive
Changed method access level from
opentopublic.Similar to the previous method, this change reduces the method's accessibility from
opentopublic.This is a breaking change if any external code was overriding this method. Ensure this change is intentional and documented in release notes.
Run this script to check if there are any external references to this method that might be affected:
🏁 Script executed:
#!/bin/bash # Check for potential overrides of listUpdated() in external code rg -A 2 -B 2 "override\s+(func|function)\s+listUpdated" --type swiftLength of output: 70
Attention: Verify External Override Dependencies for
listUpdated()The method
listUpdated()inSources/Controllers/ALKConversationListViewController.swifthas been changed from anopento apublicaccess level. This reduction could break external code if any consumers were overriding it. Our initial search for override references (using both the original and broader regex patterns) did not return any results. However, given the inconclusive nature of the automated search output, please manually verify whether any subclasses or external modules overridelistUpdated(). Also, ensure that this breaking change is intentional and that the release notes clearly document the change.
- Confirm that no external consumers (including subclasses in other modules) are overriding
listUpdated().- Document this breaking change in the release notes if applicable.
Sources/Controllers/ALKConversationViewController+AutoComplete.swift (6)
15-15: Minor formatting improvement.Removed unnecessary space after the comma in the condition, improving code style consistency.
30-31: Formatting adjustment.Removed unnecessary line break before
elsestatement, improving code style consistency.
33-33: Spacing adjustment.Adjusted spacing in the conditional statement to improve readability and maintain consistent code style.
41-41: Improved closure formatting.Added appropriate spacing around the closure in the map function for better readability.
47-47: Improved closure formatting.Added appropriate spacing around the closure in the filter function for better readability.
56-56: Formatting consistency.Added space before opening brace to maintain consistent code style.
Sources/Views/ALKLinkPreviewBaseCell.swift (3)
42-42: Function signature remains unchanged.The function signature remains unchanged while the implementation has been simplified.
46-46: Simplified guard statement.The guard statement has been streamlined by removing the unnecessary intermediate variable
superViewand directly checking ifgestureView.superviewexists.
71-71: Improved menu presentation.Updated to use the more concise
showMenu(from:rect:)method instead of setting the target rect and visibility separately, resulting in cleaner code.Sources/Controllers/ALKCustomPickerViewController.swift (3)
113-118: Improved photo library authorization handlingAdding support for limited photo library access is a good improvement. This change ensures the app can still work properly when users grant only limited access to their photos.
200-200: Cleaner initialization syntaxThe updated initialization of
KMCustomCaptionViewControllerwith direct parameters is cleaner than using separate initializer statements.
249-249:Details
✅ Verification successful
Updated PHImageManager method calls
Updating to
requestImageDataAndOrientationfromrequestImageDatais a good change as it properly handles image orientation metadata.Also applies to: 332-332
🌐 Web query:
Is PHImageManager's requestImageDataAndOrientation better than requestImageData?💡 Result:
The
PHImageManagermethodsrequestImageDataAndOrientation(for:options:resultHandler:)andrequestImageData(for:options:resultHandler:)serve similar purposes but have key differences:Key Differences
Feature requestImageData[1][2]requestImageDataAndOrientation[9][10]Orientation Info ❌ ✅ Includes CGImagePropertyOrientation iOS Availability iOS 8.0+ iOS 13.0+ .NET MAUI Compatibility ✔️ (Xamarin.iOS) ❌ Potential version mismatch warnings Synchronous Request Support ✔️ ✔️ When to Prefer
requestImageDataAndOrientation
- Orientation Handling: The orientation parameter helps display images correctly without manual EXIF rotation adjustments [9].
- Modern iOS Development: For apps targeting iOS 13+ where image orientation is critical (e.g., photo editing apps).
- Unified Image Handling: Simplifies workflows by combining data and orientation in one call.
When to Use Original
requestImageData
- Backwards Compatibility: For apps supporting iOS <13.
- Simple Data Retrieval: When only raw image bytes are needed without orientation metadata.
- .NET/Xamarin Projects: Avoids iOS version compatibility warnings in cross-platform frameworks [10].
Implementation Example
// Using requestImageDataAndOrientation (iOS 13+) PHImageManager.default().requestImageDataAndOrientation(for: asset, options: nil) { (data, uti, orientation, info) in // Apply orientation to UIImage let image = UIImage(data: data)?.withOrientation(orientation) }Performance Considerations
Both methods:
- Support synchronous/asynchronous modes via
PHImageRequestOptions.isSynchronous[4][8]- Allow network loading control via
isNetworkAccessAllowedoption [4][6]- Use same caching infrastructure through
PHCachingImageManager[11]Developers should choose based on orientation requirements and deployment targets. For modern iOS apps,
requestImageDataAndOrientationprovides better future-proofing at the cost of slightly higher minimum OS requirements [9][10].Citations:
- 1: https://learn.microsoft.com/en-us/dotnet/api/photos.phimagemanager.requestimagedata?view=xamarin-ios-sdk-12
- 2: https://developer.apple.com/documentation/photokit/phimagemanager/1616957-requestimagedataforasset
- 3: https://github.com/tilltue/TLPhotoPicker/blob/master/TLPhotoPicker/Classes/TLAssetsCollection.swift
- 4: https://github.com/NSHipster/articles/blob/master/2014-09-16-phimagemanager.md
- 5: https://developer.apple.com/documentation/photos/phimagemanagermaximumsize
- 6: https://qiita.com/m_orishi/items/0f8636151c3f98d9271e
- 7: https://gist.github.com/sindresorhus/b37c9ab01b79b754ca1690aaa266c410
- 8: https://mobikul.com/phasset-in-swift/
- 9: https://developer.apple.com/documentation/photos/phimagemanager/requestimagedataandorientation(for:options:resulthandler:)
- 10: dotnet/maui#21106
- 11: https://developer.apple.com/documentation/photos/phimagemanager
- 12: https://developer.apple.com/documentation/photos/phimagemanager/requestimage(for:targetsize:contentmode:options:resulthandler:)
Updated PHImageManager API Usage
Switching to
requestImageDataAndOrientationis a solid improvement—it now provides the image orientation metadata automatically, which streamlines image handling and reduces the need for manual EXIF-based rotation fixes. Just be aware that this method is available only on iOS 13 and later, so ensure your deployment target aligns accordingly. This update applies both at line 249 and line 332.Sources/Controllers/KMAutoCompleteManager.swift (3)
15-15: Parameter formatting improvementRemoving the space between parameter name and colon follows Swift style guidelines.
194-195: Improved conditional formattingRemoving unnecessary parentheses around
isAutoSuggestionand fixing guard statement formatting improves code readability and follows Swift style guidelines.
223-224: Dictionary declaration cleanupRemoving the trailing comma in the dictionary declaration is a good cleanup.
Sources/CustomEvent/ALKCustomEventCallback.swift (1)
19-20: Consistent parameter formattingAdding spaces after commas and removing spaces before colons in parameter declarations improves readability and follows Swift style guidelines.
Sources/Views/ALKMyMessageCell.swift (3)
209-209: Fixed constraint declarationRemoving the unnecessary trailing comma in layout constraints is a good cleanup.
246-247: Improved method signature formattingConsolidating the function declaration to remove unnecessary line break improves readability.
264-264: Enhanced type checking for reply messageChanging from
metadata[AL_MESSAGE_REPLY_KEY] as? String != niltometadata[AL_MESSAGE_REPLY_KEY] is Stringis a more idiomatic way to perform type checking in Swift.Sources/Views/ALKGroupDescriptionCell.swift (2)
50-52: Simple code formatting improvement.The closing brace has been moved to the same line as the last parameter, removing the unnecessary line break. This change helps maintain consistent code style across the codebase.
119-121: Consistent formatting applied.Similar to the previous change, the closing brace has been moved to the same line as the last parameter, maintaining consistency in code formatting throughout the file.
.github/workflows/ios_linter_build_check.yaml (3)
1-14: Well-structured workflow definition with proper concurrency handling.This GitHub Actions workflow is correctly configured to trigger on pull requests to the master branch with appropriate event types. The concurrency configuration is properly set up to prevent multiple workflows from running simultaneously on the same PR.
16-36: Good setup for the build environment and linting process.The workflow properly sets up the macOS environment and Xcode 16.1.0 before running the linter check. The
pod lib lint --allow-warningscommand is appropriate for checking the pod configuration before merging.
38-50: Well-implemented success notification.The GitHub script action is used correctly to post a success comment to the PR when the linter check passes, providing clear feedback to the developer.
Sources/Views/ALKChatCell.swift (6)
255-257: Code formatting improvement for better readability.The conditional statement has been reformatted to place the opening brace on the same line as the condition, making the code more compact and consistent with modern Swift style guidelines.
262-264: Consistent formatting applied to conditional statement.Similar to the previous change, this conditional statement has been reformatted to follow the same style pattern, maintaining consistency throughout the file.
282-282: Proper localization for waiting queue title.The text is now properly processed through the localization system, which ensures that the text can be translated to different languages based on the user's locale.
310-311: Code formatting improvement for attributed text configuration.The NSAttributedString.Key.foregroundColor assignment has been reformatted for better readability and consistency.
318-319: Consistent formatting for conditional statement.The opening brace has been moved to the same line as the condition, maintaining the consistent formatting style adopted throughout the file.
321-322: Proper localization for last message text.The code now ensures that the last message text is properly localized, which is important for a multi-language application. The ternary operator correctly handles the nil case for viewModel.theLastMessage.
Sources/CustomEvent/ALKCustomEventHandler.swift (5)
39-42: Consistent pattern applied for conversationId handling.Similar to the previous changes, this implements a more flexible approach using
if letinstead ofguard, maintaining consistency with the new pattern throughout the method.
44-49: More flexible handling of rating submission data.The code now uses nested
if letstatements, which provides more flexibility in handling optional values compared to the previousguardapproach. This ensures that the delegate method is only called when all required data is available.
51-54: Consistent pattern applied for conversation resolution.The pattern of using
if letinstead ofguardis consistently applied here as well, maintaining the new approach throughout the method.
56-59: Consistent handling for restart conversation event.The same pattern is applied here, ensuring consistency throughout the method implementation.
73-76: Simplified message handling with forEach.The message handling has been simplified using a
forEachloop, which is more concise and readable than the previous implementation, while maintaining the same functionality.Sources/Controllers/ALKCreateGroupViewController.swift (3)
82-82: Good update to use UIActivityIndicatorView.Style.mediumThis change replaces the deprecated
.graystyle with the newer.mediumstyle, which is the recommended approach in recent iOS versions.
256-257: Appropriate use of UIColor.placeholderGray()The placeholder text color is correctly set using the color utility method, maintaining consistent styling.
270-272: Improved method declaration formattingThe closing brace has been moved to the same line as the method parameters, improving code formatting consistency.
Sources/Utilities/ALKAppSettingsUserDefaults.swift (8)
43-43: Improved optional binding formattingBetter spacing around the optional binding makes the code more readable and consistent with Swift style guidelines.
127-128: Consistent optional binding formattingProper spacing around the optional binding operator improves readability and follows Swift style conventions.
151-153: Consistent formatting in conditional statementsProper spacing and alignment in optional binding chains improves readability and maintainability.
Also applies to: 156-158, 161-163
175-177: Updated to use more secure decoding methodThe deprecated
unarchiveTopLevelObjectWithDatahas been replaced with the newer, type-safeunarchivedObject(ofClass:from:)method, which follows modern Swift practices and improves security.
206-208: Security improvement with NSSecureCodingUpdating from
NSCodingtoNSSecureCodingand adding the requiredsupportsSecureCodingproperty enhances security by enforcing type safety during decoding, helping prevent substitution attacks.
221-221: Added support for bot typing indicatorNew property
botTypingIndicatorIntervalhas been added to control the typing indicator duration for bot messages, supporting the typing indicator feature mentioned in the PR objectives.Also applies to: 236-238
256-259: Updated decoder to support new propertyThe decoder properly handles the new
botTypingIndicatorIntervalproperty, ensuring it's correctly deserialized from saved settings.
273-273: Updated encoder to persist new propertyThe encoder now properly persists the
botTypingIndicatorIntervalproperty, ensuring it's saved in user defaults.Sources/ViewModels/ALKConversationViewModel.swift (6)
780-802: Added typing indicator for bot messagesThis new method implements the bot typing indicator feature mentioned in the PR objectives. It:
- Verifies the conversation is with a bot
- Gets the configured delay time from user defaults
- Shows the typing indicator
- Uses Swift concurrency to wait for the specified delay
- Removes the indicator after the delay has passed
The implementation is well-structured with proper error handling and edge case management.
2157-2159: Trigger typing indicator when message is readThis change activates the typing indicator when a message status changes to DELIVERED_AND_READ, which is a logical point to initiate the bot typing feedback to users.
225-227: Improved conditional statement formattingSimplified conditional checks by removing unnecessary parentheses and improving formatting. These changes make the code more readable without changing functionality.
Also applies to: 244-249, 839-842, 847-854
1618-1619: Better conditional checks with guard statementsImproved use of guard statements for better control flow and clearer error handling patterns.
Also applies to: 1642-1646
963-988: Improved email validation logicThe email validation logic has been refactored with better formatting and more maintainable structure, while maintaining the same validation functionality.
925-961: Enhanced field type handling in switch statementThe switch statement has been properly formatted with consistent spacing and alignment, making the code more readable while maintaining the same functionality.
Sources/Controllers/ALKConversationViewController.swift (9)
25-25: Code formatting improvement!This formatting change improves readability by simplifying the multi-line condition check.
119-119: Activity indicator style updated to modern API.The style has been changed from
.grayto.medium, which aligns with current iOS styling conventions.
250-251: Consistent function parameter formatting.The spacing in function declaration parameters has been improved for better readability.
485-485: Method signature formatting standardized.Function declarations now have consistent spacing after parameter types, improving code readability.
Also applies to: 1091-1091, 1120-1120, 1299-1299, 2378-2378, 2397-2397, 2419-2419
2454-2457: Improved table view safety checks.Added validation to prevent crashes by ensuring the section index is valid before attempting to scroll.
2468-2472: Enhanced error handling for view model/table view mismatches.Added proper error handling for cases where the table view has more sections than the view model, preventing potential crashes.
2477-2486: Improved table view update safety.Added guard statements and descriptive comments to prevent empty index set crashes, and implemented batch updates for smoother UI rendering.
2933-2956: Enhanced audio pause error handling.The code now properly validates section indices and message types before performing updates, which prevents potential crashes when handling audio playback states.
2934-2984: Enhanced audio stop error handling.Added comprehensive validation and error logging before attempting to update UI elements related to audio playback, preventing potential crashes from invalid indices or race conditions.
| /// Submit Button | ||
| ALKCustomEventHandler.shared.publish(triggeredEvent: KMCustomEvent.richMessageClick, data: ["action": selectedButton, "type": "submit"]) | ||
| ALKCustomEventHandler.shared.publish(triggeredEvent: KMCustomEvent.richMessageClick, data: ["action": selectedButton, "type": "submit"]) | ||
| let text = selectedButton["replyText"] as? String ?? selectedButton["name"] as! String |
There was a problem hiding this comment.
Replace force cast with safe unwrapping.
Force casts can lead to runtime crashes if the cast fails.
-let text = selectedButton["replyText"] as? String ?? selectedButton["name"] as! String
+let text = selectedButton["replyText"] as? String ?? (selectedButton["name"] as? String) ?? "Reply"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let text = selectedButton["replyText"] as? String ?? selectedButton["name"] as! String | |
| let text = selectedButton["replyText"] as? String ?? (selectedButton["name"] as? String) ?? "Reply" |
🧰 Tools
🪛 SwiftLint (0.57.0)
[Error] 1561-1561: Force casts should be avoided
(force_cast)
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ios_linter_build_check.yaml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/ios_linter_build_check.yaml
53-53: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build and Lint
🔇 Additional comments (9)
.github/workflows/ios_linter_build_check.yaml (9)
1-2: Workflow Name is Clear and DescriptiveThe workflow name clearly indicates its purpose. No changes needed here.
3-11: Trigger Configuration is CorrectThe workflow is set to trigger on pull requests targeting the master branch using relevant event types (opened, synchronize, and reopened). This meets the intended objectives.
12-15: Concurrency Settings Prevent Overlapping RunsThe concurrency group is correctly defined using the pull request number, and canceling in-progress runs helps prevent unnecessary overlapping builds.
16-21: Jobs Configuration is Appropriately SetThe job “build-and-lint” is well-configured with a clear name, proper runner (macos-latest), and a sensible timeout of 15 minutes. This should be sufficient for building and linting tasks.
22-25: Repository Checkout Step is StandardUsing
actions/checkout@v4is a standard approach to check out the repository. This step is implemented correctly.
26-30: Xcode Setup is Configured CorrectlyThe “Set up Xcode” step utilizes
maxim-lobanov/setup-xcode@v1with an explicitxcode-versionof 16.1.0. This ensures a consistent build environment.
31-34: Lint Check Step Reflects Project RequirementsRunning
pod lib lint --allow-warningsin the “Run Linter Check” step is in line with project practices. Consider reviewing whether allowing warnings is acceptable in the long term.
35-37: Debug Step Provides Helpful DiagnosticsThe optional debug step that echoes a confirmation message is helpful for troubleshooting environment variable issues.
38-50: Success Notification for Lint Check is InformativePosting a success comment to the pull request using
actions/github-script@v6.1.0effectively communicates passing lint checks. This enhances the feedback loop for developers.
| - name: Post Lint Failure Result to PR | ||
| if: github.event_name == 'pull_request' && failure() | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| script: | | ||
| const comment = `❌ **iOS Lint Test Result**\nOops! Linter Check Failed. Please fix the issues.`; | ||
| await github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: comment, | ||
| }); |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Update GitHub Script Version in Failure Notification
The “Post Lint Failure Result to PR” step uses actions/github-script@v6, which is outdated according to the static analysis hint. For consistency with the success notification step and to ensure compatibility with the latest runner improvements, update this to version v6.1.0.
Proposed Change:
- uses: actions/github-script@v6
+ uses: actions/github-script@v6.1.0I'll run a shell script to verify that the workflow file is still using the older version of the GitHub Script action. This will help confirm whether the update from actions/github-script@v6 to actions/github-script@v6.1.0 is indeed required.
🏁 Script executed:
#!/bin/bash
echo "Verifying 'actions/github-script' versions in .github/workflows/ios_linter_build_check.yaml..."
# Search for usage of the older version in the workflow file
grep -R "uses: actions/github-script@v6" .github/workflows/ios_linter_build_check.yaml
echo "Verifying if any instance already uses actions/github-script@v6.1.0..."
# Search to see if any line shows the updated version
grep -R "uses: actions/github-script@v6.1.0" .github/workflows/ios_linter_build_check.yamlLength of output: 662
Action Required: Update GitHub Script Version in the Failure Notification Step
The verification confirms that while one instance in the workflow has already been updated to use actions/github-script@v6.1.0, the "Post Lint Failure Result to PR" step is still using the outdated actions/github-script@v6. Please update this step to ensure consistency and benefit from the latest improvements.
- Location:
.github/workflows/ios_linter_build_check.yaml(around lines 51-62) - Required Change:
- uses: actions/github-script@v6 + uses: actions/github-script@v6.1.0
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Post Lint Failure Result to PR | |
| if: github.event_name == 'pull_request' && failure() | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const comment = `❌ **iOS Lint Test Result**\nOops! Linter Check Failed. Please fix the issues.`; | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: comment, | |
| }); | |
| - name: Post Lint Failure Result to PR | |
| if: github.event_name == 'pull_request' && failure() | |
| - uses: actions/github-script@v6 | |
| + uses: actions/github-script@v6.1.0 | |
| with: | |
| script: | | |
| const comment = `❌ **iOS Lint Test Result**\nOops! Linter Check Failed. Please fix the issues.`; | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: comment, | |
| }); |
🧰 Tools
🪛 actionlint (1.7.4)
53-53: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
|
✅ iOS Lint Test Result |
Summary
Summary by CodeRabbit