I have tried using the new WSTP interface with Xcode on a Mac 10.11.6.
Attached (in PDF format) is the very simple template file wstpadd.tm.
When compiled with wsprep the output file wstpadd.tm.c contains alot of gibberish
and so the compilation breaks down. See attached file (in PDF format).
The files you posted do not download on my system (a forum bug? damaged pdfs?) so I can’t help you specifically but the best place to start is to compile the tutorial examples and modify them to suit your needs.
Have you already compiled and tried the addtwo example program? The examples are located in the following directory on the Mac:
/Applications/Mathematica.app/Contents/SystemFiles/Links/WSTP/DeveloperKit/MacOSX-x86-64/WSTPExamples