badoo / ios-device-server

A server to manage remote iOS simulators and devices for parallel testing
MIT License
44 stars 11 forks source link

Add API to get simulator's environment variable #86

Closed sravanmedarapu closed 3 years ago

sravanmedarapu commented 3 years ago

Added API for retrieving simulator environment variable. Command: xcrun simctl getenv SIMULATOR_UDID ENVIRONMENT_VARIABLE

API: /devices/{dev_ref}/environment/{env_variable}

e.g:

curl http://localhost:4567/devices/AE9CF40B-AC20-4D08-A305-7F8CB483A3C0-localhost/environment/SIMULATOR_SHARED_RESOURCES_DIRECTORY
/Users/sravenmedarapu/Library/Developer/CoreSimulator/Devices/AE9CF40B-AC20-4D08-A305-7F8CB483A3C0/data