Skip to content

Conversation

@Fatme
Copy link
Contributor

@Fatme Fatme commented Oct 22, 2018

AppLaunching notification is sent only once by runtime during application start. {N} CLI has a logic to retry to attach to debugger if the first attempt is not successful. If the retry logic is executed e.g. application is already running, {N} CLI should not await for AppLaunching request as it'll never receive it.

PR Checklist

What is the current behavior?

tns debug ios does not work with bigger projects (master-detail-ng) on slower devices.

What is the new behavior?

tns debug ios works with bigger projects (master-detail-ng) on slower devices.

Refs: #4046

@Fatme Fatme changed the base branch from master to release-5.0.1 October 22, 2018 13:16
// In case app is already running, we'll fail here as we'll not receive it.
const appLaunchingNotification = this.$iOSNotification.getAppLaunching(projectId);
const appLaunchingSocket = await this.$iOSNotificationService.postNotification(deviceIdentifier, appLaunchingNotification, constants.IOS_OBSERVE_NOTIFICATION_COMMAND_TYPE);
await this.$iOSNotificationService.awaitNotification(deviceIdentifier, +appLaunchingSocket, timeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+appLaunchingSocket looks a bit strange, because this.$iOSNotificationService.postNotification should return a number according to the interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree, but I just moved this code and prefer not changing it.

@Fatme Fatme force-pushed the fatme/fix-ios-debug branch from 855eb87 to bea46f8 Compare October 23, 2018 07:29
@Fatme Fatme force-pushed the fatme/fix-ios-debug branch from bea46f8 to 7aa67a2 Compare October 24, 2018 09:36
@Fatme Fatme added this to the 5.0.1 milestone Oct 24, 2018
@Fatme Fatme merged commit 3527ef2 into release-5.0.1 Oct 24, 2018
@Fatme Fatme deleted the fatme/fix-ios-debug branch October 24, 2018 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants