Skip to content

Commit

Permalink
Update README.md (#197)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md
  • Loading branch information
noahsmartin authored Sep 16, 2024
1 parent 428258d commit 8c9794a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ An all-in-one snapshot testing solution built on Xcode previews. Automatic brows
- 📸 Snapshot Xcode previews automatically in a XCTest without writing any test code.
- ♿ Run accessibility audits on all your previews in a XCUITest, still without writing any test code.

# Installation

Add the package dependency to your Xcode project using the URL of this repository (https://github.com/EmergeTools/SnapshotPreviews-iOS).

<p align="center">
<img src="https://raw.githubusercontent.com/EmergeTools/SnapshotPreviews-iOS/master/images/image2.png" />
</p>

Link your app to `PreviewGallery` and (optionally) to `SnapshotPreferences` to customize the behavior of snapshot generation.
Link your XCTest target to `SnapshottingTests`.

# Features

## Preview Gallery
Expand Down Expand Up @@ -110,7 +99,18 @@ See the demo app for a full example.
Previews are discovered in the binary by parsing the `__swift5_proto` Mach-O section to see what types conform to `PreviewProvider` (and similar protocols generated by the #Preview macro). Details of how this works in the Swift runtime can be found in our [blog post](https://www.emergetools.com/blog/posts/SwiftProtocolConformance).
</details>

## Tips
# Installation

Add the package dependency to your Xcode project using the URL of this repository (https://github.com/EmergeTools/SnapshotPreviews-iOS).

<p align="center">
<img src="https://raw.githubusercontent.com/EmergeTools/SnapshotPreviews-iOS/master/images/image2.png" />
</p>

Link your app to `PreviewGallery` and (optionally) to `SnapshotPreferences` to customize the behavior of snapshot generation.
Link your XCTest target to `SnapshottingTests`.

# Tips

### Unique names

Expand Down Expand Up @@ -170,11 +170,11 @@ struct MyView_Previews: PreviewProvider {
}
```

## Star History
# Star History

[![Star History Chart](https://api.star-history.com/svg?repos=EmergeTools/SnapshotPreviews-iOS&type=Date)](https://star-history.com/#EmergeTools/SnapshotPreviews-iOS&Date)

## Related Reading
# Related Reading
- [How to use VariadicView, SwiftUI's Private View API](https://www.emergetools.com/blog/posts/how-to-use-variadic-view): VariadicView is a core part of how multiple images are rendered for one PreviewProvider.
- [The Surprising Cost of Protocol Conformances in Swift](https://www.emergetools.com/blog/posts/SwiftProtocolConformance): Details of how protocol conformances work in the runtime, which is how previews are discovered in app binaries.
- [Emerge Android](https://github.com/EmergeTools/emerge-android): The android SDK for similar preview based snapshot testing, along with other EmergeTools features.
Expand Down

0 comments on commit 8c9794a

Please sign in to comment.