One Logo Pool Ball
ManagedApp · IOS API REFERENCE

ManagedAppCertificatesProvider

class · iOS 18.4+ · SDK 27.1

class ManagedAppCertificatesProvider

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

Members (3)

method · iOS 18.4+

certificate

TypeScript
certificate(identifier: string): Promise<_Security_SecCertificate>
Swift declaration
func certificate(withIdentifier identifier: String) async throws(ManagedAppError) -> SecCertificate

Provides a certificate by its identifier. The MDM server can update the certificate at any time. After that, ``ManagedAppIdentitiesProvider/identifiers`` yields a new array of identifiers. Call this method again to obtain the updated certificate. The MDM server can change the available certificates 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``. - Important: Avoid storing the certificate and instead, call this method whenever the app needs the certificate. For security reasons, avoid logging or displaying the certificate. Even though the certificate is a "public" certificate, it can contain sensitive information. - Parameter identifier: The identifier of the requested certificate. This function throws ``ManagedAppError/invalidIdentifier`` if the value you supply isn't currently in ``ManagedAppIdentitiesProvider/identifiers``. - Returns: The requested certificate - Throws: ``ManagedAppError/invalidIdentifier`` if no certificate exists with the specified identifier.

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 certificate identifiers provided by the MDM server. Use ``ManagedAppCertificatesProvider/certificate(withIdentifier:)`` to look up an identifier to obtain the associated certificate. The sequence yields an array of identifiers when: * You begin iterating this property using `for await`. * The list of certificate identifiers changes. * The value of one or more certificates changes. You define the values of the identifiers that an MDM admin can use. Define specific individual values or ranges of values to group certificates, 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 certificates for your app.

init · iOS 18.4+

init

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

Initializes a managed app certificates provider.

Skipped declarations

No declarations were skipped in this snapshot.

All ManagedApp types →