Using Pragma to slit app in two

I have a free version of my app and a paid version. I was wondering if it is possible to use pragma script to compile them differently based on my package name


if(package name = free)
   compile with this code
   compile without that code

I have not used pragma much so I am wondering if it is possible.

Use custom defines in your player settings: