Contents

saveRight(_:identifier:secret:completion:)

Saves a right to a persistent store along with secret data you supply.

Declaration

func saveRight(_ right: LARight, identifier: String, secret: Data, completion handler: @escaping  @Sendable (LAPersistedRight?, (any Error)?) -> Void)
func saveRight(_ right: LARight, identifier: String, secret: Data) async throws -> LAPersistedRight

Parameters

  • right:

    The right to store.

  • identifier:

    A unique identifier for the right.

  • secret:

    Secret data that’s stored with the right.

  • handler:

    A completion handler to call when the save operation completes.

    right

    The persisted form of the right that the save operation stores.

    error

    An error object that indicates why the right parameter is nil, or nil if the right parameter is non-nil.

Discussion

See Also

Storing rights