Command Line in MacOS

My game takes a command line argument using UGameplayStatics::ParseOption in the InitGame function. I just use “?Parameter=“value”” on PC and it works fine, but I can’t figure out how to pass it in the Mac version. How do you provide a command line parameter when running from a Mac? Any examples anyone?

Not sure if I understand the context correctly, but any application bundle can be run from command line (Terminal.app) and provided arguments by the use of open.

Something like:
open /path/to/gamename.app --args somearg someotherarg

I’ve not tested this other than to open apps without arguments (e.g., open /Applications/Blender.app), but the --args is listed under the man for open as the method to provide args. You’ll have to figure out the appropriate syntax to have the argument look like you want it to the app. For an example, if you had a $ in the argument, you’d have to escape it to avoid having it interpreted by the shell and messing with your arg. ? and = should be okay though.

Another way that would be persistent when the App’s icon is used (double clicked or right-click opened), would be to edit the info.plist in the bundle. I’ve not tried that in modern versions of macOS and don’t know if it’s still supported.