-
-
Notifications
You must be signed in to change notification settings - Fork 197
Remove ios native dependencies #2495
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
Remove ios native dependencies #2495
Conversation
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.
Seems legit
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.
The title says: Remove ios native dependencies
However the PR just adds dependency in package.json. Shouldn't we actually delete the native dependencies from package.json?
4c05959
to
8893b67
Compare
8893b67
to
cfee565
Compare
|
||
npc.postNotificationAndAttachForData(this.$iOSNotification.attachRequest); | ||
}); | ||
// We should create these promises here beecause we need to send the ObserveNotification on the device |
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.
beecause -> because
try { | ||
await this.$iOSNotificationService.awaitNotification(npc, this.$iOSNotification.readyForAttach, timeout); | ||
// We should create this promise here beecause we need to send the ObserveNotification on the device |
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.
same as above
|
||
await this.$iOSNotificationService.awaitNotification(npc, this.$iOSNotification.readyForAttach, readyForAttachTimeout); | ||
await this.$iOSNotificationService.postNotificationAndAttachForData(deviceIdentifier, this.$iOSNotification.attachRequest); | ||
await Promise.all(promisesToWait); | ||
} catch (e) { | ||
this.$logger.trace(`Timeout error: ${e}`); |
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.
Is this really a timeout error now? Is it possible something else to fail?
|
||
await this.$iOSNotificationService.awaitNotification(npc, this.$iOSNotification.readyForAttach, readyForAttachTimeout); | ||
await this.$iOSNotificationService.postNotificationAndAttachForData(deviceIdentifier, this.$iOSNotification.attachRequest); | ||
await Promise.all(promisesToWait); |
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.
hm, is Promise.all
the correct method here. The order before was:
- appLaunching
- readyForAttach
- waitForDebug (optional)
- attachRequest
Now, with current code, it is:
- appLaunching, readyForAttach (simultaneously)
- waitForDebug
- attachRequest
Or even in some cases:
- waitForDebug
- attachRequest
- appLaunching, readyForAttach (simultaneously)
Can you elaborate why is the change of the order?
a0bed5e
to
12b0d08
Compare
We need to remove our native dependencies - ref and ffi because they are casuing problems with each version of NodeJS which has new version of V8 in it. We are using ref and ffi to communicate with iTunes and execute fs and application management operations on iOS devices. This operations are moved in new dependency - device-lib. The device lib has JavaScript wrapper which we use in the CLI. Everything in the ios device file system and ios device application manager is replaced with the exposed methods from the device lib.
d0b8154
to
3eb893a
Compare
4ebcb94
to
a170d90
Compare
Since we use the ios-device-lib to connect to the device backend port for debugging, the socket returned from the device can be used only in the ios-device lib. That's why we need to change the logic for creating the Node.js socket in the CLI. The ios-device-lib will expose the device socket on a specific port in the localhost. After we connect to the exposed socket we can continue to work like we used to.
a170d90
to
c9d03b1
Compare
84ed8ae
to
0280bd9
Compare
0280bd9
to
9e30d2b
Compare
We need to remove our native dependencies - ref and ffi because they are casuing problems with each version of NodeJS which has new version of V8 in it. We are using ref and ffi to communicate with iTunes and execute fs and application management operations on iOS devices. This operations are moved in new dependency - device-lib. The device lib has JavaScript wrapper which we use in the CLI. Everything in the ios device file system and ios device application manager is replaced with the exposed methods from the device lib.
Common lib reference: telerik/mobile-cli-lib#889