Skip to content

Document iOS multiple attachments (SDK + UI Kit)#428

Open
adityakotasthane07 wants to merge 6 commits into
mainfrom
feature/ios-multimedia-attachments
Open

Document iOS multiple attachments (SDK + UI Kit)#428
adityakotasthane07 wants to merge 6 commits into
mainfrom
feature/ios-multimedia-attachments

Conversation

@adityakotasthane07

Copy link
Copy Markdown
Contributor

SDK:

  • send-message: rewrite the multiple-attachments section around the upload-first flow (uploadFiles, MediaCallbackListener, cancelFile), document upload limits (file.count.max / file.size.max), the error codes table, the files-must-stay-nil warning, and keep the direct send form as a legacy sub-section

UI Kit:

  • message-composer / compact-message-composer: new Multiple Attachments section (multi-select picking, attachment tray, upload-before-send, per-type message split, clipboard paste, voice-note exception, edit-mode behavior), server-driven limits and validation table, CometChatErrorStateStyle theming, enableMultipleAttachments prop
  • message-list: per-type bubbles, batch grouping behavior and the set(enableMultipleAttachments:) toggle
  • message-bubble-styling: new Media Grid Bubble, Audio Files Bubble and Files Bubble sections with GalleryBubbleStyle properties
  • core-features: Media Sharing rewritten to lead with the multi-attachment flow

Description

Related Issue(s)

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Screenshots (if applicable)

SDK:
- send-message: rewrite the multiple-attachments section around the
  upload-first flow (uploadFiles, MediaCallbackListener, cancelFile),
  document upload limits (file.count.max / file.size.max), the error
  codes table, the files-must-stay-nil warning, and keep the direct
  send form as a legacy sub-section

UI Kit:
- message-composer / compact-message-composer: new Multiple Attachments
  section (multi-select picking, attachment tray, upload-before-send,
  per-type message split, clipboard paste, voice-note exception,
  edit-mode behavior), server-driven limits and validation table,
  CometChatErrorStateStyle theming, enableMultipleAttachments prop
- message-list: per-type bubbles, batch grouping behavior and the
  set(enableMultipleAttachments:) toggle
- message-bubble-styling: new Media Grid Bubble, Audio Files Bubble and
  Files Bubble sections with GalleryBubbleStyle properties
- core-features: Media Sharing rewritten to lead with the
  multi-attachment flow
@mintlify

mintlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Jul 13, 2026, 3:12 PM

@jitvarpatil

Copy link
Copy Markdown
Contributor

Docs review — ✅ Approve

iOS multi-attachment docs — SDK upload-first flow + UIKit composer/bubble updates (6 files, +309/-27). No file deletions/nav change → no redirect risk. I verified the entire SDK API against the exact matching feature branch (ENG-36750/iossdk-multi-attachment-presigned-upload-support) — every symbol, signature, and default matches. Structurally clean.

✅ SDK API — verified against ENG-36750

  • CometChat.uploadFiles(files:listener:) — real public API (CometChat+FileUpload.swift).
  • MediaCallbackListener — upload listener with exactly the 4 documented methods: onSuccess(fileId:attachment:), onProgress(fileId:bytesUploaded:totalBytes:), onError(fileId:error:), onFailure(fileId:error:).
  • MediaMessage.attachments: [Attachment]? — settable property (MediaMessage.swift:66), matching mediaMessage.attachments = uploadedAttachments.
  • getMaxFileCount()file.count.max, "Defaults to 10" (matches exactly); getMaxFileSize()file.size.max (100 MB).
  • sendMediaMessage, Attachment confirmed. The "leave files nil; an empty files array fails with invalid-message error" note is consistent with the file-count logic.

✅ Structure & UIKit

  • 0 nav breaks, 0 orphans, 0 broken links in the changed files; all internal links resolve. (The 2 sdk/ios links the analyzer flagged — default-calling/login-listeners — are pre-existing in unchanged files, not send-message.mdx.)
  • UIKit docs use the existing CometChatMessageComposer + attachmentOptions. No placeholders/TODOs.

Note

The SDK feature is on ENG-36750 (freshest branch) — i.e. this documents an in-progress feature. Please confirm the SDK version with uploadFiles/MediaMessage.attachments/getMaxFileCount ships with the release these docs target.

Well-sourced, accurate PR. Ready to merge.

🤖 Automated docs review (Mintlify link/redirect/content checks + API verification against CometChatSDK iOS multi-attachment branch).

jitvarpatil
jitvarpatil previously approved these changes Jul 14, 2026

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Docs review — ✅ Approve

iOS multi-attachment docs — SDK upload-first flow + UIKit composer/bubble updates (6 files, +309/-27). No file deletions/nav change → no redirect risk. I verified the entire SDK API against the exact matching feature branch (ENG-36750/iossdk-multi-attachment-presigned-upload-support) — every symbol, signature, and default matches. Structurally clean.

✅ SDK API — verified against ENG-36750

  • CometChat.uploadFiles(files:listener:) — real public API (CometChat+FileUpload.swift).
  • MediaCallbackListener — upload listener with exactly the 4 documented methods: onSuccess(fileId:attachment:), onProgress(fileId:bytesUploaded:totalBytes:), onError(fileId:error:), onFailure(fileId:error:).
  • MediaMessage.attachments: [Attachment]? — settable property (MediaMessage.swift:66), matching mediaMessage.attachments = uploadedAttachments.
  • getMaxFileCount()file.count.max, "Defaults to 10" (matches exactly); getMaxFileSize()file.size.max (100 MB).
  • sendMediaMessage, Attachment confirmed. The "leave files nil; an empty files array fails with invalid-message error" note is consistent with the file-count logic.

✅ Structure & UIKit

  • 0 nav breaks, 0 orphans, 0 broken links in the changed files; all internal links resolve. (The 2 sdk/ios links the analyzer flagged — default-calling/login-listeners — are pre-existing in unchanged files, not send-message.mdx.)
  • UIKit docs use the existing CometChatMessageComposer + attachmentOptions. No placeholders/TODOs.

Note

The SDK feature is on ENG-36750 (freshest branch) — i.e. this documents an in-progress feature. Please confirm the SDK version with uploadFiles/MediaMessage.attachments/getMaxFileCount ships with the release these docs target.

Well-sourced, accurate PR. Ready to merge.

🤖 Automated docs review (Mintlify link/redirect/content checks + API verification against CometChatSDK iOS multi-attachment branch).

Mirror the Android multimedia-attachments docs (PR #430) for iOS:

- sdk/ios/upload-files: new dedicated page for the UploadFileRequest
  upload-then-send flow — create request, uploadAttachments with
  caller-supplied fileIds, UploadFileListener (onFileProgress/
  onFileUploaded/onFileError/onFileFailure/onComplete), UploadResult,
  configuration setters, per-call + global listeners, batch getters,
  remove/retry/clear, limits, reliability behavior, and the error table
- sdk/ios/send-message: slim the Multiple Attachments section to the
  upload-first tip plus the two direct-send forms (files array and
  pre-hosted Attachment objects)
- docs.json: register sdk/ios/upload-files after send-message
- ui-kit/ios/core-features: add the multi-attachment overview screenshot
  to the Media Sharing section
bubbleWidth defaults to a screen-relative width (~0.62 ratio, clamped
210–300), not a fixed 240 — verified against GalleryBubbleStyle.swift.
Add media grid, audio files, and files bubble preview images to the
iOS Message Bubble Styling and Message List multi-attachment sections.
@jitvarpatil

Copy link
Copy Markdown
Contributor

Re-review — 🟠 One thing to fix (image paths)

My earlier approval was auto-dismissed by the new commits, so re-reviewing on head c7c6026 (PR grew 6 → 13 files).

✅ API is correct — and it tracked an SDK refactor

The iOS SDK changed since my first review: uploadFiles(files:listener:) + MediaCallbackListener are gone, replaced by a request-based API — and these docs correctly follow it. Verified against ENG-36750/iossdk-multi-attachment-presigned-upload-support:

  • createUploadFileRequest(receiverId:…)CometChat+FileUpload.swift:25
  • getMaxFileCount() -> Int (:35) and getMaxFileSize() -> Int (:50)
  • UploadFileRequest.swift + UploadFileListener.swift (replacing the old MediaCallbackListener)

Platform-appropriate too: iOS keeps getMaxFileCount/getMaxFileSize, unlike Android's getMaxAttachmentCount and RN's async variant — nothing was blindly copied across platforms. 👍

Structure: sdk/ios/upload-files wired into nav; 0 nav breaks, 0 orphans, 0 broken links.

🟠 Please fix: the 4 bubble images are outside /images/ (likely to 404)

The new screenshots live at ui-kit/ios/multimediaAttachments/ and are referenced as /ui-kit/ios/multimediaAttachments/*.pngmessage-bubble-styling.mdx:230, 234, 272, 290.

This has no precedent in the repo:

The files exist and the paths match, so this only renders if Mintlify serves static assets out of content directories — which nothing in this repo demonstrates. Safest fix: move the 4 PNGs to images/ (e.g. images/ios_audiobubble.png) and update the 4 src attributes. Cheap change, and it removes the risk of four broken screenshots in production.

🟡 Shared-image overwrite (third PR touching this asset)

images/multi_attachments_mobile.png pre-exists in main and this PR overwrites it (it's also referenced here by iOS core-features.mdx). #430 overwrites it as well, and main's RN core-features.mdx already uses it — so three PRs now share one asset. Worth deciding whether it's genuinely a cross-platform image or should be split per platform.

Everything else verifies — happy to approve once the images move under images/.

🤖 Automated docs review — re-check after new commits. API verified against CometChatSDK iOS multi-attachment branch.

Addresses the PR #428 review: the 4 bubble screenshots lived at
ui-kit/ios/multimediaAttachments/ and were referenced as
/ui-kit/ios/multimediaAttachments/*.png, which breaks the repo convention
(all 2,900+ images live under images/, referenced as /images/...) and would
likely 404 in production. Moved them to images/ with an ios_ prefix (avoids
colliding with the Android PR's images/audiobubble.png) and updated all 5
references in message-bubble-styling.mdx and message-list.mdx.
…rm one

Addresses the PR #428 review note: iOS core-features referenced the shared
images/multi_attachments_mobile.png (also used by RN in main and by the
Android PR). Give iOS its own images/ios_multi_attachments_mobile.png so this
PR no longer touches or depends on the shared asset.
@jitvarpatil

Copy link
Copy Markdown
Contributor

Re-review — ✅ Approve

Both items from my previous review are fixed. Re-verified on head de6689b.

✅ P1 (image paths) — fixed

  • The non-standard ui-kit/ios/multimediaAttachments/ directory is gone; the 4 bubble images now live under images/ with iOS-specific names (images/ios_audiobubble.png, etc.).
  • All image references in the changed iOS pages resolve, all under /images/. No lingering /ui-kit/ios/multimediaAttachments/ references anywhere.

✅ P2 (shared-image overwrite) — fixed

  • iOS pages now use an iOS-specific overview image (images/ios_multi_attachments_mobile.png) — core-features.mdx:73.
  • The shared images/multi_attachments_mobile.png is now byte-identical to main (net-zero — the earlier overwrite was reverted), so the RN page that shares it is no longer affected.

Everything else was already verified: the iOS SDK API (createUploadFileRequest, getMaxFileCount/getMaxFileSize, UploadFileRequest + UploadFileListener, MediaMessage.attachments) matches the ENG-36750 branch — the docs correctly tracked the SDK's refactor away from the old uploadFiles/MediaCallbackListener shape. Structure clean: nav wired, 0 broken links, 0 orphans.

Ready to merge. 🚀

🤖 Automated docs review — re-check after fixes.

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review — ✅ Approve

Both items from my previous review are fixed. Re-verified on head de6689b.

✅ P1 (image paths) — fixed

  • The non-standard ui-kit/ios/multimediaAttachments/ directory is gone; the 4 bubble images now live under images/ with iOS-specific names (images/ios_audiobubble.png, etc.).
  • All image references in the changed iOS pages resolve, all under /images/. No lingering /ui-kit/ios/multimediaAttachments/ references anywhere.

✅ P2 (shared-image overwrite) — fixed

  • iOS pages now use an iOS-specific overview image (images/ios_multi_attachments_mobile.png) — core-features.mdx:73.
  • The shared images/multi_attachments_mobile.png is now byte-identical to main (net-zero — the earlier overwrite was reverted), so the RN page that shares it is no longer affected.

Everything else was already verified: the iOS SDK API (createUploadFileRequest, getMaxFileCount/getMaxFileSize, UploadFileRequest + UploadFileListener, MediaMessage.attachments) matches the ENG-36750 branch — the docs correctly tracked the SDK's refactor away from the old uploadFiles/MediaCallbackListener shape. Structure clean: nav wired, 0 broken links, 0 orphans.

Ready to merge. 🚀

🤖 Automated docs review — re-check after fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants