Developing Apps for SharePoint 2013
I’m basically using my blog right now as a public scrapbook. I simply log every issue I run into when I developing my first SharePoint 2013 hosted App.
An App Part is basically a very simple yet effective solution to add functionality to the host web (the web hosting the app): It simply is an IFrame that displays a page hosted elsewhere. In my scenario of a SharePoint hosted app this page is hosted in a subsite i.e. in the app web just below the host web. However, IE9 seems to have difficulties handling script loading in an IFrame that is added after the IFrame’s hosting page already completed loading. If I create a simple SharePoint hosted App Project in Visual Studio 2012 and add a Client Web Part (Host Web), press F5 and navigate back to the host web to add the App Part (=Client Web Part) to a (newly created wiki page) in the host web, the solution breaks on the following error:
Error: 'Object' is undefined
It points to jQuery’s statement
// Save a reference to some core methods toString = Object.prototype.toString,
1. Make sure that the page isn’t loaded in IE9 Compat View. Also ensure that IE by default doesn’t want to display all intranet sites in Compatibility View by clearing the tick in the box here Tools > Compatibility View Settings > Display Intranet Sites in Compatibility View.
Issue 2. – Each time when debugging from VS2012 (F5′ing) I need to enter my credentials
A quick look with Fiddler showed that credentials aren’t sent (ah well, who would have guessed with the “Enter credentials box” popping up). Since the isolated App domain (*.app.futurama.local in my case) was properly configured in DNS and host file I could solve the problem by adding *.app.futurama.local to IE’s intranet sites.