Show / Hide Table of Contents

Method UnpackAsync

UnpackAsync(String, String)

Unpacks a mobile scene package file (.mspk) to an output directory.

Declaration
public static Task UnpackAsync(string mobileScenePackageFilePath, string outputDirectory)
Parameters
Type Name Description
System.String mobileScenePackageFilePath

the path to a mobile scene package file (.mspk)

System.String outputDirectory

a path to a directory to write the mobile scene package contents.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task representing the asynchronous unpack operation.

Remarks

If the last level of the outputDirectory is not present, it will be created as part of the unpack task. The unpack task writes the full content of the mobile scene package to the output directory. Care should be taken on devices with limited storage space, especially if the package is very large. After unpacking, you can remove the original .mspk file from the device.

Note that unpacking will fail if the package has expired and was authored as PreventExpiredAccess.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.5 - 200.7
Xamarin.Android100.5 - 100.15
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.7

UnpackAsync(String, String, CancellationToken)

Unpacks a mobile scene package file (.mspk) to an output directory.

Declaration
public static Task UnpackAsync(string mobileScenePackageFilePath, string outputDirectory, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String mobileScenePackageFilePath

the path to a mobile scene package file (.mspk)

System.String outputDirectory

a path to a directory to write the mobile scene package contents.

System.Threading.CancellationToken cancellationToken

A System.Threading.CancellationToken for canceling the unpack operation.

Returns
Type Description
System.Threading.Tasks.Task

A System.Threading.Tasks.Task representing the asynchronous unpack operation.

Remarks

If the last level of the outputDirectory is not present, it will be created as part of the unpack task. The unpack task writes the full content of the mobile scene package to the output directory. Care should be taken on devices with limited storage space, especially if the package is very large. After unpacking, you can remove the original .mspk file from the device.

Note that unpacking will fail if the package has expired and was authored as PreventExpiredAccess.

Exceptions
Type Condition
ExpiredException

Package was authored to prevent expired access.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.5 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.5 - 200.7
Xamarin.Android100.5 - 100.14
Xamarin.iOS100.5 - 100.15
UWP100.5 - 200.7
In This Article
Back to top Copyright © 2022 Esri.