ModuleProtocol

@MainActor
public protocol ModuleProtocol : UIApplicationDelegate

业务模块协议,各业务必须实现

  • 单例对象

    Declaration

    Swift

    nonisolated static var shared: Self { get }
  • priority() Default implementation

    模块优先级,0最低。默认为default优先级

    Default Implementation

    默认优先级default

    Declaration

    Swift

    nonisolated static func priority() -> ModulePriority
  • setup() Default implementation

    模块初始化方法,setupAllModules自动主线程调用

    Default Implementation

    默认初始化不处理

    Declaration

    Swift

    @MainActor
    func setup()

Available where Self: NSObject

  • shared Default implementation

    Default Implementation

    默认实现NSObject单例对象

    Declaration

    Swift

    public nonisolated static var shared: Self { get }