Skip to content

Commit 5bca202

Browse files
authored
chore: replaces deprecated class reserved word with AnyObject (#1293) (#1294)
1 parent a13fb6e commit 5bca202

File tree

23 files changed

+23
-23
lines changed

23 files changed

+23
-23
lines changed

Amplify/Categories/API/ClientBehavior/APICategoryGraphQLBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
/// Behavior of the API category related to GraphQL operations
9-
public protocol APICategoryGraphQLBehavior: class {
9+
public protocol APICategoryGraphQLBehavior: AnyObject {
1010

1111
// MARK: - Request-based GraphQL Operations
1212

Amplify/Categories/Auth/AuthCategoryDeviceBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public protocol AuthCategoryDeviceBehavior: class {
10+
public protocol AuthCategoryDeviceBehavior: AnyObject {
1111

1212
/// Fetch devices assigned to the current device
1313
/// - Parameters:

Amplify/Categories/Auth/AuthCategoryUserBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
public protocol AuthCategoryUserBehavior: class {
10+
public protocol AuthCategoryUserBehavior: AnyObject {
1111

1212
/// Returns the currently logged in user.
1313
///

Amplify/Core/Category/Category.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/// An Amplify Category stores certain global states, holds references to plugins for the category, and routes method
99
/// requests to those plugins appropriately.
10-
public protocol Category: class, CategoryTypeable, DefaultLogger {
10+
public protocol Category: AnyObject, CategoryTypeable, DefaultLogger {
1111

1212
// NOTE: `add(plugin:)` and `getPlugin(for key:)` must be implemented in the actual category classes, since they
1313
// operate on specific plugin types

Amplify/Core/Configuration/Internal/CategoryConfigurable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8-
protocol CategoryConfigurable: class, CategoryTypeable {
8+
protocol CategoryConfigurable: AnyObject, CategoryTypeable {
99

1010
/// true if the category has already been configured
1111
var isConfigured: Bool { get }

Amplify/DefaultPlugins/AWSHubPlugin/Internal/HubChannelDispatcher.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension HubChannelDispatcher: HubDispatchOperationDelegate {
7777
}
7878
}
7979

80-
protocol HubDispatchOperationDelegate: class {
80+
protocol HubDispatchOperationDelegate: AnyObject {
8181
/// Used to let a dispatch operation retrieve the list of listeners at the time of invocation, rather than the time
8282
/// of queuing.
8383
var listeners: [FilteredListener] { get }

AmplifyPlugins/API/AWSAPICategoryPlugin/Reachability/NetworkReachability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public protocol NetworkReachabilityProvidingFactory {
1515
}
1616

1717
/// Wraps methods and properties of Reachability
18-
public protocol NetworkReachabilityProviding: class {
18+
public protocol NetworkReachabilityProviding: AnyObject {
1919
/// If `true`, device can attempt to reach the host using a cellular connection (WAN). If `false`, host is only
2020
/// considered reachable if it can be accessed via WiFi
2121
var allowsCellularConnection: Bool { get set }

AmplifyPlugins/API/AWSAPICategoryPlugin/URLSessionBehavior/URLSessionBehaviorDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Defines URLSession behaviors used during fulfillment of API tasks
11-
public protocol URLSessionBehaviorDelegate: class {
11+
public protocol URLSessionBehaviorDelegate: AnyObject {
1212
func urlSessionBehavior(_ session: URLSessionBehavior,
1313
dataTaskBehavior: URLSessionDataTaskBehavior,
1414
didCompleteWithError error: Error?)

AmplifyPlugins/Auth/AWSCognitoAuthPlugin/Dependency/AuthUserServiceBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typealias ConfirmAttributeCompletion = (Result<Void, AuthError>) -> Void
2222

2323
typealias ChangePasswordCompletion = (Result<Void, AuthError>) -> Void
2424

25-
protocol AuthUserServiceBehavior: class {
25+
protocol AuthUserServiceBehavior: AnyObject {
2626

2727
func fetchAttributes(request: AuthFetchUserAttributesRequest,
2828
completionHandler: @escaping FetchUserAttributesCompletion)

AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthServiceBehavior.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import AWSCore
99
import Amplify
1010

11-
public protocol AWSAuthServiceBehavior: class {
11+
public protocol AWSAuthServiceBehavior: AnyObject {
1212

1313
func getCredentialsProvider() -> AWSCredentialsProvider
1414

0 commit comments

Comments
 (0)