One Logo Pool Ball
ManagedApp · IOS API REFERENCE

ManagedAppIdentitiesProvider

class · iOS 18.4+ · SDK 27.1

class ManagedAppIdentitiesProvider

A class that provides identities that an MDM admin provisions for a managed app or extension. Create an instance of this class when your app needs to access identities that the MDM admin provisions for your app from their MDM server.

Members (3)

get · iOS 18.4+

identifiers

TypeScript
get identifiers(): Promise<SDKHandle>
Swift declaration
var identifiers: some AsyncSequence<Array<String>, Never> { get async }

An asynchronous sequence of arrays of identity identifiers provided by the MDM server. Use ``ManagedAppIdentitiesProvider/identity(withIdentifier:)`` to look up an identifier to obtain the associated identity. The sequence yields an array of identifiers when: * You begin iterating this property using `for await`. * The list of identity identifiers changes. * The value of one or more identities changes. You define the values of the identifiers that an MDM admin can use. Define specific individual values or ranges of values to group identities, or use the configuration to determine the meaning of the identifiers. This property yields an empty array if the MDM admin hasn't provisioned any identities for your app.

method · iOS 18.4+

identity

TypeScript
identity(identifier: string): Promise<_Security_SecIdentity>
Swift declaration
func identity(withIdentifier identifier: String) async throws(ManagedAppError) -> SecIdentity

Provides an identity by its identifier. The MDM server can update the identity at any time. After that, ``ManagedAppIdentitiesProvider/identifiers`` yields a new array of identifiers. Call this method again to obtain the updated identity. The MDM server can change the available identities at any time. When that happens, the list of valid identifiers updates accordingly. For example, the list of valid identifiers might change between the time that the app accesses ``ManagedAppIdentitiesProvider/identifiers`` and then calls this method passing in one of its elements. So, the app needs to handle the case that this method throws ``ManagedAppError/invalidIdentifier``. When using identities in your app, observe the following caveats: * Avoid putting identities in a file, database, or in the keychain. Storing an identity might not work as intended, for example, you're unable to retrieve a hardware-bound key after putting it in the keychain. * <doc://com.apple.documentation/documentation/security/secidentity> references underlying keychain data that can disappear if the MDM admin removes the identity at runtime. Call this function as needed for a fresh reference rather than holding on to the result of a prior call for an extended period of time. * For security reasons, avoid logging or displaying the identity's certificate or private key. Even though the certificate is a "public" certificate, it can contain sensitive information. - Parameter identifier: The identifier of the requested identity. This function throws ``ManagedAppError/invalidIdentifier`` if the value you supply isn't currently in ``ManagedAppIdentitiesProvider/identifiers``. - Returns: The requested identity. - Throws: ``ManagedAppError/invalidIdentifier`` if no identity exists with the specified identifier.

init · iOS 18.4+

init

TypeScript
static init(): ManagedAppIdentitiesProvider
Swift declaration
init()

Initializes an identities provider.

Skipped declarations

No declarations were skipped in this snapshot.

All ManagedApp types →