SDK Overview
If the built-in configurability of VertiGIS Studio Mobile does not serve your purposes, then it might be time to dive into the VertiGIS Studio Mobile SDK. Building applications on top of the VertiGIS Studio Mobile SDK requires engaging in the development, testing, and deployment of custom code, so it's worthwhile to make sure your problem cannot be solved with workflow or other advanced configuration.
If you still think you need to use the VertiGIS Studio Mobile SDK, then let's get started!
The VertiGIS Studio Mobile Designer allows you to edit your application's layout, configure custom behaviors for buttons and other UI components, and solve complex business problems through VertiGIS Studio Workflow. Many use cases can be solved through the VertiGIS Studio Mobile Designer and don't require custom development.
Overview
The VertiGIS Studio Mobile SDK provides various nuget packages for building a custom VertiGIS Studio Mobile application. Applications can extend VertiGIS Studio Mobile by developing custom components, services, commands and operations, and more using these packages.
Extension Points
There are three main extension points in the SDK:
Components
Components power the UI experience of VertiGIS Studio Mobile. Components usually consist of a C# class registered with VertiGIS Studio Mobile that has an associated XAML view. Layout files are composed of a nested hierarchy of components which are instantiated at runtime.
Services
Services provide the shared infrastructure and core logic that power app behavior. Services do not have an associated UI, and there is only one instance of a service per application.
Commands and Operations
Commands and operations provide a framework for executing application wide behavior. Services and components can both run and implement commands and operations, allowing for interaction and consistent behavior without tight coupling. Commands and operations can also be run in the app config and by Workflows. This can allow you to customize the behavior of built-in components.
Application Interactions
Components, services, and commands and operations interact to form a VertiGIS Studio Mobile Application.
- Services are used to implement application wide behavior, such as theming or authentication, and then expose that logic through commands and operations, such as
ui.set-theme
(implemented by theBrandingService
) orauth.sign
(implemented by theAuthenticationService
). - Components can run commands and operations to interact with services or other components. Components can also implement commands and operations to allow themselves to be affected by other services and components.
- Component and service interaction through commands and operations is preferred, but components and services can also be tightly coupled to each other through dependency injection.
Requirements
- Visual Studio 2019 or higher on Windows is the only officially supported development environment for the VertiGIS Studio Mobile SDK. Other development environments may be possible, but have not been verified.
Windows
- Windows 10 - To run the app on Windows 10, you must have Fall Creators Update installed on your Windows development PC.
- The SDK targets Windows 10, version 1809 (10.0; Build 17763) or later.
iOS
To be able to build iOS applications, you must have a Mac; Windows cannot build iOS applications.
Setup is required to allow Visual Studio on Windows to use the Mac to build the iOS project.
- See: iOS Build on Windows
Required software on the Mac:
- XCode
- Visual Studio for Mac
See the Xamarin guide on deploying and testing iOS apps for more details.
Android
No extra setup is required. You can install your emulator of choice, or debug on a physical device. See the Xamarin guide on deploying and testing Android apps for more detail.
Getting Up and Running
A VertiGIS Studio Mobile Quickstart is provided, which is a basic VertiGIS Studio Mobile application. This Quickstart is essentially a Xamarin Forms Quickstart Application that initializes and boots VertiGIS Studio Mobile on each platform. To get up and running, simply check out the Mobile Quickstart Repository and start the solution on the appropriate platform.
VertiGIS Studio Mobile is built on Xamarin Forms, a framework for building cross platform native apps. As a consequence, building non trivial extensions to VertiGIS Studio Mobile will require some Xamarin development knowledge.
Build and run for Windows 10
- Set App1.UWP as your startup project.
- Change the architecture from Any CPU to x86 or x64.
- Build and run.
Build and run for Android
- Set App1.Android as your startup project.
- Choose your target device or emulator from the run dropdown in the toolbar.
- Please note that building and deploying to an emulator is faster than using a device.
- Build and run.
This build can also be run from Visual Studio for Mac.
Build and run for iOS
- Set App1.iOS as your startup project.
- Ensure you are paired with a Mac
- Choose your target device (must be plugged into Mac) or simulator from the run dropdown in the toolbar.
- Please note that building and deploying to a simulator is faster than using a device.
- Build and run.
This build can also be run from Visual Studio for Mac.
Anatomy of the Quickstart
The Quickstart is composed of four projects, one for each platform, and a common project that is shared by all platforms. This is a standard Xamarin Forms setup, as described in their documentation. Changes have been made to each project to support the bootstrapping of a VertiGIS Studio Mobile application using the SDK.
VertiGIS Studio Mobile SDK Packages
The VertiGIS Studio Mobile SDK is composed of VertiGIS Studio packages:
Vertigis Mobile
- This package is the heart of the Mobile SDK, and powers the interface and interactions of a Mobile Xamarin Application.
- This package includes the
VertiGIS.ArcGISExtensions
namespace, an API for working with foundational VertiGIS Studio models, configuration, Esri's ArcGIS types, etc. - This package includes the
VertiGIS.Mobile.Workflow
namespace, which includes components and renderers for VertiGIS Studio Workflow controls in a Mobile app.
VertiGIS Studio Workflow
- VertiGIS Studio Mobile heavily relies on VertiGIS Studio Workflow to power its functionality.
- VertiGIS Studio Workflow is itself composed of many packages (Image Activities, GIS, Runtime).
Development Patterns
For the most part, the VertiGIS Studio Mobile project follows the development practices outlined in Enterprise Application Patterns using Xamarin.Forms.
One major deviation from usual Xamarin Development patterns is that Autofac is used as the Dependency Injection framework.
Next Steps
Create a Component
Learn how to create a basic component
Create a Service
Learn how to create a basic service
Deploy your Application
Learn how to deploy your custom library, layout and app config