{"id":29675113,"url":"https://github.com/salute-developers/snapshots-kit-ios-sample","last_synced_at":"2026-04-19T15:01:48.261Z","repository":{"id":303397078,"uuid":"953856644","full_name":"salute-developers/snapshots-kit-ios-sample","owner":"salute-developers","description":"Sample Xcode project with SDSnapshots library usage demo","archived":false,"fork":false,"pushed_at":"2025-07-07T11:09:19.000Z","size":14794,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-22T23:16:15.733Z","etag":null,"topics":["screenshot-testing","snapshot-testing","swift","swiftui","testing","xctest"],"latest_commit_sha":null,"homepage":"https://github.com/salute-developers/snapshots-kit-ios","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salute-developers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T07:30:42.000Z","updated_at":"2025-07-07T11:09:23.000Z","dependencies_parsed_at":"2025-07-07T12:36:53.467Z","dependency_job_id":null,"html_url":"https://github.com/salute-developers/snapshots-kit-ios-sample","commit_stats":null,"previous_names":["salute-developers/snapshots-kit-ios-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salute-developers/snapshots-kit-ios-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salute-developers%2Fsnapshots-kit-ios-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salute-developers%2Fsnapshots-kit-ios-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salute-developers%2Fsnapshots-kit-ios-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salute-developers%2Fsnapshots-kit-ios-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salute-developers","download_url":"https://codeload.github.com/salute-developers/snapshots-kit-ios-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salute-developers%2Fsnapshots-kit-ios-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32010957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["screenshot-testing","snapshot-testing","swift","swiftui","testing","xctest"],"created_at":"2025-07-22T23:05:54.255Z","updated_at":"2026-04-19T15:01:48.217Z","avatar_url":"https://github.com/salute-developers.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDSnapshots library sample project\n\nThis project features demo setup for iOS products Snapshot Testing with [SDSnapshots package](https://github.com/salute-developers/snapshots-kit-ios).\n\n![img](Assets/header.png)\n\n- [SDSnapshots library sample project](#sdsnapshots-library-sample-project)\n  - [Stack](#stack)\n  - [Repo content](#repo-content)\n  - [Run tests](#run-tests)\n    - [Prepare](#prepare)\n    - [Run](#run)\n  - [Read tests results](#read-tests-results)\n  - [Store .png better (use Git LFS)](#store-png-better-use-git-lfs)\n  - [License](#license)\n\n## Stack\n\n- **Xcode** 16.1\n- **iOS Simulator Runtime** 18.1 (iPhone 16 simulator)\n- **Swift** 6.0\n\nDifferent tools versions may cause test failures due to UIKit render updates.\n\n*In this case test run in .record mode is needed to capture fresh reference images.*\n\n## Repo content\n\n- `SampleProj.xcodeproj` with **SDSnapshots package** integration and 2 targets:\n  - SDSnapshotTests – test target with library usage samples\n  - HostApp – iOS app serving as `TEST_HOST` for SDSnapshotTests\n\n## Run tests\n\n### Prepare\n\n- install required Xcode version\n- install required iOS Simulator Runtime version\n- create simulator with required device model and runtime\n- tune simulator device preferences for accessibility and locale\n\nSimulator language preference, keyboards and accessibility toggles should be set as needed.\n\nWe are not currently ship automated device setup script. But you can reference our fastlane fragment with `simctl` gem usage:\n\n```ruby\ndef self.set_test_device_preferences(device)\n  keyboards = [\n    \"ru_RU@sw=Russian;hw=Automatic\",\n    \"en_US@sw=QWERTY;hw=Automatic\",\n    \"emoji@sw=Emoji\",\n  ]\n\n  plist = {\n    AppleLanguagesDidMigrate: \"20E247\",\n    AppleLanguagesSchemaVersion: 3000,\n    AKLastIDMSEnvironment: 0,\n    AKLastLocale: \"ru_RU\",\n    AppleLocale: \"ru_RU\",\n    AppleLanguages: [\"ru-RU\", \"en-US\"],\n    AppleKeyboards: keyboards,\n    ApplePasscodeKeyboards: keyboards,\n    PKLogNotificationServiceResponsesKey: false,\n    AddingEmojiKeybordHandled: true,\n    AccessibilityEnabled: true,\n    ApplicationAccessibilityEnabled: true,\n  }\n  File.write(device.path.global_preferences_plist, Plist::Emit.dump(plist))\nend\n```\n\nThis settings can be set filled in Settings.app UI on device. \n\nOr from Terminal:\n\n```sh\nxcrun simctl list devices -j\n```\n\n- grab \"dataPath\" from `simctl` output\n- add `/Library/Preferences/.GlobalPreferences.plist` to this path\n- save setting plist to located file\n\n### Run\n\n- clone the repository\n- open *SampleProj.xcodeproj*\n- select *HostApp* scheme\n- select *iPhone 16* simulator device with *iOS 18.1* runtime\n- run tests (cmd+U)\n\n✅ If environment setup is valid, all tests should be green.\n\n## Read tests results\n\n❌ In case of test case failure, read assert provided description and check workdir for created `merge.png` images to see comparison details.\n\nSome `merge.png` failures examples are listed below.\n\n🔎 *Text color has changed*\n\n![img](Assets/text_color_changed.png)\n\n🔎 *Text string has changed*\n\n![img](Assets/text_letters_changed.png)\n\n🔎 *Accessibility label has gone missing*\n\n![img](Assets/accessibility_label_missing.png)\n\n## Store .png better (use Git LFS)\n\nGit LFS usage is strongly advised in your own test project. It converts relatively large `.png` files to lightweight text \"pointers\".\n\nRead [more about git LFS here](https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-git-large-file-storage). Check if this feature is provided by your remote git service.\n\nThis sample repository configuration is not optimal. We put `.png` files in commits only because it is free of charge option on the Github.\n\nBrief LFS setup steps:\n\n- [install git-lfs utility](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) (basically single binary at PATH is needed)\n- create `.gitattributes` file with filetypes map to LFS\n\n```sh\n# .gitattributes in the repo root\n\n# Assets\n*.png filter=lfs diff=lfs merge=lfs -text\n```\n\n- `git lfs install` to setup hooks\n- `git add your_reference.png` should now store images in LFS\n- `git lfs status` to check whether `Git:` or `LFS:` pointer used\n- Now you are able to commit and push your pictures using LFS\n\n## License\n\nProject is under [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalute-developers%2Fsnapshots-kit-ios-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalute-developers%2Fsnapshots-kit-ios-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalute-developers%2Fsnapshots-kit-ios-sample/lists"}