As an ISV company we develop apps for our enterprise clients. Our SharePoint 2013 apps are typically installed on-premises using the provider-hosted high-trust model. Our intent is to build and release apps as complete app packages and let the customer admin install them in their SharePoint farm. We are running into a problem following this model because when an app package is built we have to specify an exact value of “web URL” in a publish profile that includes a hostname of the “~remoteAppUlr”. This value is specified in the publish profile, e.g. <SiteUrlToLaunchAfterPublish>https://devsp2013.qumu.com:8443</SiteUrlToLaunchAfterPublish>
When VisualStudio builds the app package it replaces the variable ~remoteAppUrl in appManifest.xml and webparts elements.xml files with the value specified in the profile used to create the app package. While this works in development and testing this is not a such a great method for building apps for customers. We just do not know the hostname/port the customer will use to host the web app.
Questions:
- - Is there a way to not specify a Web app URL during build, but rather do it during deployment? Interestingly when an app is registerd using appregnew.aspx such URL is requested, but it is not used to update the app
- - If there is no deployment-time Web app URL specification then we would like to simplify the process by adding a post-build script. Could anyone recommend a script that will modify the app package and insert a new URL into all the files inside .app that require it?
Thanks!