I understand that the best way to develop a free and paid version of you app is to have a library project which contains the main bulk of the program. The free and paid projects will then use this library project. This allows the free and paid projects to have different resources.
However, my question is how do we limit functionality within the free app (or extend it for the paid app)? For instance, my free app will only be able to access the latest row in a database table whereas the paid app can access all the rows.
One way to do this would be to have a boolean flag in resources somewhere that you set to true for paid and false for free. At runtime the library project checks for the boolean flag and alters behavior accordingly. However, this seems very easily to hack for any potential attacks. Are there better ways?
Would this be easier to complete with one free app and then use in-app billing to unlock the pro functions?