EmergeTools / SnapshotPreviews-iOS

Automatic snapshots from Xcode previews
MIT License
188 stars 6 forks source link

Documentation question: What are the steps I need to follow to get our app uploading builds to your service? #114

Open cprince-foreflight opened 2 months ago

cprince-foreflight commented 2 months ago

Hi-- I'm trying to get our ForeFlight app setup so that we can start uploading builds to your service for screen shot testing.

In looking at the Readme, I'm unclear on the sequence of steps I need to follow.

Is the Preview Gallery step needed before I can start uploading builds for screenshot testing?

It seems more likely that the Local Snapshot Generation step is what I need to do to before I start uploading builds for screenshot testing.

If the Local Snapshot Generation is the key part, then do I need to supply a non-nil result from the snapshotPreviews() func? If so, what are the string values I need to supply there? Do they need to enumerate all of the previews in the app?

Thanks!

noahsmartin commented 2 months ago

Hi @cprince-foreflight thanks for reaching out! To get a "hello world" style example you don't need to do anything with this repo. You can follow the instructions here for uploading to emerge: https://docs.emergetools.com/docs/ios-snapshots

This repo is for things you can do locally like the preview gallery or running a snapshot generation for a specific preview to debug it. It isn't required to get the end to end snapshot tests set up. I'll add a disclaimer in the repository readme to explain that

cprince-foreflight commented 2 months ago

Hi @cprince-foreflight thanks for reaching out! To get a "hello world" style example you don't need to do anything with this repo. You can follow the instructions here for uploading to emerge: https://docs.emergetools.com/docs/ios-snapshots

This repo is for things you can do locally like the preview gallery or running a snapshot generation for a specific preview to debug it. It isn't required to get the end to end snapshot tests set up. I'll add a disclaimer in the repository readme to explain that

Many thanks for your quick reply. Nodding. Sounds like I was just a bit mis-oriented. In better news, I just got the PreviewGallery() local approach working in our app.

Maybe a main purpose of the local approaches is to get any bugs removed from previews? I'd imagine having previews that crash will cause an upload to emerge to fail.

noahsmartin commented 2 months ago

@cprince-foreflight that's right you can more quickly work through bugs like crashes with local generation, although in most cases you can reproduce those just even more easily by just using the Xcode preview which should also crash. If you have just a few crashing previews the emerge rendering should succeed and show you the crash log, but if you have a bunch of them it might time out before working through all the crashes