pbind 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 188a8efa18d88d36de925fe34667cd6274a872b0
4
- data.tar.gz: c389977bfa6c78eb268743e545d5bf816d5f799b
3
+ metadata.gz: d9a94bcb031c5d66f5604647869500bfacd9a60f
4
+ data.tar.gz: c38e22368baedb9de2f70f1a9ecd2beda916a971
5
5
  SHA512:
6
- metadata.gz: 288d8e612006eb685cd64803fbe732899480d983b5742e4df4bad4c32d4b654c53b3c225e2d266e24e6bb433bf3a284c89a68bf431303829de125673cdfc664c
7
- data.tar.gz: e9a1c3c49dd2f403bbc8363c1928ca75ba857c09a0837e3edf0736d80430d11ec05ac9c0122b1efe42944b2f66a64053fe628cfc646d31f133c45c106e0f9115
6
+ metadata.gz: baf0c17f1abe1af7194306e00118fa8b2cbd402d1c44b51fa0201e6c922af8c538d527806e86fd5e843958dd919ddc096262444215c313c0ee585282a03ea2ef
7
+ data.tar.gz: c2dedc53d31e946d05da7dc884e017842bc4c84f66c5a1be3c936a6d675e81ef8a52405b5e7e56585cf1b1a18d2359ceab8d1c478b6182a4e13c034efad0d766
@@ -1,5 +1,5 @@
1
1
  module Pbind
2
2
  # The version of the Pbind command line tool.
3
3
  #
4
- VERSION = '0.4.1'.freeze unless defined? Pbind::VERSION
4
+ VERSION = '0.6.2'.freeze unless defined? Pbind::VERSION
5
5
  end
@@ -6,9 +6,10 @@
6
6
  // Copyright © 2017 galen. All rights reserved.
7
7
  //
8
8
 
9
+ #import "PBLLOptions.h"
9
10
  #include <targetconditionals.h>
10
11
 
11
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
12
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
12
13
 
13
14
  #import <Foundation/Foundation.h>
14
15
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  #import "NSInputStream+Reader.h"
10
10
 
11
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
11
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
12
12
 
13
13
  @implementation NSInputStream (Reader)
14
14
 
@@ -5,9 +5,10 @@
5
5
  // Created by Galen Lin on 2016/12/9.
6
6
  //
7
7
 
8
+ #import "PBLLOptions.h"
8
9
  #include <targetconditionals.h>
9
10
 
10
- #if (DEBUG && TARGET_IPHONE_SIMULATOR)
11
+ #if (PBLIVE_ENABLED && TARGET_IPHONE_SIMULATOR)
11
12
 
12
13
  #import <Foundation/Foundation.h>
13
14
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  #import "PBDirectoryWatcher.h"
9
9
 
10
- #if (DEBUG && TARGET_IPHONE_SIMULATOR)
10
+ #if (PBLIVE_ENABLED && TARGET_IPHONE_SIMULATOR)
11
11
 
12
12
  #include <stdio.h>
13
13
  #include <string.h>
@@ -6,9 +6,10 @@
6
6
  // Copyright © 2017 galen. All rights reserved.
7
7
  //
8
8
 
9
+ #import "PBLLOptions.h"
9
10
  #include <targetconditionals.h>
10
11
 
11
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
12
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
12
13
 
13
14
  #import <UIKit/UIKit.h>
14
15
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  #import "PBLLInspector.h"
9
9
 
10
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
10
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
11
11
 
12
12
  #import "PBLLInspectorController.h"
13
13
  #import <Pbind/Pbind.h>
@@ -6,9 +6,10 @@
6
6
  // Copyright © 2017 galen. All rights reserved.
7
7
  //
8
8
 
9
+ #import "PBLLOptions.h"
9
10
  #include <targetconditionals.h>
10
11
 
11
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
12
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
12
13
 
13
14
  #import <UIKit/UIKit.h>
14
15
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  #import "PBLLInspectorController.h"
9
9
 
10
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
10
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
11
11
 
12
12
  #import "PBLLInspector.h"
13
13
  #import "PBLLRemoteWatcher.h"
@@ -0,0 +1,8 @@
1
+ //
2
+ // PBLLOptions.h
3
+ // Pbind
4
+ //
5
+ // Created by Galen Lin on 25/03/2017.
6
+ //
7
+
8
+ #define PBLIVE_ENABLED DEBUG
@@ -6,9 +6,10 @@
6
6
  // Copyright © 2017 galen. All rights reserved.
