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

perlsyntax

macrumors 6502
Original poster
Jan 10, 2014
296
3
If i sign up for the mac os x programming for apple can i make command line tools for my projects and put in the apple store?
 
If i sign up for the mac os x programming for apple can i make command line tools for my projects and put in the apple store?

No, I'm fairly certain only apps are allowed on the Mac App Store.

Read through the Mac App Store rules and I feel like they might cite this one as a reason for rejection:

2.15
Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations

Here's the rules if you want to read through them all:
https://developer.apple.com/appstore/mac/resources/approval/guidelines.html
 
Last edited:
command line is not allowed in the store as far as I know.


Working example I know would be BBedit, the text editor. If you get from vendor you get the BB edit app and its command line tools in one go.

If you get from app store you only get the bbedit app. To get the command line tools you have to see the bbedit site for a second downloard from them. they reason they give for this is basically app store does not allow CLI app posting.



If going down the route of CLI app making I'd highly advise you in release notes or on your site (if running one) give instructions on how to turn off guardian. I know how to turn it off to avoid that lovely pop up saying it will not install as its not a recognized apple developer app. Some other users of your app may not however. Sure they can google it, but its a nice touch if the devs take a few moment to write this step I find.
 
Last edited:
He's just talking about signing your program so that it isn't blocked from running by GateKeeper. It's not related to your question about putting command line tools on the Mac App Store.

Sorry if i just asking a question.
 
Command Line

What you could do is have a binary that contains the command line and GUI code.
Then in your main.m simply check if the app was launched with particular flags, if it was, branch your code to run the command line version.

Something like:

Code:
    //main.m
    NSArray *args = [[NSProcessInfo processInfo] arguments];

    BOOL inGUIMode = TRUE;
    inGUIMode = ![args containsObject: @"--myCommand"];
    
    if (inGUIMode == FALSE)
    {
        CommandLineRunner *runner = [[CommandLineRunner alloc] init];
        [runner runCommandLine];
    } else {
        return NSApplicationMain(argc, argv);
    }
 
I would be quite easy to add a rudimentary GUI using Xcode / Interface Builder. For example you could develop a single window Mac app.
 
If you're going to do a CLI app why not just put it in Homebrew?


this would be a good place to put it. Since I came across I am liking it. Not that I am scared of building off of source, homebrew just adds a few bene's besides the compiling being taken care of.


Github might be another good avenue to host as well if not on homebrew. There are others ofc but github seems to be a front runner in this arena.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.