Class NativeCalls
- Namespace
- Uralstech.UMoth.AppleIdSignIn.Native
Interface for the native Swift plugin.
public static class NativeCalls
- Inheritance
-
objectNativeCalls
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
stringAn 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.GetCredentialStateCallbackA 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
byteThe data scopes to request from the user.
nonce
stringAn optional nonce for the request.
state
stringAn optional state for the request which will be returned in the resulting ASAuthorizationAppleIDCredential.
onSignedInCallback
NativeCalls.OnSignedInCallbackSuccess callback.
onSignInFailedCallback
NativeCalls.OnSignInFailedCallbackFailure 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
nintThe 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
nintThe string to deallocate.