App
-
Login to a user for the Realm app.
Declaration
Swift
@preconcurrency func login(credentials: Credentials, _ completion: @Sendable @escaping (Result<User, Error>) -> Void)Parameters
credentialsThe credentials identifying the user.
completionA callback invoked after completion. Will return
Result.success(User)orResult.failure(Error). -
Login to a user for the Realm app. @param credentials The credentials identifying the user. @returns A publisher that eventually return
UserorError.Declaration
Swift
@available(macOS 10.15, watchOS 6.0, iOS 13.0, tvOS 13.0, *) func login(credentials: Credentials) -> Future<User, Error> -
login(credentials:Asynchronous) Login to a user for the Realm app. @param credentials The credentials identifying the user. @returns A publisher that eventually return
UserorError.Declaration
Swift
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func login(credentials: Credentials) async throws -> User -
Sets the ASAuthorizationControllerDelegate to be handled by
AppUsage:
let app = App(id: "my-app-id") let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() request.requestedScopes = [.fullName, .email] let authorizationController = ASAuthorizationController(authorizationRequests: [request]) app.setASAuthorizationControllerDelegate(controller: authorizationController) authorizationController.presentationContextProvider = self authorizationController.performRequests()Declaration
Swift
public func setASAuthorizationControllerDelegate(for controller: ASAuthorizationController)Parameters
controllerThe ASAuthorizationController in which you want
Appto consume its delegate. -
A publisher that emits Void each time the app changes.
Despite the name, this actually emits after the app has changed.
Declaration
Swift
public var objectWillChange: AppPublisher { get }
View on GitHub
Install in Dash