You can use ArcGIS Pro to consolidate scenes into a single mobile scene package (.mspk) that can be shared within your organization or copied directly to mobile devices. These read-only scenes, their layers, and associated data will be contained in a single mobile scene package (.mspk). This mobile scene package adheres to a common scene definition, allowing you to transport your scenes and data across the ArcGIS platform.
Create a mobile scene package with ArcGIS Pro
You can create mobile scene packages with ArcGIS Pro using the tool called Create Mobile Scene Package from the Data Management Toolbox. With ArcGIS Pro 2.4 (or later), you can use this tool to set an expiration date on your mobile scene package, as long as ArcGIS Pro is licensed with the ArcGIS Publisher extension.
You can distribute .mspk files to your users, for use in your app, by doing the following:
Uploading and sharing the files in your organization (with ArcGIS Online or your portal)
Delivering the files to individual devices through common file sharing methods (network share, email, and so on)
Offline scenes can include basemaps, operational layers, 3D scene layers, tiled layers (.tpk), tables, relationship classes, locators, and elevation sources.
Before you open and display scenes provided by a mobile scene package, you should consider whether the mobile scene package content has expired.
Mobile scene package expiration
Using ArcGIS Pro 2.4 (or later), you can set an expiration date on your mobile scene package using some options provided by the ArcGIS Publisher extension. This gives you more control over the lifetime of your data. For example, it will allow you to do the following:
- Provide data to third-party contractors that will expire at the end of a contract.
- Indicate to your users that frequently changing data has become obsolete.
As an ArcGIS Runtime developer, there are three possible outcomes when you try to load a mobile scene package:
- You have full access to the mobile scene package. This situation occurs if the package has not expired or if it has been created without any expiration properties.
- You have full access to the mobile scene package even though the scenes and their data have expired. You will be warned that the package is out of date.
- You cannot access the mobile scene package because it has expired. In this case, the package will fail to load and you will not be able to access its scenes and data.
These three outcomes are managed by the mobile scene package load process MobileScenePackage.loadAsync. No extra workflow or code paths are required to accommodate these.
If you want to provide your users with extra information, you can retrieve the expiration details from the expiration property on the MobileScenePackage. For example, you could display how many days remain before the package expires by doing the following:
- Load the mobile scene package.
- Read the expiration property on the mobile scene package.
- Confirm that it has not expired.
- Get the expiration date.
- Calculate the number of days between today and the expiration date. Report the number of days remaining.