To execute Receigen on command line, open the Terminal application. It is location into the Application/Utilities folder.

Reference

To access the command line help, type the command:

$> /Applications/Receigen.app/Contents/MacOS/Receigen --help

Receigen (Receipt Validation Code Generator)

Usage:
Receigen [-h|--help] -i|--identifier X.Y.Z -v|--version YYY [-o|--os platform] [-p|--prefix codeprefix] [-s|--success behavior] [-f|--failure behavior] [-r|--receipt-path path]

    -h
    --help                     : Display the help
    -i
    --identifier X.Y.Z         : The bundle identifier
    -v
    --version YYY              : The bundle version
    -o
    --os platform              : The target platform
                               : Valid values are 'osx' or 'ios'.
                               : 'osx' will generate code for OS X 10.6 and later
                               : 'ios' will generate code for iOS 7.0 and later
                               : The default value is 'osx'
    -p
    --prefix codeprefix        : The prefix to use for the symbol
                               : Use this option to generate code variation in order use multiple validation code
    -s
    --success behavior         : The behavior when validation succeeds
                               : Valid values are 'donothing', 'runapplication', 'checkinapp', 'callblock' or 'callfunction'.
                               : 'donothing' will generate code that does nothing
                               : 'runapplication' will generate code that executes either NSApplicationMain or the RUNNER macro
                               : 'checkinapp' will generate code that checks InApp purchases
                               : 'checkinappandreceipt' will generate code that checks InApp purchases with access to the receipt data
                               : 'callblock' will generate code that invokes a block with the receipt properties and a success status
                               : 'callfunction' will generate code that invokes a function with the receipt properties and a success status
                               : The default value is 'runapplication' on OS X and 'donothing' on iOS
    -f
    --failure behavior         : The behavior when validation fails
                               : Valid values are 'donothing', 'exitwith173', 'refreshreceipt', 'callblock', 'callfunction' or 'docrash'.
                               : 'donothing' will generate code that does nothing
                               : 'exitwith173' will generate code that exit with a status code of 173
                               : 'refreshreceipt' will generate code that triggers a receipt refresh request
                               : 'callblock' will generate code that invokes a block with the receipt properties and a failure status
                               : 'callfunction' will generate code that invokes a function with the receipt properties and a failure status
                               : 'docrash' will generate code that crashes
                               : The default value is 'exitwith173' on OS X and 'refreshreceipt' on iOS
    -r
    --receipt-path path        : A path to the receipt file
                               : Use this option to generate code that validate a receipt in a non-standard location

On command line, Receigen generates a header file containing the validation code.

OS X Usages

The following command generates the receipt validation code in a file named receipt.h that:

$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os osx > receipt.h
Receigen, a smart code generator for Mac App Store receipt validation.
----------------------------------------------------------------------
Generating receipt validation code for CFBundleIdentifier='com.example.MyApplication' and CFBundleShortVersionString='1.3.0'...
Generation done.

The following command generates the receipt validation code in a file named receipt.h that:

$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os osx --success checkinapp --failure exitwith173 > receipt.h
Receigen, a smart code generator for Mac App Store receipt validation.
----------------------------------------------------------------------
Generating receipt validation code for CFBundleIdentifier='com.example.MyApplication' and CFBundleShortVersionString='1.3.0'...
Generation done.

The customization guide describes all the available options and behaviors.

iOS Usages

The following command generates the receipt validation code in a file named receipt.h that:

$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os ios > receipt.h
Receigen, a smart code generator for Mac App Store receipt validation.
----------------------------------------------------------------------
Generating receipt validation code for CFBundleIdentifier='com.example.MyApplication' and CFBundleVersion='1.3.0'...
Generation done.

The following command generates the receipt validation code in a file named receipt.h that:

$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os ios --success checkinapp --failure refreshreceipt > receipt.h
Receigen, a smart code generator for Mac App Store receipt validation.
----------------------------------------------------------------------
Generating receipt validation code for CFBundleIdentifier='com.example.MyApplication' and CFBundleVersion='1.3.0'...
Generation done.

The customization guide describes all the available options and behaviors.