7
7
  //
8
8
 
9
+ #import "PBLLOptions.h"
9
10
  #include <targetconditionals.h>
10
11
 
11
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
12
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
12
13
 
13
14
  #import <Foundation/Foundation.h>
14
15
 
@@ -7,9 +7,10 @@
7
7
 
8
8
  #import "PBLLRemoteWatcher.h"
9
9
 
10
- #if (DEBUG && !(TARGET_IPHONE_SIMULATOR))
10
+ #if (PBLIVE_ENABLED && !(TARGET_IPHONE_SIMULATOR))
11
11
 
12
12
  #import "NSInputStream+Reader.h"
13
+ #import <UIKit/UIKit.h>
13
14
 
14
15
  @interface PBLLRemoteWatcher () <NSStreamDelegate>
15
16
  {
@@ -95,11 +96,20 @@
95
96
  NSLog(@"socket: %i, %@", (int)eventCode, aStream);
96
97
  switch (eventCode) {
97
98
  case NSStreamEventOpenCompleted:
98
-
99
99
  break;
100
100
  case NSStreamEventHasSpaceAvailable:
101
101
  if (aStream == outputStream) {
102
- streamOpened = YES;
102
+ if (!streamOpened) {
103
+ streamOpened = YES;
104
+
105
+ // Send connected message
106
+ NSString *osModel = [[UIDevice currentDevice] name];
107
+ NSString *osVersion = [[UIDevice currentDevice] systemVersion];
108
+ NSString *msg = [NSString stringWithFormat:@"[C]%@(%@)", osModel, osVersion];
109
+ NSData *msgData = [msg dataUsingEncoding:NSUTF8StringEncoding];
110
+ [outputStream write:[msgData bytes] maxLength:[msgData length]];
111
+ }
112
+
103
113
  if (apiReqData != nil) {
104
114
  [outputStream write:[apiReqData bytes] maxLength:[apiReqData length]];
105
115
  apiReqData = nil;
@@ -5,7 +5,8 @@
5
5
  // Created by Galen Lin on 2016/12/9.
6
6
  //
7
7
 
8
- #if (DEBUG)
8
+ #import "PBLLOptions.h"
9
+ #if (PBLIVE_ENABLED)
9
10
 
10
11
  #import <Foundation/Foundation.h>
11
12
 
@@ -6,10 +6,10 @@
6
6
  //
7
7
 
8
8
  #import "PBLiveLoader.h"
9
- #include <targetconditionals.h>
10
9
 
11
- #if (DEBUG)
10
+ #if (PBLIVE_ENABLED)
12
11
 
12
+ #include <targetconditionals.h>
13
13
  #import "PBDirectoryWatcher.h"
14
14
  #import <Pbind/Pbind.h>
15
15
 
@@ -5,7 +5,9 @@
5
5
  // Created by Galen Lin on 13/03/2017.
6
6
  //
7
7
 
8
- #if (DEBUG)
8
+ #import "PBLLOptions.h"
9
+
10
+ #if (PBLIVE_ENABLED)
9
11
 
10
12
  #include <targetconditionals.h>
11
13
  #import <Foundation/Foundation.h>
@@ -22,7 +24,7 @@ FOUNDATION_STATIC_INLINE NSString *PBLLMainBundlePath() {
22
24
  if ([[NSFileManager defaultManager] fileExistsAtPath:bundlePath]) {
23
25
  return bundlePath;
24
26
  }
25
-
27
+
26
28
  NSArray *subdirs = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:projectPath error:nil];
27
29
  for (NSString *subdir in subdirs) {
28
30
  bundlePath = [projectPath stringByAppendingPathComponent:subdir];
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pbind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Galen Lin
@@ -87,6 +87,7 @@ files:
87
87
  - source/PBLiveLoader/PBLLInspector.m
88
88
  - source/PBLiveLoader/PBLLInspectorController.h
89
89
  - source/PBLiveLoader/PBLLInspectorController.m
90
+ - source/PBLiveLoader/PBLLOptions.h
90
91
  - source/PBLiveLoader/PBLLRemoteWatcher.h
91
92
  - source/PBLiveLoader/PBLLRemoteWatcher.m
92
93
  - source/PBLiveLoader/PBLiveLoader.h