This repository was archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Remove ios native dependencies #889
Merged
TsvetanMilanov
merged 8 commits into
master
from
milanov/remove-ios-native-dependencies
Mar 14, 2017
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f86c7de
Remove ios native dependencies
TsvetanMilanov e57f215
Fix PR comments
TsvetanMilanov d0498b5
Update ios-device-lib bersion
TsvetanMilanov e92b8c5
Change the notification logic
TsvetanMilanov 741a91d
Override net.Socket write method
TsvetanMilanov 6fd98a6
Add receive message from ios device socket logic
TsvetanMilanov cfd19f2
Fix tns debug ios issues
TsvetanMilanov 32ecf38
Update ios-device-lib-version
TsvetanMilanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
export class GetFileCommand implements ICommand { | ||
constructor(private $devicesService: Mobile.IDevicesService, | ||
private $stringParameter: ICommandParameter, | ||
private $project: Project.IProjectBase, | ||
private $errors: IErrors, | ||
private $options: ICommonOptions) { } | ||
|
||
allowedParameters: ICommandParameter[] = [this.$stringParameter]; | ||
public allowedParameters: ICommandParameter[] = [this.$stringParameter, this.$stringParameter]; | ||
|
||
public async execute(args: string[]): Promise<void> { | ||
await this.$devicesService.initialize({ deviceId: this.$options.device, skipInferPlatform: true }); | ||
let appIdentifier = args[1]; | ||
|
||
let action = (device: Mobile.IDevice) => device.fileSystem.getFile(args[0], this.$options.file); | ||
if (!appIdentifier && !this.$project.projectData) { | ||
this.$errors.failWithoutHelp("Please enter application identifier or execute this command in project."); | ||
} | ||
|
||
appIdentifier = appIdentifier || this.$project.projectData.AppIdentifier; | ||
|
||
let action = (device: Mobile.IDevice) => device.fileSystem.getFile(args[0], appIdentifier, this.$options.file); | ||
await this.$devicesService.execute(action); | ||
} | ||
} | ||
|
||
$injector.registerCommand("device|get-file", GetFileCommand); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
export class ListFilesCommand implements ICommand { | ||
constructor(private $devicesService: Mobile.IDevicesService, | ||
private $stringParameter: ICommandParameter, | ||
private $options: ICommonOptions) { } | ||
private $options: ICommonOptions, | ||
private $project: Project.IProjectBase, | ||
private $errors: IErrors) { } | ||
|
||
allowedParameters: ICommandParameter[] = [this.$stringParameter]; | ||
public allowedParameters: ICommandParameter[] = [this.$stringParameter, this.$stringParameter]; | ||
|
||
public async execute(args: string[]): Promise<void> { | ||
await this.$devicesService.initialize({ deviceId: this.$options.device, skipInferPlatform: true }); | ||
const pathToList = args[0]; | ||
let appIdentifier = args[1]; | ||
|
||
let action = (device: Mobile.IDevice) => device.fileSystem.listFiles(args[0]); | ||
if (!appIdentifier && !this.$project.projectData) { | ||
this.$errors.failWithoutHelp("Please enter application identifier or execute this command in project."); | ||
} | ||
|
||
appIdentifier = appIdentifier || this.$project.projectData.AppIdentifier; | ||
|
||
let action = (device: Mobile.IDevice) => device.fileSystem.listFiles(pathToList, appIdentifier); | ||
await this.$devicesService.execute(action); | ||
} | ||
} | ||
|
||
$injector.registerCommand("device|list-files", ListFilesCommand); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
as we modify the command, shouldn't we delete the
$options.app
that has been used before (not in the command itself, but in the service behind it. If I understand correctly, we'll support getting of file only from application sandbox, so the$options.app
is a mandatory argument now. So... let's remove$options.app