-
-
Notifications
You must be signed in to change notification settings - Fork 197
chore: fix console.log regression after introducing ios-sim async api #3722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (device.isEmulator) { | ||
return this.$iOSSimulatorLogProvider.startNewMutedLogProcess(device.deviceInfo.identifier); | ||
} | ||
|
||
return this.$iosDeviceOperations.startDeviceLog(device.deviceInfo.identifier); | ||
return Promise.resolve(this.$iosDeviceOperations.startDeviceLog(device.deviceInfo.identifier)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can make the method async and just return the this.$iosDeviceOperations.startDeviceLog(device.deviceInfo.identifier)
call here.
@@ -17,6 +17,6 @@ export class AndroidLiveSyncService extends PlatformLiveSyncServiceBase implemen | |||
return service; | |||
} | |||
|
|||
public prepareForLiveSync(device: Mobile.IDevice, data: IProjectDir): void { /* */ } | |||
public prepareForLiveSync(device: Mobile.IDevice, data: IProjectDir): Promise<void> { return Promise.resolve(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking the method as async
would be enough, no need to return Promise.resolve()
@@ -66,9 +66,9 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I | |||
} | |||
} | |||
|
|||
public prepareForLiveSync(device: Mobile.IDevice, data: IProjectDir, liveSyncInfo: ILiveSyncInfo): void { | |||
public prepareForLiveSync(device: Mobile.IDevice, data: IProjectDir, liveSyncInfo: ILiveSyncInfo): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method must be marked as async
as in case skipWatcher is true, it will not return promise
69798e9
to
74f9d04
Compare
74f9d04
to
e1a436b
Compare
PR Checklist
What is the current behavior?
tns run ios
does not print the logs from iOS simulatorWhat is the new behavior?
tns run ios
prints the logs from iOS simulator