Impressia/Vernissage/SceneDelegate.swift

22 lines
539 B
Swift

//
// https://mczachurski.dev
// Copyright © 2022 Marcin Czachurski and the repository contributors.
// Licensed under the MIT License.
//
import SwiftUI
import MastodonKit
import OAuthSwift
class SceneDelegate: NSObject, UISceneDelegate {
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else {
return
}
if url.host == AppConstants.oauthCallbackPart {
OAuthSwift.handle(url: url)
}
}
}