Vernissage/Vernissage/SceneDelegate.swift

22 lines
539 B
Swift
Raw Normal View History

2022-12-31 16:31:05 +01:00
//
// https://mczachurski.dev
// Copyright © 2022 Marcin Czachurski and the repository contributors.
// Licensed under the MIT License.
//
import SwiftUI
2023-01-10 08:04:25 +01:00
import MastodonKit
2022-12-31 16:31:05 +01:00
import OAuthSwift
2023-01-12 18:34:48 +01:00
class SceneDelegate: NSObject, UISceneDelegate {
2022-12-31 16:31:05 +01:00
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
2023-01-29 19:11:44 +01:00
guard let url = URLContexts.first?.url else {
return
}
if url.host == AppConstants.oauthCallbackPart {
OAuthSwift.handle(url: url)
}
2022-12-31 16:31:05 +01:00
}
}