Table of Contents

Class NativeCalls

Interface for the native Swift plugin.

public static class NativeCalls
Inheritance
object
NativeCalls

Methods

umoth_appleid_auth_get_credential_state(string, GetCredentialStateCallback)

Returns the credential state for the given user in a completion handler.

public static extern void umoth_appleid_auth_get_credential_state(string userId, NativeCalls.GetCredentialStateCallback callback)

Parameters

userId string

An opaque string associated with the Apple ID that your app receives in the credential's user property after performing a successful authentication request.

callback NativeCalls.GetCredentialStateCallback

A block the method calls to report the state and an optional error condition.

umoth_appleid_auth_start_sign_in(byte, string?, string?, OnSignedInCallback, OnSignInFailedCallback)

Starts an AppleID Sign-In request.

public static extern bool umoth_appleid_auth_start_sign_in(byte requestScopes, string? nonce, string? state, NativeCalls.OnSignedInCallback onSignedInCallback, NativeCalls.OnSignInFailedCallback onSignInFailedCallback)

Parameters

requestScopes byte

The data scopes to request from the user.

nonce string

An optional nonce for the request.

state string

An optional state for the request which will be returned in the resulting ASAuthorizationAppleIDCredential.

onSignedInCallback NativeCalls.OnSignedInCallback

Success callback.

onSignInFailedCallback NativeCalls.OnSignInFailedCallback

Failure callback.

Returns

bool

If the request was executed successfully.

umoth_free_native_buffer(nint)

Frees up a buffer allocated from native code using Swift's UnsafeMutablePointer.allocate().

public static extern void umoth_free_native_buffer(nint ptr)

Parameters

ptr nint

The buffer to deallocate.

umoth_free_native_string(nint)

Frees up a string allocated from native code using strdup().

public static extern void umoth_free_native_string(nint ptr)

Parameters

ptr nint

The string to deallocate.