Open pellyco opened 7 years ago
I think xcrun simctl
is the easiest way to approach this.
There's also support for that in FBSimulatorControl
- so you could fork pxctest
and add the functionality directly there. Maybe you can figure out a generic way of implementing this, so we can merge it back upstream here?
Thanks - yes I will look at making any solution generic so we can merge it back upstream.
@plu @pellyco I've noticed that when the devices are booted headlessly they include the default photos so maybe the same setup can be added to the standard boot?
Some of my tests have a requirement to attach photos. For this we have a number of photos stored in the Camera Roll. We then can attach a photo in our app. However, we delete the simulator each time (starting fresh each time we found to be more reliable) and there are no photos in the Media folder of the device type so when we go to add a photo as an attachment in our app the tests fail. Would it be possible for the media folder to be pre-populated with a sample photo? I have looked at adding something like: xcrun simctl addmedia {UUID} .~/Automation/Media/.jpg or xcrun simctl addmedia booted .~/Automation/Media/.jpg Any suggestions on the best approach ? Thank you for any help.