Skip to content

Commit c5e98bd

Browse files
Fix rebase issues
1 parent 0890acb commit c5e98bd

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

lib/device-sockets/ios/socket-request-executor.ts

+13-14
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,25 @@ export class IOSSocketRequestExecutor implements IiOSSocketRequestExecutor {
55
private $iOSNotification: IiOSNotification,
66
private $iOSNotificationService: IiOSNotificationService,
77
private $logger: ILogger,
8-
private $projectData: IProjectData,
9-
private $iosDeviceOperations: IIOSDeviceOperations) {
10-
this.$iosDeviceOperations.setShouldDispose(false);
11-
}
8+
private $iosDeviceOperations: IIOSDeviceOperations) {
9+
this.$iosDeviceOperations.setShouldDispose(false);
10+
}
1211

1312
public async executeAttachRequest(device: Mobile.IiOSDevice, timeout: number, projectId: string): Promise<void> {
1413
const deviceIdentifier = device.deviceInfo.identifier;
1514

1615
const observeNotificationSockets = [
17-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.alreadyConnected, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE),
18-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.readyForAttach, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE),
19-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.attachAvailable, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE)
16+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAlreadyConnected(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE),
17+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getReadyForAttach(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE),
18+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAttachAvailable(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE)
2019
];
2120

2221
const observeNotificationPromises = _.map(observeNotificationSockets, s => {
2322
return this.$iOSNotificationService.awaitNotification(deviceIdentifier, +s, timeout);
2423
});
2524

2625
// Trigger the notifications update.
27-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.attachAvailabilityQuery);
26+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAttachAvailabilityQuery(projectId));
2827

2928
let receivedNotification: string;
3029
try {
@@ -51,18 +50,18 @@ export class IOSSocketRequestExecutor implements IiOSSocketRequestExecutor {
5150

5251
public async executeLaunchRequest(deviceIdentifier: string, timeout: number, readyForAttachTimeout: number, projectId: string, shouldBreak?: boolean): Promise<void> {
5352
try {
54-
const appLaunchingSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.appLaunching, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
53+
const appLaunchingSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAppLaunching(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
5554
await this.$iOSNotificationService.awaitNotification(deviceIdentifier, +appLaunchingSocket, timeout);
5655

57-
if (shouldBreak) {
56+
if (shouldBreak) {
5857
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getWaitForDebug(projectId), constants.IOS_POST_NOTIFICATION_COMMAND_TYPE);
5958
}
6059

6160
// We need to send the ObserveNotification ReadyForAttach before we post the AttachRequest.
62-
const readyForAttachSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.readyForAttach, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
61+
const readyForAttachSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getReadyForAttach(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
6362
const readyForAttachPromise = this.$iOSNotificationService.awaitNotification(deviceIdentifier, +readyForAttachSocket, readyForAttachTimeout);
6463

65-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.attachRequest);
64+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAttachRequest(projectId));
6665
await readyForAttachPromise;
6766
} catch (e) {
6867
this.$logger.trace("Launch request error:");
@@ -75,9 +74,9 @@ export class IOSSocketRequestExecutor implements IiOSSocketRequestExecutor {
7574
try {
7675
// We should create this promise here because we need to send the ObserveNotification on the device
7776
// before we send the PostNotification.
78-
const readyForAttachSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.readyForAttach, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
77+
const readyForAttachSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getReadyForAttach(projectId), constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
7978
const readyForAttachPromise = this.$iOSNotificationService.awaitNotification(deviceIdentifier, +readyForAttachSocket, timeout);
80-
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.attachRequest);
79+
await this.$iOSNotificationService.postNotification(deviceIdentifier, this.$iOSNotification.getAttachRequest(projectId));
8180
await readyForAttachPromise;
8281
} catch (e) {
8382
this.$errors.failWithoutHelp(`The application ${projectId} timed out when performing the socket handshake.`);

0 commit comments

Comments
 (0)