'How to combine two command with ""/usr/bin/env" in swift?

I want to combine two command in "/usr/bin/env" in swift. I am using

let task = Process()
task.launchPath = "/usr/bin/env" 
task.arguments = arguments 
task.launch()
task.waitUntilExit()

here i want to combine two xcodebuild with different different sumulator

example :

xcodebuild -scheme DemoAppUITests test-without-building  -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0' 
 & 
xcodebuild -scheme DemoAppUITests test-without-building  -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0'

How i can archive this.

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source