feat:devkit connect directly

This commit is contained in:
pengfei.zhou
2020-03-28 10:41:13 +08:00
committed by osborn
parent e7ddcd1b67
commit 2f0f0494df
2 changed files with 4 additions and 32 deletions

View File

@@ -8,7 +8,7 @@
#import <DoricCore/Doric.h>
#import <DoricDevkit/DoricDevViewController.h>
#import <DoricDevkit/DoricDev.h>
#import "ViewController.h"
@@ -68,17 +68,7 @@ - (BOOL)isSimulator {
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 0) {
NSString *file = @"Snake.js";
DoricViewController *doricViewController = [[DoricViewController alloc]
initWithSource:[NSString stringWithFormat:@"assets://src/%@", file]
alias:file
extra:nil
];
[self.navigationController pushViewController:doricViewController animated:NO];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.navigationController pushViewController:[DoricDevViewController new] animated:NO];
}
);
[[DoricDev instance] openDevMode];
return;
}
NSString *file = self.demoFilePaths[(NSUInteger) indexPath.row];