iOS Websocket

This commit is contained in:
pengfei.zhou
2019-08-14 10:08:33 +08:00
parent ba2a90a6c1
commit 0fa9c86ef8
9 changed files with 116 additions and 3 deletions

View File

@@ -24,9 +24,10 @@ - (void)viewDidLoad {
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Snake" ofType:@"js"];
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"Snake"];
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"test.js"];
self.doricContext.rootNode.view = self.view;
[self.doricContext initContextWithWidth:self.view.width height:self.view.height];
[self.doricContext.driver connectDevKit:@"ws://192.168.11.38:7777"];
}