I created a new SharePoint Provided Hosted App. In the app added a single App part using the add item template. I used the {StandardTokens} in the query string of the start page. I got all other values but the SPAppWebUrl was empty string. The problem is there was no app items being provisioned on the site so the SPAppWebUrl was not passed to the query string.
Solution:
The simple solution is I added a “dummyList” this created a feature. I deployed the app and tested this time the SPAppWebUrl was passed.
I hope this helps someone.