@@ -15,7 +15,7 @@ extension SimulatorControlService {
1515 coordinate: SimulatorLocationCoordinate
1616 ) async throws {
1717 let previousRoute = activeLocationRoutes [ deviceID]
18- let token = await beginLocationOperation ( deviceID: deviceID)
18+ let token = try await beginLocationOperation ( deviceID: deviceID)
1919 do {
2020 _ = try await output ( arguments: [
2121 " simctl " , " location " , deviceID, " set " , coordinateArgument ( coordinate) ,
@@ -40,7 +40,7 @@ extension SimulatorControlService {
4040
4141 private func clearLocationExclusively( deviceID: String ) async throws {
4242 let previousRoute = activeLocationRoutes [ deviceID]
43- let token = await beginLocationOperation ( deviceID: deviceID)
43+ let token = try await beginLocationOperation ( deviceID: deviceID)
4444 do {
4545 _ = try await output ( arguments: [ " simctl " , " location " , deviceID, " clear " ] )
4646 try await requireCurrentLocationOperation ( deviceID: deviceID, token: token)
@@ -73,7 +73,7 @@ extension SimulatorControlService {
7373 initialCoordinate: SimulatorLocationCoordinate
7474 ) async throws {
7575 let previousRoute = activeLocationRoutes [ deviceID]
76- let token = await beginLocationOperation ( deviceID: deviceID)
76+ let token = try await beginLocationOperation ( deviceID: deviceID)
7777 do {
7878 try await runLocationRouteCommand ( deviceID: deviceID, route: route)
7979 } catch {
@@ -528,9 +528,9 @@ extension SimulatorControlService {
528528 }
529529 }
530530
531- private func beginLocationOperation( deviceID: String ) async -> UUID {
531+ private func beginLocationOperation( deviceID: String ) async throws -> UUID {
532+ let token = try await locationOwnershipRegistry. claim ( deviceIdentifier: deviceID)
532533 cancelLocationLifecycle ( deviceID: deviceID)
533- let token = await locationOwnershipRegistry. claim ( deviceIdentifier: deviceID)
534534 locationRouteTokens [ deviceID] = token
535535 return token
536536 }
0 commit comments