posthog-ios
posthog-ios copied to clipboard
chore: manually mask swiftui views
:bulb: Motivation and Context
Alternative solution for https://github.com/PostHog/posthog-ios/issues/162 You inject a synthetic view into the marked view and get the X and Y positions based on that component. You don't have access to the original view but you know where it should be masked.
:green_heart: How did you test it?
:pencil: Checklist
- [x] I reviewed the submitted code.
- [ ] I added tests to verify the changes.
- [x] I updated the docs if needed.
- [x] No breaking change or entry added to the changelog.
@ioannisj you can pick this up if you wish, the PoC works, just need to polish and finish it
- Updated relevant documentation under this PR
- Replaced
PostHogScreenshotMaskerwith an associated UIView propertyphIsManuallyMaskedwhich is then grabbed duringfindMaskableWidgetscall
@ioannisj I cannot approve my own PR so feel free to get it approved/merged after fixing the conflicts.