Skip to content

feat(ios): inspect Protocol Buffers payloads - #293

Merged
easyhooon merged 3 commits into
mainfrom
feat/ios-protobuf
Nov 12, 2026
Merged

easyhooon merged 3 commits into
mainfrom
feat/ios-protobuf

Conversation

@easyhooon

@easyhooon easyhooon commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Lets iOS apps record Protocol Buffers payloads and see them decoded in the desktop app, as Android does. Closes #285.

Changes

  • DariProtobufDecoder registers an app-owned closure per handler, direction and part (webToApp / appToWeb, request: / response:). Dari has no SwiftProtobuf dependency; closures are @Sendable (Data) throws -> String?, and a duplicate registration fails fast like Android's require.
  • Dari.shared.interceptor(tag:protobufDecoder:) and four …Protobuf… methods taking Data, mirroring ProtobufDariInterceptor.
  • Port of ProtobufPayloadRenderer: same status strings, 4 KB raw preview, truncation. Summary sizes report the protobuf byte count like MessageEntry.requestSizeBytes.
  • WireMessageDetail gains the optional requestPayloadMetadata / responsePayloadMetadata the Kotlin protocol already has; nil fields are omitted, matching explicitNulls = false. New result_detail_protobuf fixture generated by IosWireFixturesTest.
  • Masking drops raw previews, as on Android.
  • DariLoopbackDemo records a protobuf call; IosLoopbackEndToEndTest checks decoded text, metadata and that masking hides the raw preview.
  • sample-ios adds a protobufGreeting (protobuf) button (hand-decoded StringValue, no new dependency). Docs: iOS section in protobuf.mdx (+ ko), notes in ios/capture.mdx and ios/index.mdx, README tables.

Notes for reviewers

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@easyhooon
easyhooon changed the base branch from main to feat/ios-payload-redactor November 12, 2026 06:26
@easyhooon
easyhooon changed the base branch from feat/ios-payload-redactor to main November 12, 2026 06:34
Manual interceptor calls only; autoCapture and @DariBridge still record strings.

Closes #285
Complete the record the App→Web decoder was chosen for, make the decoder Sendable, fix the doc example.
@easyhooon
easyhooon marked this pull request as ready for review November 12, 2026 06:41
@easyhooon
easyhooon merged commit 8aa89e2 into main Nov 12, 2026
10 checks passed
@easyhooon
easyhooon deleted the feat/ios-protobuf branch November 12, 2026 06:41
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.

feat(ios): inspect Protocol Buffers payloads

1 participant