Repository navigation
chore: [SDK-5525] add log view to iOS demo app - #1781
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Multi-model review
Demo-only Log View for the shared Appium suite. Reviewers: Claude Opus 5.5, GPT 5.6 Sol, Grok 4.7.
Act on
LogService.logalways appends viaDispatchQueue.main.async, even when already on main.clear()mutates immediately. A same-turn or already-queuedlog()can reappear after Clear (2/3).
Consider
- Collapse is a 0-height
.clipped()ScrollView. Rows are created, but XCUITest/WDA often drop zero-rect children — spec item 4 may not hold while collapsed (2/3). Specs 02/13 never taplog_toggle_button. log_entry_{index}is positional. After the 100-entry cap every id shifts; only a few 8pt lines fit in the 100pt viewport, so older entries can also fall out of a clipped snapshot (2/3; same class of issue as the Android demo).LogViewadds a secondScrollViewabovemain_scroll_view. A helper that grabs the first scroll view by type (not id) will hit the log panel (1/3).LogServiceusesObservableObject/@Publishedwith onlyimport Foundation. Sibling demo types import Combine — confirm this still typechecks (1/3).
Noted
project.pbxprojrewrites unrelatedTEMP_*Build.xcconfig ids (2/3).- Local
examples/demo/build.mddoes not mentionLogService/LogView(1/3). - Accessibility labels include
HH:mm:ss, so exact-match on the message text will fail (1/3).
Dismissed
DateFormatterthread-safety (string(from:)is documented thread-safe on iOS 7+).- One-argument
onChangevs deployment target 16. - Observer strings /
→/…/ IAMmessageId— checked againstsdk-shared/demo/build.md.
Sent by Cursor Automation: PR Reviews
nan-li
reviewed
Oct 21, 2026
nan-li
left a comment
Contributor
There was a problem hiding this comment.
Ok to approve with just one question on testing. The test section says specs 02 and 13. Did you also run spec 01?
Append inline when already on main so a queued append can't land after clear(). Also restore main's XcodeGen TEMP ids in the pbxproj. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Those are the only 2 that matter. But I did rerun the whole thing and everything passed |
nan-li
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
One Line Summary
Add the shared Log View to the iOS demo app so the Appium suite can assert SDK listener events.

Details
Motivation
sdk-shared/demo/build.md(Prompt 1.5, 2.0, 6.2) adds a logcat-style Log View that the shared Appium suite reads. Without it, iOS skips the notification click and foreground display log assertions. Matches the Capacitor and Android demos.Scope
LogService: same API as Capacitor'sLogService.ts.infowrites to the console only,showwrites to the console and the Log View,errorwrites to stderr and the Log View. Entries are in memory only (max 100) and appended on main, so it's safe from SDK listener threads. Existing[OneSignal]prints now go throughinfo.LogView: pinned under the nav bar abovemain_scroll_view, styled perstyles.md. Useslog_view,log_entry_{index},log_clear_button,log_toggle_button.VStackand collapse shrinks the body to 0 height, so every entry stays in the accessibility tree (spec item 4). Android removes the body instead because of a UiAutomator limitation.build.md.Testing
Manual testing
iPhone 17 simulator, iOS 26.5:
run-local --sdk=ios --platform=ios --spec=02: 3 passingrun-local --sdk=ios --platform=ios --spec=13: 2 passing. Results showlog_viewfound andlog_entry_*queried, so the log assertions ran rather than skipped.styles.md.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code