The Applitools Eyes Images SDK allows you to easily add visual checkpoints to your XCTest unit tests. It takes care of getting screenshots of your UI component under test or pre-rendered images you provide, sending them to the Eyes server for validation and failing the test in case differences are found.
Further information is available at: https://applitools.com/tutorials/sdks/xctest/