Developing Apps for SharePoint 2013

App development in SharePoint 2013, using visual studio 2012, is a very cumbersome process. In the process of developing my first testing App, I’ve faced a lot of issues, and after some googling, I was able to resolve those issues.
 
Here is the process we need to follow to develop and deploy an App in SharePoint 2013:

Configuring SharePoint 2013 to host Apps

  1. Setting-up an App domain for hosting apps
  2. Create the App management and Subscription Settings service application
  3. Configure the SharePoint to use the App domain
For configuring these things, you can follow the steps given in this blog post.

Developing and Deploying SharePoint-Hosted App

For developing the SharePoint-hosted app in the Visual Studio you need the Office Developer Tools for Visual Studio 2012 and the SharePoint Client Components.Once you have installed this tool you are ready to develop the SharePoint-hosted Apps.

Now, follow the steps given in this blog post to develop an App.

Note - Don’t use the system account to deploy your app in SharePoint, it will throw an error.
 
Lastly, after deploying the App on SharePoint 2013, try to access that app in the browser.

Note: If you are getting a pop-up for authentication, and even after providing the credentials, you are not able to login, then that’s a loop-back problem of assigning the same address for both the domains. To solve this issue, you are required to disable the loop-back, Method 2 in this support document explains the steps of disabling the loop-back. So, after following these
steps, you’ll be able to login to the newly developed app.