Skip to content

Commit 62490b2

Browse files
Fix nonisolated errors for auth and appcheck
1 parent a85abbf commit 62490b2

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

Sources/DataConnect.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,10 @@ public class DataConnect {
8383
fatalError("Firebase DataConnect requires the projectID to be set in the app options")
8484
}
8585

86-
let auth = Auth.auth(app: app)
87-
nonisolated(unsafe) let appCheck = AppCheck.appCheck(app: app)
8886
grpcClient = GrpcClient(
8987
app: app,
9088
settings: settings,
9189
connectorConfig: connectorConfig,
92-
auth: auth,
93-
appCheck: appCheck,
9490
callerSDKType: callerSDKType
9591
)
9692

@@ -111,14 +107,10 @@ public class DataConnect {
111107
self.connectorConfig = connectorConfig
112108
self.callerSDKType = callerSDKType
113109

114-
let auth = Auth.auth(app: app)
115-
nonisolated(unsafe) let appCheck = AppCheck.appCheck(app: app)
116110
grpcClient = GrpcClient(
117111
app: self.app,
118112
settings: settings,
119113
connectorConfig: connectorConfig,
120-
auth: auth,
121-
appCheck: appCheck,
122114
callerSDKType: self.callerSDKType
123115
)
124116
operationsManager = OperationsManager(grpcClient: grpcClient)

Sources/Internal/GrpcClient.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ actor GrpcClient: CustomStringConvertible {
108108
}()
109109

110110
init(app: FirebaseApp, settings: DataConnectSettings, connectorConfig: ConnectorConfig,
111-
auth: Auth,
112-
appCheck: AppCheck?,
113111
callerSDKType: CallerSDKType) {
114112
self.app = app
115113

@@ -120,8 +118,8 @@ actor GrpcClient: CustomStringConvertible {
120118

121119
serverSettings = settings
122120
self.connectorConfig = connectorConfig
123-
self.auth = auth
124-
self.appCheck = appCheck
121+
auth = Auth.auth(app: app)
122+
appCheck = AppCheck.appCheck(app: app)
125123
self.callerSDKType = callerSDKType
126124

127125
connectorName =

Sources/Scalars/AnyValue.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ extension AnyValue: Hashable {
6262
hasher.combine(value)
6363
}
6464
}
65+
66+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
67+
extension AnyValue: Sendable {}

Sources/Scalars/LocalDate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Foundation
2020
Essentially represents: https://the-guild.dev/graphql/scalars/docs/scalars/local-date
2121
*/
2222
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
23-
public struct LocalDate: Codable, Equatable, Comparable, CustomStringConvertible {
23+
public struct LocalDate: Codable, Comparable, CustomStringConvertible, Equatable, Sendable {
2424
private var calendar = Calendar(identifier: .gregorian)
2525
private var dateFormatter = DateFormatter()
2626
private var date = Date()

0 commit comments

Comments
 (0)