Show / Hide Table of Contents

Method CreateDefaultAsync

CreateDefaultAsync(string?)

Creates a default CredentialPersistence object for the current platform and ensures it is loaded.

Declaration
public static Task<CredentialPersistence?> CreateDefaultAsync(string? persistenceId = null)
Parameters
Type Name Description
string persistenceId

An optional string that specifies a unique identifier for the persistence storage instance.

Returns
Type Description
Task<CredentialPersistence>

A task which creates a new CredentialPersistence object for the current platform. If the current platform is not supported, the task will instead return null.

Remarks

On Windows this will only return a non-null value if the application is configured as a packaged application (ie using MSIX).

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.9 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.9 - 200.8
Xamarin.Android100.9 - 100.14
Xamarin.iOS100.9 - 100.15
UWP100.9 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.