Expressive API for communicating with simctl
pluddy opened this issue ยท 2 comments
pluddy commented
Mostly adding this because it's something I want to take a stab at!
The goal would be to take something like our current:
execute(["status_bar", simulator, "override", "--batteryLevel", "\(level)", "--batteryState", "charging"])
and turn it into something like:
execute(.statusBar(deviceId: simulator, operation: .override([.batteryLevel(level), .batteryState(.charging)])))
Hoping this will also simplify some of the iterating cases in the ui, turning for example:
let resetPermissions = [
"All",
"Calendar",
"Contacts",
"Location",
"Microphone",
"Motion",
"Photos",
"Reminders",
"Siri"
]
Picker("Permissions:", selection: $resetPermission) {
ForEach(resetPermissions, id: \.self) {
Text($0)
}
}
into:
Picker("Permissions:", selection: $resetPermission) {
ForEach(SimCtl.Privacy.Permission.allCases, id: \.self) {
Text($0.displayName)
}
}
davedelong commented
๐ YES. This is on my mental list of things I'd like to see improved. Please go for it!