Skip to main content

Examples

Save, list, and delete photos:

When to use

  • Your app saves photos and you need to verify they appear in the library.
  • Your app reads from the photo library and you need to set up known state before the test runs.
  • You need to clean up photos between test runs to avoid state carrying over.
deleteAllPhotos permanently removes all photos from the device library. Use it only on test devices.

Full sample test

Last modified on May 13, 2026