To execute Receigen on command line, open the Terminal application. It is location into the Application/Utilities
folder.
When invoked, Receigen generates the file containing the validation code.
Reference
To access the command line help, type the command:
$> /Applications/Receigen.app/Contents/MacOS/Receigen --help
The inline help contains all the available options and their possible values.
OS X Usages
The following command generates the receipt validation code in a file named receipt.h
that:
- targets the OS X platform
- uses the bundle identifier
com.example.MyApplication
- uses the bundle version
1.3.0
- runs the application if the validation succeeds (the default for OS X)
- exits with a code 173 if the validation fails (the default for OS X)
$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os osx > receipt.h
The following command generates the receipt validation code in a file named receipt.h
that:
- targets the OS X platform
- uses the bundle identifier
com.example.MyApplication
- uses the bundle version
1.3.0
- checks the InApp purchases if the validation succeeds
- exits with a code 173 if the validation fails
$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os osx --success checkinapp --failure exitwith173 > receipt.h
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:
- targets the iOS platform
- uses the bundle identifier
com.example.MyApplication
- uses the bundle version
1.3.0
- does nothing if the validation succeeds
- triggers a receipt refresh request if the validation fails
$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os ios > receipt.h
The following command generates the receipt validation code in a file named receipt.h
that:
- targets the iOS platform
- uses the bundle identifier
com.example.MyApplication
- uses the bundle version
1.3.0
- checks the InApp purchases if the validation succeeds
- triggers a receipt refresh request if the validation fails
$> /Applications/Receigen.app/Contents/MacOS/Receigen --identifier com.example.MyApplication --version 1.3.0 --os ios --success checkinapp --failure refreshreceipt > receipt.h
The customization guide describes all the available options and behaviors.
OpenSSL version
In order to specify an OpenSSL version, you need to pass an option with the version to support:
$> /Applications/Receigen.app/Contents/MacOS/Receigen --openssl-version 1.1 --identifier com.example.MyApplication --version 1.3.0 --os osx > receipt.h