Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

webking

macrumors newbie
Original poster
Apr 24, 2016
1
0
Hi.

I hope someone can guide me to the right directions.

Basically I would like to create a program for mac OSx such as my_program.app and of course it has a GUI and a few buttons and display area which allow the GUI to be able to show the results of the bash script inside the GUI and not in terminal. Will Xcode work for this type of thing?

Please assist. Thank you so much.
 
Absolutely, Xcode will work. Although if you don't know any Objective-C or Swift then it's a steep learning curve. (You need to be looking at NSTask: https://www.raywenderlich.com/125071/nstask-tutorial-os-x )

Alternatively, if you'd be satisfied with just popping up a few user dialogs and maybe dumping the results into a text file then AppleScript might be a better option. You'll probably get going quicker. Or possibly you might use Automator - I posted a guide to using Automator to make shell scripts more user friendly a while ago: https://www.ghostotter.com/making-shell-scripts-little-user-friendly/

So, in short, yes you can use Xcode to create a GUI for a shell script but there will be a steep learning curve. You might see results faster if you have a more basic GUI and use AppleScript and/or Automator instead.

Good luck!
 
Last edited:
As mentioned, Xcode does have a fairly steep learning curve, in addition to the Cocoa frameworks. Depending on your experience and how much time you want to invest, you might also take a look at Pashua.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.