Skip to content

Release 1.4.2#353

Merged
KommunicateDeveloper merged 28 commits intomasterfrom
dev
Mar 18, 2025
Merged

Release 1.4.2#353
KommunicateDeveloper merged 28 commits intomasterfrom
dev

Conversation

@KommunicateDeveloper
Copy link
Contributor

@KommunicateDeveloper KommunicateDeveloper commented Mar 18, 2025

Summary

  • Internal Code Refactor.
  • Typing indicator For bot message delay.
  • Updated TableView Update function.
  • Updated depricated Code and resolved Warnings.

Summary by CodeRabbit

  • New Features
    • Enhanced chat interactions with an improved typing indicator for smoother conversations.
  • Style
    • Refined UI elements, including updated activity indicators for a more consistent look.
  • Chores
    • Upgraded the SDK to version 1.4.2 and updated dependencies for better performance and compatibility.
  • Refactor
    • Streamlined internal code to improve stability and maintainability without altering visible behavior.
  • Bug Fixes
    • Simplified logic for checking reply messages and improved handling of layout constraints in various cells.

KommunicateDeveloper and others added 27 commits February 7, 2025 15:19
[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
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2025

Walkthrough

This 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

File(s) Change Summary
.github/workflows/ios_linter_build_check.yaml Added new GitHub Actions workflow for iOS lint/build checks on pull requests with concurrency control and automated PR feedback.
CHANGELOG.md, KommunicateChatUI-iOS-SDK.podspec, Package.resolved, Package.swift Updated version to 1.4.2; bumped dependency (KommunicateCore-iOS-SDK from 1.2.5 to 1.2.6) and revised package state details; added changelog entries.
Sources/Controllers/* Numerous view controller files updated with formatting fixes, removal of unnecessary overrides (e.g. viewWillAppear, didReceiveMemoryWarning, loadView, awakeFromNib), activity indicator style changes (.gray → .medium), and minor conditional/logical improvements.
Sources/CustomEvent/* Minor formatting and parameter spacing adjustments in event callback methods; no functional changes.
Sources/Models/* Formatting and spacing improvements in property declarations and initializers; removal of custom initializer where default memberwise initializer suffices.
Sources/Utilities/, Sources/Extensions/ Widespread syntax and formatting adjustments for consistency including updated UIColor(hexString:) implementation, improvements to topViewController retrieval, secure coding enhancements in ALKAppSettings, and miscellaneous cleanups.
Sources/ViewModels/* Standardized method signatures and formatting improvements; addition of new method showTypingIndicatorTillBotNewMessage() in ALKConversationViewModel for managing the typing indicator.
Sources/Views/* Layout and constraint adjustments, renaming of enum cases for consistency, and removal of redundant methods; overall UI components have been refined without affecting behavior.

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
Loading

Suggested reviewers

  • prateek-kommunicate

Poem

Oh, hoppity, hoppity, in code so neat,
I’ve trimmed and tidied every line and beat.
The linter now sings while the builds run true,
Version bumps and refactors — a fresh debut!
With a twitch of my whiskers and a joyful cheer,
I celebrate changes that make our code clear! 🐇✨

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (20)
Sources/Utilities/Date+Extension.swift (1)

71-77: Standardize Function Signature Formatting

The formatting change in the formatedDate method 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 formattedDate to align with common naming conventions.

Sources/Utilities/TextViewSizeCalcultor.swift (3)

1-7: Possible Filename Inconsistency

The 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 Readability

The first height method’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 Formatting

Similarly, the height method that accepts an NSAttributedString has 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 in moveView

The 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 in moveViewRTL by Extracting Delta

A similar improvement can be applied to the RTL branch in the moveViewRTL method. 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 disabled flag from the selected option is now clearly defined.
  • The subsequent conditional branch checks whether disabled is nil versus 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 the encoding and 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 using static instead of class in final classes.

Since ALKInformationCell is declared as final, it's recommended to use static instead of class for 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 static over class in a final class

(static_over_final_class)


[Warning] 148-148: Prefer static over class in 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_length to 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) using configuration.enableDeleteConversationOnLongpress ensures 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 superview but 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-script action 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 faqClick case. 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 guard to if let improves 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 guard statements, 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 improved

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 375de30 and 40395bb.

⛔ Files ignored due to path filters (1)
  • Demo/Podfile.lock is 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 source property. This enhances uniformity across the codebase without altering functionality.

Sources/Models/KMDocumentConfiguration.swift (1)

25-25: Improved Formatting for Readability

The updated spacing in the array initialization for documentOptions now 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 declaration

The spacing has been corrected to follow Swift style guidelines by removing the space before the colon.


60-67: Updated enum references in constraints

The constraints now reference the renamed enums with proper capitalization, maintaining consistency with the enum declaration changes.


75-75: Improved enum naming convention

Renamed enums from nameLabel to NameLabel and checkBoxImage to CheckBoxImage to 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 declaration

The spacing has been corrected to follow Swift style guidelines by removing the space before the colon.


55-55: Simplified conditional statement

Removed unnecessary parentheses around the condition, maintaining the same logic while improving readability.


66-73: Updated enum references in constraints

The constraints now reference the renamed enums with proper capitalization, maintaining consistency with the enum declaration changes.


80-80: Improved enum naming convention

Renamed enums from nameLabel to NameLabel and checkBoxImage to CheckBoxImage to 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 FormViewModelTextItem

The 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 FormViewModelTextAreaItem

The 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 Item

The property declaration for title in 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 FormViewModelDropdownItem

The 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 in download()

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 Consistency

The refactoring in the conditional checks for both moveView and moveViewRTL methods 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 of cell variable for dropdown support
The property var 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 .text cell configuration has been reformatted (line 218) to directly extract the text from formDataSubmit.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 .text case. 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 retrieving formData and 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 from dropDownFields. The new tuple format [Int: (Int, String?)] is handled correctly here.


507-510: Updated Dropdown Option Selection Handling
Within the optionSelected method (lines 507–510), the assignment

formSubmittedData.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 the defaultOptionSelected method (lines 512–516), the updated assignment to dropDownFields now uses the new tuple syntax correctly. This ensures uniformity between both dropdown update methods.


537-545: Improved Readability in Text Field Validation
In the .text validation 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 .textarea validation 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 of dropDownFields in the FormDataSubmit class (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 of ALKConversationViewController has 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 the emailLabel.heightAnchor constraint for ALKEmailTopView enhances consistency with Swift’s formatting conventions.


110-111: Formatted Attributed String Attributes.
In the ALKEmailBottomView, the trailing comma has been removed from the attributes dictionary for emailLinkLabel. 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 for emailLinkLabel.heightAnchor has been removed, resulting in cleaner constraint code.

Sources/Models/KMFormTemplate.swift (3)

20-20: Standardized Spacing in Metadata Declaration.
The spacing in the declaration of metadata within the Element struct has been standardized (from metadata : to metadata:). This purely cosmetic adjustment improves code consistency.


31-33: Uniform Formatting for Option Properties.
The formatting adjustments for the properties in the Option struct (i.e. label, value, selected, and disabled) improve readability by ensuring consistent spacing.


38-38: Consistent Spacing in Action Metadata Declaration.
The spacing standardization for the metadata property in the Action struct 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 the articleId property 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.
The Package.resolved file now reflects the upgrade of KommunicateCore_iOS_SDK to version 1.2.6 with the new revision "891a2e23a214cc35e54097f8499f05a96fe40ef3". Please confirm that corresponding files (e.g., Podspec and Package.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 KMField struct for consistent code style.


196-198: Standardized nested struct property declaration.

Improved formatting in the nested Action struct 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 both UIImagePickerControllerDelegate and UINavigationControllerDelegate is 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 to 1.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 to KommunicateCore-iOS-SDK version 1.2.6 is 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
Changing public static var staticTopIcon: UIImage? = nil to public static var staticTopIcon: UIImage? leverages Swift’s default initialization of optionals to nil. 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:

  1. scanner.scanLocationscanner.currentIndex with proper index handling
  2. Changed from UInt32 to UInt64 for the color variable
  3. Updated to scanHexInt64 from scanHexInt32

These 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 is operator, 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 .alwaysTemplate rendering 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 statusBarOrientation property. This makes the code more robust and future-proof.

#!/bin/bash
# Check for any remaining references to statusBarOrientation in the project
rg "statusBarOrientation" --type swift
Sources/Views/ALKInformationCell.swift (6)

17-17: Improved enum naming convention.

Renamed enum value from view to View to 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 activityAlert to ActivityAlert to 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:

  1. Gets the first connected scene
  2. Finds the key window
  3. Gets the root view controller
  4. 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 defaultMessage from 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 == 10 for 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() to if 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.groupdId has 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.activate call 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 .limited authorization 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 UIWindowScene instead of directly accessing UIApplication for 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 requestImageData to requestImageDataAndOrientation, 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 : ContentMode to coverImageContentMode: 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 var to let for selectedGifsPath is 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 endChat method 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 the documentType and characterEncoding entries results in a more compact options dictionary without affecting functionality.

Sources/Views/ALKFriendFormCell.swift (2)

35-37: Clarify Padding Calculation Formatting.
The formatting for computing maxWidth—subtracting the avatar’s width and leading padding from UIScreen.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 the timeLabel in the array passed to addViewsForAutolayout improves code consistency and readability without impacting functionality.

Sources/Utilities/String+Extension.swift (1)

89-93: Improved NSRange Initialization.
Switching to NSRange(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 in styles.
Removing the trailing comma in the styles array 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 correctly

The UIActivityIndicatorView style has been updated from the deprecated .gray to .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 correctly

The UIActivityIndicatorView style has been updated from the deprecated .gray to .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 improvement

The CGRect initialization has been updated from the legacy CGRectMake function to the more modern CGRect(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 correctly

The UIActivityIndicatorView style has been updated from the deprecated .gray to .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 setting picker.showsSelectionIndicator = true is 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 to updateChannelMetaData has 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 the addViewsForAutolayout call 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 .gray to .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 both action["type"] and object["type"].

Sources/Controllers/ALKWebViewController.swift (1)

17-17: Updated Activity Indicator Style
The UIActivityIndicatorView’s style has been updated from .gray to .medium to 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 .medium style, 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 calls showAlertWithSingleAction with 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 the refreshConversation method, the call to isChatThreadIsOpen now 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 of findControllerInStack was reformatted so that the completion parameter 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 .gray to .medium aligns with modern iOS standards, as the .gray style 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 = nil initialization since Swift optional properties already have an implicit default value of nil. 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? String to is String which 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 styling

Changed the activity indicator style from .gray to .medium to 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 statement

Removed unnecessary parentheses around the condition check while preserving the same logic.


320-321: Improved variable declaration

Changed variable declaration from var to let since the cell is not being reassigned after initialization, making the code more semantically correct.


407-408: Code cleanup: Improved method call formatting

Adjusted the parameter alignment in the method call for better readability.


418-419: Code cleanup: Improved method call formatting

Adjusted the parameter alignment in the method call for better readability, maintaining consistency with similar call on line 407.


546-548: Code cleanup: Improved conditional formatting

Removed unnecessary parentheses while preserving the same logic.


611-612: Code cleanup: Simplified conditional structure

Removed unnecessary parentheses around the condition check for better readability.


623-624: Code cleanup: Simplified conditional structure

Removed 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 formatting

Removed unnecessary line break in the conditional statement while maintaining the same logic.


188-190: Improved error handling syntax

Updated the error catching syntax from catch (_) to the more concise catch _, which is the preferred Swift syntax when the error variable is not used.

Sources/Utilities/ALKActivityIndicator.swift (2)

24-24: Updated to modern UIActivityIndicatorView API

Updated the activity indicator style from the deprecated .whiteLarge to the modern UIActivityIndicatorView.Style.large, ensuring compatibility with newer iOS versions.


70-71: Code cleanup: Improved constraint formatting

Minor 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 setTargetRect and setMenuVisible with the more concise showMenu(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 keyWindow approach 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:

  1. Gets the first connected window scene
  2. Finds the key window within that scene
  3. 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 .gray to .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 is operator 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 is operator for better readability.


477-477: Simplified type checking.

The conditional expression has been improved using the is operator to check if the visible controller is of the specified type.


413-413:

Details

❓ Verification inconclusive

Changed method access level from open to public.

This is another instance of reducing method accessibility from open to public.

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 swift

Length of output: 71


Action: Verify and Document Impact of Access Modifier Change

The method’s access level was changed from open to public, 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 rowUpdatedAt in the codebase.

397-397:

Details

❓ Verification inconclusive

Changed method access level from open to public.

This change reduces the accessibility of the method from open (can be overridden outside the module) to public (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 swift

Length of output: 687


Review Update: Verify Impact of Access Level Change on External Overrides

The method startedLoading() in ALKConversationListViewController has been changed from open to public, 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 overrides startedLoading().)

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 open to public.

Similar to the previous method, this change reduces the method's accessibility from open to public.

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 swift

Length of output: 70


Attention: Verify External Override Dependencies for listUpdated()

The method listUpdated() in Sources/Controllers/ALKConversationListViewController.swift has been changed from an open to a public access 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 override listUpdated(). 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 else statement, 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 superView and directly checking if gestureView.superview exists.


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 handling

Adding 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 syntax

The updated initialization of KMCustomCaptionViewController with direct parameters is cleaner than using separate initializer statements.


249-249:

Details

✅ Verification successful

Updated PHImageManager method calls

Updating to requestImageDataAndOrientation from requestImageData is 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 PHImageManager methods requestImageDataAndOrientation(for:options:resultHandler:) and requestImageData(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

  1. Orientation Handling: The orientation parameter helps display images correctly without manual EXIF rotation adjustments [9].
  2. Modern iOS Development: For apps targeting iOS 13+ where image orientation is critical (e.g., photo editing apps).
  3. Unified Image Handling: Simplifies workflows by combining data and orientation in one call.

When to Use Original requestImageData

  1. Backwards Compatibility: For apps supporting iOS <13.
  2. Simple Data Retrieval: When only raw image bytes are needed without orientation metadata.
  3. .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 isNetworkAccessAllowed option [4][6]
  • Use same caching infrastructure through PHCachingImageManager [11]

Developers should choose based on orientation requirements and deployment targets. For modern iOS apps, requestImageDataAndOrientation provides better future-proofing at the cost of slightly higher minimum OS requirements [9][10].

Citations:


Updated PHImageManager API Usage

Switching to requestImageDataAndOrientation is 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 improvement

Removing the space between parameter name and colon follows Swift style guidelines.


194-195: Improved conditional formatting

Removing unnecessary parentheses around isAutoSuggestion and fixing guard statement formatting improves code readability and follows Swift style guidelines.


223-224: Dictionary declaration cleanup

Removing the trailing comma in the dictionary declaration is a good cleanup.

Sources/CustomEvent/ALKCustomEventCallback.swift (1)

19-20: Consistent parameter formatting

Adding 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 declaration

Removing the unnecessary trailing comma in layout constraints is a good cleanup.


246-247: Improved method signature formatting

Consolidating the function declaration to remove unnecessary line break improves readability.


264-264: Enhanced type checking for reply message

Changing from metadata[AL_MESSAGE_REPLY_KEY] as? String != nil to metadata[AL_MESSAGE_REPLY_KEY] is String is 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-warnings command 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 let instead of guard, maintaining consistency with the new pattern throughout the method.


44-49: More flexible handling of rating submission data.

The code now uses nested if let statements, which provides more flexibility in handling optional values compared to the previous guard approach. 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 let instead of guard is 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 forEach loop, 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.medium

This change replaces the deprecated .gray style with the newer .medium style, 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 formatting

The 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 formatting

Better spacing around the optional binding makes the code more readable and consistent with Swift style guidelines.


127-128: Consistent optional binding formatting

Proper spacing around the optional binding operator improves readability and follows Swift style conventions.


151-153: Consistent formatting in conditional statements

Proper 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 method

The deprecated unarchiveTopLevelObjectWithData has been replaced with the newer, type-safe unarchivedObject(ofClass:from:) method, which follows modern Swift practices and improves security.


206-208: Security improvement with NSSecureCoding

Updating from NSCoding to NSSecureCoding and adding the required supportsSecureCoding property enhances security by enforcing type safety during decoding, helping prevent substitution attacks.


221-221: Added support for bot typing indicator

New property botTypingIndicatorInterval has 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 property

The decoder properly handles the new botTypingIndicatorInterval property, ensuring it's correctly deserialized from saved settings.


273-273: Updated encoder to persist new property

The encoder now properly persists the botTypingIndicatorInterval property, ensuring it's saved in user defaults.

Sources/ViewModels/ALKConversationViewModel.swift (6)

780-802: Added typing indicator for bot messages

This new method implements the bot typing indicator feature mentioned in the PR objectives. It:

  1. Verifies the conversation is with a bot
  2. Gets the configured delay time from user defaults
  3. Shows the typing indicator
  4. Uses Swift concurrency to wait for the specified delay
  5. 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 read

This 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 formatting

Simplified 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 statements

Improved use of guard statements for better control flow and clearer error handling patterns.

Also applies to: 1642-1646


963-988: Improved email validation logic

The 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 statement

The 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 .gray to .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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Suggested change
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)

Copy link

@prateek-kommunicate prateek-kommunicate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40395bb and 732b380.

📒 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 Descriptive

The workflow name clearly indicates its purpose. No changes needed here.


3-11: Trigger Configuration is Correct

The 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 Runs

The 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 Set

The 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 Standard

Using actions/checkout@v4 is a standard approach to check out the repository. This step is implemented correctly.


26-30: Xcode Setup is Configured Correctly

The “Set up Xcode” step utilizes maxim-lobanov/setup-xcode@v1 with an explicit xcode-version of 16.1.0. This ensures a consistent build environment.


31-34: Lint Check Step Reflects Project Requirements

Running pod lib lint --allow-warnings in 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 Diagnostics

The optional debug step that echoes a confirmation message is helpful for troubleshooting environment variable issues.


38-50: Success Notification for Lint Check is Informative

Posting a success comment to the pull request using actions/github-script@v6.1.0 effectively communicates passing lint checks. This enhances the feedback loop for developers.

Comment on lines +51 to +62
- 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,
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.0

I'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.yaml

Length 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.

Suggested change
- 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)

@github-actions
Copy link

iOS Lint Test Result
Congratulations! Linter Check Passed Successfully 🎉

@KommunicateDeveloper KommunicateDeveloper merged commit f167a1c into master Mar 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants