Salesforce Mobile SDK for Windows is ready for Microsoft Developers
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.
- Download the Visual Studio template ZIP file from GitHub at Salesforce Native App Template.
- 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.
- In Visual Studio, click File > New > Project.
- In the left pane, choose Visual C#.
- In the right pane, select the Salesforce Application (Universal Apps) template.
- Set Project Name and Solution Name.
- Click OK.
- (Optional) For Connected App Settings, overwrite the default Client ID and Callback URL with the client ID and callback URL from your connected app.
- (Optional) Select the OAuth scopes that your app requires. All apps require at least the api scope.
- Click Finish.
Enable NuGet Package Management
Use NuGet to download Mobile SDK dependencies and keep the libraries up-to date
- In the Solution Explorer, right-click the solution and click Enable NuGet Package Restore.
- 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.
- In the Build menu, click Configuration Manager.
- 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.
- 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
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.