docs(snapshots): Add iOS setup guide (EME-1030)#17474
docs(snapshots): Add iOS setup guide (EME-1030)#17474mtopo27 merged 6 commits intomtopo27/snapshots-ea-product-docsfrom
Conversation
Add an iOS snapshots setup page covering image generation with SnapshotPreviews and swift-snapshot-testing, local testing with sentry-cli, CI integration, and best practices. Refs EME-1030
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| For end-to-end iOS examples, see the workflows in our [Hacker News sample app](https://github.com/EmergeTools/hackernews): | ||
|
|
||
| - [SnapshotPreviews workflow](https://github.com/EmergeTools/hackernews/blob/main/.github/workflows/ios_sentry_upload_snapshots.yml) — builds once, fans out across multiple simulators in a matrix, then aggregates all images into a single upload. | ||
| - [swift-snapshot-testing workflow](https://github.com/EmergeTools/hackernews/blob/main/.github/workflows/ios_sentry_upload_swift_snapshots.yml) — records all snapshots in one job and uploads them via the [Sentry Fastlane plugin](https://github.com/getsentry/sentry-fastlane-plugin). |
There was a problem hiding this comment.
thoughts on doing something like:
### Using Fastlane
Fastlane is an alternative option to uploading via the sentry-cli.
...
then just include this content: https://github.com/getsentry/sentry-docs/pull/17375/changes#diff-da4ea75e3c8ea153daadec9c35c38b06c898a38023a312461b0ec7aeec2ff830R34
Co-authored-by: Max Topolsky <30879163+mtopo27@users.noreply.github.com>
Co-authored-by: Max Topolsky <30879163+mtopo27@users.noreply.github.com>
Document two CI upload paths for iOS snapshots: calling sentry-cli directly or using the Sentry Fastlane plugin, including install steps, a Fastfile lane, and a GitHub Actions example. Also tighten the intro copy and fix code block indentation in the existing tool section. Refs EME-1030
philprime
left a comment
There was a problem hiding this comment.
LGTM with one feedback point
|
|
||
| <Include name="feature-available-for-user-group-early-adopter" /> | ||
|
|
||
| Set up [Snapshots](/product/snapshots/) for your iOS app. Generate snapshots locally or in your own CI using your preferred snapshot library, then upload the generated images to Sentry for image diffing, visual review, and GitHub status checks. |
There was a problem hiding this comment.
l: IIUC this features could also be used for any non-iOS app as it just takes screenshots as input. I believe the wording could be adapted to correctly reflect this to users.
6a686e6
into
mtopo27/snapshots-ea-product-docs
| - name: Upload snapshots to Sentry | ||
| env: | ||
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
| run: bundle exec fastlane upload_snapshots --path $TEST_RUNNER_SNAPSHOTS_EXPORT_DIR |
There was a problem hiding this comment.
Bug: The Fastlane command in the documentation uses --path instead of the correct path: syntax, causing the upload_snapshots lane to fail.
Severity: HIGH
Suggested Fix
Update the example command to use the correct Fastlane parameter syntax. Change run: bundle exec fastlane upload_snapshots --path $TEST_RUNNER_SNAPSHOTS_EXPORT_DIR to run: bundle exec fastlane upload_snapshots path:$TEST_RUNNER_SNAPSHOTS_EXPORT_DIR.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/platforms/apple/common/snapshots/index.mdx#L143
Potential issue: The documentation at
`docs/platforms/apple/common/snapshots/index.mdx:143` provides an incorrect Fastlane
command: `bundle exec fastlane upload_snapshots --path
$TEST_RUNNER_SNAPSHOTS_EXPORT_DIR`. The `upload_snapshots` lane is defined to accept
parameters via an `options` hash, expecting `options[:path]`. However, Fastlane's syntax
for passing lane parameters is `key:value`, not `--key value`. As a result, the `--path`
argument is ignored, `options[:path]` becomes `nil`, and the `sentry_upload_snapshots`
action fails. This breaks the CI integration for any user following the documentation.
Did we get this right? 👍 / 👎 to inform future reviews.
DESCRIBE YOUR PR
Add iOS setup documentation for the Snapshots EA product. Covers image generation with SnapshotPreviews (recommended) and swift-snapshot-testing, local testing with sentry-cli, and CI integration with links to end-to-end examples in the Hacker News sample app.
Mirrors the structure and terminology of the Android setup guide (#17425, #17473):
Linked to EME-1030.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: