They needed %f to indicate how to pass the file we're claiming to handle.
To test it, use: $ ./pkg/flatpak/build.sh $ flatpak install ./pkg/flatpak/solvespace.flatpak $ flatpak run com.solvespace.SolveSpace