ThimraTV/MoviaBox/AppDelegate/AppDelegate+OpenApp.swift
2025-05-06 15:09:27 +08:00

39 lines
911 B
Swift

//
// AppDelegate+OpenApp.swift
// MoviaBox
//
// Created by on 2025/4/25.
//
import UIKit
#if canImport(FacebookCore)
import FacebookCore
#endif
extension SceneDelegate {
///URLAPP
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else {
return
}
#if canImport(FacebookCore)
ApplicationDelegate.shared.application(UIApplication.shared, open: url, sourceApplication: nil, annotation: [UIApplication.OpenURLOptionsKey.annotation])
#endif
}
///UniversalLink app
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
guard let webpageURL = userActivity.webpageURL else { return }
guard let query = webpageURL.query else { return }
spLog(message: query)
}
}