Mockup image of a Microsoft phono displaying a contact list

With the release of Salesforce Mobile SDK for Windows, we’re excited to welcome Microsoft developers to the Salesforce community. Mobile developers can now use their favorite tools like Visual Studio, C#, NuGet and a myriad of .NET frameworks to build beautiful mobile apps. With these apps, companies can connect to their customers in whole new ways.

Getting started is incredibly simple since the SDK provides all of the essential building blocks out of the box. As a developer, focus on the app, not the plumbing, for important enterprise app features that provide identity, security, encryption, and offline data synchronization.

Install the Mobile SDK

If you’ve installed Microsoft Visual Studio 2013, installing Mobile SDK for Windows is just a matter of adding the Mobile SDK project template to Visual Studio.

  1. Download the Visual Studio template ZIP file from GitHub at Salesforce Native App Template.
  2. Copy the template ZIP file to the <user>DocumentsVisual Studio 2013TemplatesProjectTemplates directory.

When you click File > New > Project… in Visual Studio, the Mobile SDK template appears under Visual C# templates as Salesforce Application (Universal Apps). When you create your project, Visual Studio retrieves all missing Mobile SDK modules from their NuGet repositories.

Create a Mobile SDK Native Project and Add NuGet

For quickest results, use the Mobile SDK template and NuGet packages to create your projects.

  1. In Visual Studio, click File > New > Project.
  2. In the left pane, choose Visual C#.
  3. In the right pane, select the Salesforce Application (Universal Apps) template.
  4. Set Project Name and Solution Name.
  5. Click OK.
  6. (Optional) For Connected App Settings, overwrite the default Client ID and Callback URL with the client ID and callback URL from your connected app.
  7. (Optional) Select the OAuth scopes that your app requires. All apps require at least the api scope.
  8. Click Finish.

Enable NuGet Package Management

Use NuGet to download Mobile SDK dependencies and keep the libraries up-to date

  1. In the Solution Explorer, right-click the solution and click Enable NuGet Package Restore.
  2. When asked if you want to configure this solution to download and restore missing NuGet packages during build, click Yes.

Build & Run

We’re almost there. In the final steps, use the Configuration Manager to select the target platform for each project.

  1.  In the Build menu, click Configuration Manager.
  2. For each active solution configuration, reset the Platform values for listed projects to the appropriate processor type. Do not leave any projects set to Any CPU.
  3. Click Run. The app is ready to go!

That’s it! With zero lines of written code,  a developer can authenticate into Salesforce to load list of Contacts

Next Steps

The app template is enough to get started in less than 15 minutes. To learn more about more advanced functionality, be sure to look at the Salesforce Mobile SDK for Windows Developer Guide for in-depth documentation.

For more code examples, check out our extensive Sample Apps in a Github repo to learn the best practices and common patterns for building highly responsive mobile apps.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS