1

I have app which recognize image chosen from Camera roll (CoreML). Now I want to write some test for this to not have to click it through every time I make a change in the app. How can I put testing images into simulator's Camera roll programatically, so somebody else would just run the test and it would do everything for him?

Mailo Světel
  • 24,002
  • 5
  • 30
  • 40

1 Answers1

0

You can go into safari on the simulator and search for images. Save the images and you should have access to them in the camera roll. If you must do it programmatically, then this link might help.

swift Take a photo and save to photo library

leedex
  • 963
  • 8
  • 19
  • This seems to be a hack. I am looking more for something like Simulator.sharedInstance.addAsset(named: "myTestingAsset") – Mailo Světel Mar 04 '18 at 12:00