From 4e9077a88baa93500386cac3e2e0d0a7bff7ab9a Mon Sep 17 00:00:00 2001 From: Jiwoo Shin Date: Wed, 23 Jun 2021 16:35:30 +0900 Subject: [PATCH] Replace deprecated keyword 'class' to 'AnyObject' --- ios/RIBs/Classes/Builder.swift | 2 +- ios/RIBs/Classes/DI/Dependency.swift | 2 +- ios/RIBs/Classes/Interactor.swift | 2 +- ios/RIBs/Classes/Presenter.swift | 2 +- ios/RIBs/Classes/Router.swift | 2 +- ios/RIBs/Classes/ViewControllable.swift | 2 +- ios/RIBs/Classes/Worker/Worker.swift | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/RIBs/Classes/Builder.swift b/ios/RIBs/Classes/Builder.swift index 134cc9480..9f16e9d22 100644 --- a/ios/RIBs/Classes/Builder.swift +++ b/ios/RIBs/Classes/Builder.swift @@ -17,7 +17,7 @@ import Foundation /// The base builder protocol that all builders should conform to. -public protocol Buildable: class {} +public protocol Buildable: AnyObject {} /// Utility that instantiates a RIB and sets up its internal wirings. open class Builder: Buildable { diff --git a/ios/RIBs/Classes/DI/Dependency.swift b/ios/RIBs/Classes/DI/Dependency.swift index 4a65e988e..a45cc1712 100644 --- a/ios/RIBs/Classes/DI/Dependency.swift +++ b/ios/RIBs/Classes/DI/Dependency.swift @@ -20,7 +20,7 @@ import Foundation /// /// Subclasses should define a set of properties that are required by the module from the DI graph. A dependency is /// typically provided and satisfied by its immediate parent module. -public protocol Dependency: class {} +public protocol Dependency: AnyObject {} /// The special empty dependency. public protocol EmptyDependency: Dependency {} diff --git a/ios/RIBs/Classes/Interactor.swift b/ios/RIBs/Classes/Interactor.swift index baa41727d..c8733c57c 100644 --- a/ios/RIBs/Classes/Interactor.swift +++ b/ios/RIBs/Classes/Interactor.swift @@ -19,7 +19,7 @@ import RxSwift import UIKit /// Protocol defining the activeness of an interactor's scope. -public protocol InteractorScope: class { +public protocol InteractorScope: AnyObject { // The following properties must be declared in the base protocol, since `Router` internally invokes these methods. // In order to unit test router with a mock interactor, the mocked interactor first needs to conform to the custom diff --git a/ios/RIBs/Classes/Presenter.swift b/ios/RIBs/Classes/Presenter.swift index fd23f088c..edc1d4f77 100644 --- a/ios/RIBs/Classes/Presenter.swift +++ b/ios/RIBs/Classes/Presenter.swift @@ -17,7 +17,7 @@ import Foundation /// The base protocol for all `Presenter`s. -public protocol Presentable: class {} +public protocol Presentable: AnyObject {} /// The base class of all `Presenter`s. A `Presenter` translates business models into values the corresponding /// `ViewController` can consume and display. It also maps UI events to business logic method, invoked to diff --git a/ios/RIBs/Classes/Router.swift b/ios/RIBs/Classes/Router.swift index 8b376a2a1..de593d05e 100644 --- a/ios/RIBs/Classes/Router.swift +++ b/ios/RIBs/Classes/Router.swift @@ -24,7 +24,7 @@ public enum RouterLifecycle { } /// The scope of a `Router`, defining various lifecycles of a `Router`. -public protocol RouterScope: class { +public protocol RouterScope: AnyObject { /// An observable that emits values when the router scope reaches its corresponding life-cycle stages. This /// observable completes when the router scope is deallocated. diff --git a/ios/RIBs/Classes/ViewControllable.swift b/ios/RIBs/Classes/ViewControllable.swift index bc8ae54e4..0e27040b5 100644 --- a/ios/RIBs/Classes/ViewControllable.swift +++ b/ios/RIBs/Classes/ViewControllable.swift @@ -17,7 +17,7 @@ import UIKit /// Basic interface between a `Router` and the UIKit `UIViewController`. -public protocol ViewControllable: class { +public protocol ViewControllable: AnyObject { var uiviewController: UIViewController { get } } diff --git a/ios/RIBs/Classes/Worker/Worker.swift b/ios/RIBs/Classes/Worker/Worker.swift index 9933e1bf1..e8f4669dd 100644 --- a/ios/RIBs/Classes/Worker/Worker.swift +++ b/ios/RIBs/Classes/Worker/Worker.swift @@ -20,7 +20,7 @@ import RxSwift /// /// `Worker`s are always bound to an `Interactor`. A `Worker` can only start if its bound `Interactor` is active. /// It is stopped when its bound interactor is deactivated. -public protocol Working: class { +public protocol Working: AnyObject { /// Starts the `Worker`. ///