It seems you've already found a solution in another thread, but for future reference here are some ways of protecting your source code:
In general, your options are either p-coding your files or compiling them.
For an App Designer app, your best options are either building it into a standalone executable or exporting it as an .m file and p-coding it. A potential benefit of creating a standalone executable is that the end user does not need MATLAB, but you must have the MATLAB or Simulink Compiler as well as a supported C/C++ compiler to create one.