AppResponder

@MainActor
open class AppResponder : UIResponder, UIApplicationDelegate

AppDelegate基类

  • 应用主delegate

    Declaration

    Swift

    @MainActor
    public class var shared: `Self`! { get }

Override

  • 初始化应用环境,优先级1,willFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupEnvironment()
  • 初始化应用配置,优先级2,didFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupApplication(_ application: UIApplication, options: [UIApplication.LaunchOptionsKey : Any]? = nil)
  • 初始化应用服务,优先级3,didFinishLaunching子模块之后调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupService(options: [UIApplication.LaunchOptionsKey : Any]? = nil)
  • 场景已连接,优先级4,场景window及根控制器创建完成后自动调用

    Declaration

    Swift

    @MainActor
    open func sceneDidConnect(_ windowScene: UIWindowScene)
  • 场景已断开,场景断开连接时自动调用

    Declaration

    Swift

    @MainActor
    open func sceneDidDisconnect(_ windowScene: UIWindowScene)

UIApplicationDelegate

UIScene

  • Undocumented

    Declaration

    Swift

    @MainActor
    open func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration
  • Undocumented

    Declaration

    Swift

    @MainActor
    open func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>)

Notification

URL

  • Undocumented

    Declaration

    Swift

    @discardableResult
    @MainActor
    open func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
  • Undocumented

    Declaration

    Swift

    @discardableResult
    @MainActor
    open func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool