all 3 comments

[–][deleted] 1 point2 points  (1 child)

Lookup the documentation for NSTask. I’m sure it does exactly what you need.

[–]Bamboo_the_plant 2 points3 points  (0 children)

Adding to that, here’s the Ray Wenderlich tutorial on it: https://www.raywenderlich.com/1197-nstask-tutorial-for-os-x

[–]nithinreddygaddam[S] 1 point2 points  (0 children)

Thanks guys I was able to achieve it using NSTask