To work with ArcGIS Runtime SDK for .NET in your Visual Studio (Windows or Mac) project, you need to add the appropriate ArcGIS Runtime API NuGet package. This process is not unique to ArcGIS Runtime SDK for .NET, you may follow a similar workflow for other APIs you want to use in your project.
The following steps guide you through creating a new Visual Studio project for your iOS app. You will also learn how to add the proper references for working with ArcGIS Runtime SDK for .NET classes. You can follow these same basic steps for every ArcGIS Runtime SDK for .NET project you create.
ArcGIS Runtime SDK for .NET Visual Studio Extension provides a project template (for use in Visual Studio on Windows only) for creating your mapping app, called ArcGIS Runtime App. See the Install the SDK topic for information about installing the ArcGIS Runtime SDK for .NET Visual Studio Extension.
Create an iOS app
Use Visual Studio to create an iOS app.
- Open a supported version of Microsoft Visual Studio.
- Choose File > New > Project (or click New Project on the Start page) to create a project.
- Click iOS > iPhone > Blank App (iPhone) in the New Project dialog box template list.
If you create your app using the ArcGIS Runtime App template, you do not need to complete the rest of the steps described in this topic. Creating your project from the template adds the appropriate NuGet packages and references as well as a page with a map view containing a single base layer.
- Choose a folder location for your new project and give it a name.
- Click OK to create the project.
Your solution opens in Visual Studio and contains a view controller called ViewController.cs.
Add ArcGIS Runtime SDK NuGet packages
ArcGIS Runtime SDK NuGet packages are hosted on NuGet.org. If you have an internet connection, you can access these packages and add them to your Visual Studio (Windows or Mac) project without having to install anything locally. If you've installed the ArcGIS Runtime SDK for .NET Visual Studio Extension (Windows only), then you also have these packages available in a local NuGet package source (called Esri).
- Open the NuGet Package Manager (Project > Manage NuGet Packages, for example).
- Choose the Browse tab in the manager. Choose the Esri package source to add locally installed packages. Otherwise, choose the online nuget.org package source. NuGet hosts around 100,000 packages, so you'll need to use the Search text box to locate the ArcGIS Runtime packages if using the online package source.
- To locate the ArcGIS Runtime packages, type ArcGIS Runtime in the Search text box. You will see several matches (for various versions and platforms).
- Select a version 100.6.0 package for your platform. Click Install to add the package to your project.
- Choose OK to proceed with the installation and then I Accept to accept the license agreement.
After adding the package, you'll be able to work with the components in ArcGIS Runtime for .NET API in your code.
The process described in this topic is generally the first thing you'll do for each ArcGIS Runtime SDK for .NET project you create from a standard Visual Studio template. The details for adding these references differ slightly between SDK platforms.