So by now you should have played with Apps in SharePoint 2013. Whether you created your own or used a free/paid one from the store either way you should have by now. A couple of little things that can be a pain are to do with styling of apps within a SharePoint site.

I have seen this issue in many environments:

  

This issue is caused when someone sets the master page using the default option and sets it to push down to all sites.

  

This only happens when you set the system master page this way, setting the publishing page one does not affect it. To resolve this you can access the master page changer page using the following URL:

“/_layouts/15/ChangeSiteMasterPage.aspx

You can also run PowerShell that will set the “CustomMasterUrl” back to what it should be.

  

The next issue I have seen is when everything looks to be setup correctly but when the app is deployed and you render the app is seems to be missing CSS, JavaScript and even Master Page layout.

  

This issue seems to be caused by using different application pool accounts. In the environment I am using right now I have the following:

Web Application

Application Pool

Account

Portal

Portal_AppPool

SPS\SP_SiteAppPool

My Sites

MySite_AppPool

SPS\SP_ProfileAppPool

Apps

Apps_AppPool

SPS\SP_AppPool

As you can see I am using different accounts for each application pool. In this configuration my accounts are running least privilege and causing the problem with the user interface. I change the application pools to be the following:

Web Application

Application Pool

Account

Portal

Portal_AppPool

SPS\SP_SiteAppPool

My Sites

MySite_AppPool

SPS\SP_ProfileAppPool

Apps

Apps_AppPool

SPS\SP_SiteAppPool

This resolves my problem and the apps now load as expected. Now of course you would probably want to keep everything isolated potentially by application pool and account so this may not be the ideal solution. The other approach is to grant permission to the Web Application for the App Web specifically to the application pool account you are using the “User Policy” option in Central Administration.

  

As a note I found that simply adding the user account, refreshing it and then removing it from the user policy meant it worked perfectly fine.

  

Hope this helps.