Skip to content

Add SwiftUI toast posting support#50

Open
Szuyun-3SC wants to merge 8 commits into
release/v4.2.1from
feature/ARCBLOOD-4146-toast
Open

Add SwiftUI toast posting support#50
Szuyun-3SC wants to merge 8 commits into
release/v4.2.1from
feature/ARCBLOOD-4146-toast

Conversation

@Szuyun-3SC

Copy link
Copy Markdown

What?

  • Add SwiftUI posting support: HostingMessageView wraps SwiftUI content so it can be posted on a Poster, with a trailing @ViewBuilder post API and a PostRequest init for SwiftUI content
  • Default the SwiftUI post dismissAfter to .defaultMessageDismiss (5s) so toasts auto-dismiss like the other message APIs
  • Add a custom no-internet view hook (customViewProvider) to ConnectivityManager.MessageManager
  • Restructure Sources into a two-target SPM layout

Why?

ARCBLOOD-4146
Toasts on iOS need to be built with SwiftUI views; this adds first-class SwiftUI posting to MessageStackView so the app can post toast content directly.

Screenshots / Recording?

Recording to be added by author.

Szuyun Liang and others added 8 commits June 4, 2026 18:39
Allow consumers to post SwiftUI views through the existing PostManager
machinery (HostingMessageView + Poster.post(_:)) and to replace the
default no-internet MessageView via customViewProvider, so apps can
restyle connectivity toasts without forking the framework (ARCBLOOD-4146).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The previous restructure commit moved Reachability.m,
SwizzledMethod.m and UIViewController+Lifecycle.m into
Sources/MessageStackViewObjC/ and the Swift sources into
Sources/MessageStackView/, but the manifest still declared a
single MessageStackView target with path "Sources" containing
both. Xcode rejected the package with `target at '.../Sources'
contains mixed language source files; feature not supported`.
This commit declares the two targets at their actual paths
and processes the asset catalogues.
AI-assistant: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AI-assistant: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Temporary diagnostic logs to verify reachability events fire and the
custom view path is hit (ARCBLOOD-4146). Revert before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Szuyun-3SC Szuyun-3SC requested a review from a team as a code owner June 12, 2026 13:25
@Szuyun-3SC Szuyun-3SC requested review from 3scsamdavis, JonValijonov, juwoncube and neil3sidedcube and removed request for a team June 12, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants