mirror of
https://github.com/status-im/react-native-tcp.git
synced 2025-02-21 06:38:06 +00:00
Merge pull request #25 from PeelTechnologies/streams
Fixes #24 stream compatibility udpates
This commit is contained in:
commit
f6a65339b8
25
README.md
25
README.md
@ -19,7 +19,22 @@ npm install --save react-native-tcp
|
|||||||
react-native link react-native-tcp
|
react-native link react-native-tcp
|
||||||
```
|
```
|
||||||
|
|
||||||
***Step 3 Profit***
|
## Additional dependencies
|
||||||
|
|
||||||
|
### Due to limitations in the react-native packager, streams need to be hacked in with [rn-nodeify](https://www.npmjs.com/package/rn-nodeify)
|
||||||
|
|
||||||
|
1. install rn-nodeify as a dev-dependency
|
||||||
|
```
|
||||||
|
npm install --save-dev rn-nodeify
|
||||||
|
```
|
||||||
|
2. run rn-nodeify manually
|
||||||
|
```
|
||||||
|
rn-nodeify --install stream,process,util --hack
|
||||||
|
```
|
||||||
|
3. optionally you can add this as a postinstall script
|
||||||
|
```
|
||||||
|
"postinstall": "rn-nodeify --install stream,process,util --hack"
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -59,14 +74,6 @@ client.on('data', function(data) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### Note
|
|
||||||
|
|
||||||
If you want to send and receive node Buffer objects, you'll have to "npm install buffer" and set it as a global for TcpSockets to pick it up:
|
|
||||||
|
|
||||||
```js
|
|
||||||
global.Buffer = global.Buffer || require('buffer').Buffer
|
|
||||||
```
|
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
|
|
||||||
add select tests from node's tests for net
|
add select tests from node's tests for net
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
# Ignore unexpected extra @providesModule
|
# Ignore unexpected extra @providesModule
|
||||||
.*/node_modules/commoner/test/source/widget/share.js
|
.*/node_modules/commoner/test/source/widget/share.js
|
||||||
|
.*/node_modules/.*/node_modules/fbjs/.*
|
||||||
|
|
||||||
# Ignore duplicate module providers
|
# Ignore duplicate module providers
|
||||||
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
|
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
|
||||||
@ -48,11 +49,11 @@ suppress_type=$FlowIssue
|
|||||||
suppress_type=$FlowFixMe
|
suppress_type=$FlowFixMe
|
||||||
suppress_type=$FixMe
|
suppress_type=$FixMe
|
||||||
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||||
|
|
||||||
unsafe.enable_getters_and_setters=true
|
unsafe.enable_getters_and_setters=true
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
^0.32.0
|
^0.33.0
|
||||||
|
2
examples/rctsockets/.gitignore
vendored
2
examples/rctsockets/.gitignore
vendored
@ -38,4 +38,4 @@ npm-debug.log
|
|||||||
buck-out/
|
buck-out/
|
||||||
\.buckd/
|
\.buckd/
|
||||||
android/app/libs
|
android/app/libs
|
||||||
android/keystores/debug.keystore
|
*.keystore
|
||||||
|
@ -9,6 +9,7 @@ import com.facebook.react.ReactInstanceManager;
|
|||||||
import com.facebook.react.ReactNativeHost;
|
import com.facebook.react.ReactNativeHost;
|
||||||
import com.facebook.react.ReactPackage;
|
import com.facebook.react.ReactPackage;
|
||||||
import com.facebook.react.shell.MainReactPackage;
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -34,4 +35,10 @@ public class MainApplication extends Application implements ReactApplication {
|
|||||||
public ReactNativeHost getReactNativeHost() {
|
public ReactNativeHost getReactNativeHost() {
|
||||||
return mReactNativeHost;
|
return mReactNativeHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
SoLoader.init(this, /* native exopackage */ false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* https://github.com/facebook/react-native
|
* https://github.com/facebook/react-native
|
||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
|
import './shim';
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {
|
import {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* https://github.com/facebook/react-native
|
* https://github.com/facebook/react-native
|
||||||
* @flow
|
* @flow
|
||||||
*/
|
*/
|
||||||
|
import './shim';
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {
|
import {
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||||
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||||
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||||
|
38C3F544637943F2A70A8910 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 767A2E82AB414DB2959EF685 /* libTcpSockets.a */; };
|
||||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||||
CF1C98E577754DD8AFFCB590 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64A7F078FFB14A09981B4BBF /* libTcpSockets.a */; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -104,9 +104,58 @@
|
|||||||
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
||||||
remoteInfo = RCTText;
|
remoteInfo = RCTText;
|
||||||
};
|
};
|
||||||
961BE88A1DBEC99E007758FB /* PBXContainerItemProxy */ = {
|
963394341DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
isa = PBXContainerItemProxy;
|
isa = PBXContainerItemProxy;
|
||||||
containerPortal = 2D0C8116D9644B818C1B8ECB /* TcpSockets.xcodeproj */;
|
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
|
||||||
|
remoteInfo = "RCTImage-tvOS";
|
||||||
|
};
|
||||||
|
963394381DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A28471D9B043800D4039D;
|
||||||
|
remoteInfo = "RCTLinking-tvOS";
|
||||||
|
};
|
||||||
|
9633943C1DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
|
||||||
|
remoteInfo = "RCTNetwork-tvOS";
|
||||||
|
};
|
||||||
|
963394401DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A28611D9B046600D4039D;
|
||||||
|
remoteInfo = "RCTSettings-tvOS";
|
||||||
|
};
|
||||||
|
963394441DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
|
||||||
|
remoteInfo = "RCTText-tvOS";
|
||||||
|
};
|
||||||
|
963394491DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A28881D9B049200D4039D;
|
||||||
|
remoteInfo = "RCTWebSocket-tvOS";
|
||||||
|
};
|
||||||
|
9633944D1DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
|
||||||
|
remoteInfo = "React-tvOS";
|
||||||
|
};
|
||||||
|
963394501DF0B9340040F547 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 9EEBD8DA2B8E477D9ECD815E /* TcpSockets.xcodeproj */;
|
||||||
proxyType = 2;
|
proxyType = 2;
|
||||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||||
remoteInfo = TcpSockets;
|
remoteInfo = TcpSockets;
|
||||||
@ -133,10 +182,10 @@
|
|||||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RctSockets/Info.plist; sourceTree = "<group>"; };
|
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RctSockets/Info.plist; sourceTree = "<group>"; };
|
||||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RctSockets/main.m; sourceTree = "<group>"; };
|
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RctSockets/main.m; sourceTree = "<group>"; };
|
||||||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
||||||
2D0C8116D9644B818C1B8ECB /* TcpSockets.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = TcpSockets.xcodeproj; path = "../node_modules/react-native-tcp/ios/TcpSockets.xcodeproj"; sourceTree = "<group>"; };
|
767A2E82AB414DB2959EF685 /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = "<group>"; };
|
||||||
64A7F078FFB14A09981B4BBF /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = "<group>"; };
|
|
||||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||||
|
9EEBD8DA2B8E477D9ECD815E /* TcpSockets.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = TcpSockets.xcodeproj; path = "../node_modules/react-native-tcp/ios/TcpSockets.xcodeproj"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -162,7 +211,7 @@
|
|||||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
||||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
||||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||||
CF1C98E577754DD8AFFCB590 /* libTcpSockets.a in Frameworks */,
|
38C3F544637943F2A70A8910 /* libTcpSockets.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -189,6 +238,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
|
00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
|
||||||
|
963394351DF0B9340040F547 /* libRCTImage-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -197,6 +247,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
|
00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
|
||||||
|
9633943D1DF0B9340040F547 /* libRCTNetwork-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -230,6 +281,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
|
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
|
||||||
|
963394411DF0B9340040F547 /* libRCTSettings-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -238,6 +290,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
|
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
|
||||||
|
9633944A1DF0B9340040F547 /* libRCTWebSocket-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -260,6 +313,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
146834041AC3E56700842450 /* libReact.a */,
|
146834041AC3E56700842450 /* libReact.a */,
|
||||||
|
9633944E1DF0B9340040F547 /* libReact-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -268,6 +322,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
|
78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
|
||||||
|
963394391DF0B9340040F547 /* libRCTLinking-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -285,7 +340,7 @@
|
|||||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
||||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
||||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
||||||
2D0C8116D9644B818C1B8ECB /* TcpSockets.xcodeproj */,
|
9EEBD8DA2B8E477D9ECD815E /* TcpSockets.xcodeproj */,
|
||||||
);
|
);
|
||||||
name = Libraries;
|
name = Libraries;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -294,6 +349,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
832341B51AAA6A8300B99B32 /* libRCTText.a */,
|
832341B51AAA6A8300B99B32 /* libRCTText.a */,
|
||||||
|
963394451DF0B9340040F547 /* libRCTText-tvOS.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -319,10 +375,10 @@
|
|||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
961BE87D1DBEC99D007758FB /* Products */ = {
|
9633942E1DF0B9340040F547 /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
961BE88B1DBEC99E007758FB /* libTcpSockets.a */,
|
963394511DF0B9340040F547 /* libTcpSockets.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -434,8 +490,8 @@
|
|||||||
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ProductGroup = 961BE87D1DBEC99D007758FB /* Products */;
|
ProductGroup = 9633942E1DF0B9340040F547 /* Products */;
|
||||||
ProjectRef = 2D0C8116D9644B818C1B8ECB /* TcpSockets.xcodeproj */;
|
ProjectRef = 9EEBD8DA2B8E477D9ECD815E /* TcpSockets.xcodeproj */;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
@ -517,11 +573,60 @@
|
|||||||
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
|
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
|
||||||
sourceTree = BUILT_PRODUCTS_DIR;
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
};
|
};
|
||||||
961BE88B1DBEC99E007758FB /* libTcpSockets.a */ = {
|
963394351DF0B9340040F547 /* libRCTImage-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTImage-tvOS.a";
|
||||||
|
remoteRef = 963394341DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
963394391DF0B9340040F547 /* libRCTLinking-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTLinking-tvOS.a";
|
||||||
|
remoteRef = 963394381DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
9633943D1DF0B9340040F547 /* libRCTNetwork-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTNetwork-tvOS.a";
|
||||||
|
remoteRef = 9633943C1DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
963394411DF0B9340040F547 /* libRCTSettings-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTSettings-tvOS.a";
|
||||||
|
remoteRef = 963394401DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
963394451DF0B9340040F547 /* libRCTText-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTText-tvOS.a";
|
||||||
|
remoteRef = 963394441DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
9633944A1DF0B9340040F547 /* libRCTWebSocket-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libRCTWebSocket-tvOS.a";
|
||||||
|
remoteRef = 963394491DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
9633944E1DF0B9340040F547 /* libReact-tvOS.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = "libReact-tvOS.a";
|
||||||
|
remoteRef = 9633944D1DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
963394511DF0B9340040F547 /* libTcpSockets.a */ = {
|
||||||
isa = PBXReferenceProxy;
|
isa = PBXReferenceProxy;
|
||||||
fileType = archive.ar;
|
fileType = archive.ar;
|
||||||
path = libTcpSockets.a;
|
path = libTcpSockets.a;
|
||||||
remoteRef = 961BE88A1DBEC99E007758FB /* PBXContainerItemProxy */;
|
remoteRef = 963394501DF0B9340040F547 /* PBXContainerItemProxy */;
|
||||||
sourceTree = BUILT_PRODUCTS_DIR;
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
};
|
};
|
||||||
/* End PBXReferenceProxy section */
|
/* End PBXReferenceProxy section */
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "RctSockets.app"
|
BuildableName = "RctSockets.app"
|
||||||
BlueprintName = "RctSockets"
|
BlueprintName = "RctSockets"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
@ -31,16 +31,16 @@
|
|||||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||||
BuildableName = "RctSocketsTests.xctest"
|
BuildableName = "RctSocketsTests.xctest"
|
||||||
BlueprintName = "RctSocketsTests"
|
BlueprintName = "RctSocketsTests"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
</BuildAction>
|
</BuildAction>
|
||||||
<TestAction
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
buildConfiguration = "Debug">
|
|
||||||
<Testables>
|
<Testables>
|
||||||
<TestableReference
|
<TestableReference
|
||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
@ -49,7 +49,7 @@
|
|||||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||||
BuildableName = "RctSocketsTests.xctest"
|
BuildableName = "RctSocketsTests.xctest"
|
||||||
BlueprintName = "RctSocketsTests"
|
BlueprintName = "RctSocketsTests"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
@ -59,18 +59,21 @@
|
|||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "RctSockets.app"
|
BuildableName = "RctSockets.app"
|
||||||
BlueprintName = "RctSockets"
|
BlueprintName = "RctSockets"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
buildConfiguration = "Debug"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
allowLocationSimulation = "YES">
|
allowLocationSimulation = "YES">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
@ -79,17 +82,17 @@
|
|||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "RctSockets.app"
|
BuildableName = "RctSockets.app"
|
||||||
BlueprintName = "RctSockets"
|
BlueprintName = "RctSockets"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
</AdditionalOptions>
|
</AdditionalOptions>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
buildConfiguration = "Release"
|
|
||||||
debugDocumentVersioning = "YES">
|
debugDocumentVersioning = "YES">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
@ -98,7 +101,7 @@
|
|||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "RctSockets.app"
|
BuildableName = "RctSockets.app"
|
||||||
BlueprintName = "RctSockets"
|
BlueprintName = "RctSockets"
|
||||||
ReferencedContainer = "container:RctSockets.xcodeproj">
|
ReferencedContainer = "container:rctsockets.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</ProfileAction>
|
</ProfileAction>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>localhost</key>
|
<key>localhost</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -3,14 +3,20 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node node_modules/react-native/local-cli/cli.js start"
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||||
|
"ios": "node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle",
|
||||||
|
"droid": "node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle",
|
||||||
|
"postinstall": "rn-nodeify --install stream,process,util --hack"
|
||||||
},
|
},
|
||||||
"browser": {
|
"browser": {
|
||||||
"net": "react-native-tcp"
|
"net": "react-native-tcp"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^15.1.0",
|
"react": "^15.1.0",
|
||||||
"react-native": "^0.35.0",
|
"react-native": "^0.38.0",
|
||||||
"react-native-tcp": "../../"
|
"react-native-tcp": "../../"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"rn-nodeify": "^7.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
22
examples/rctsockets/shim.js
Normal file
22
examples/rctsockets/shim.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
if (typeof __dirname === 'undefined') global.__dirname = '/'
|
||||||
|
if (typeof __filename === 'undefined') global.__filename = ''
|
||||||
|
if (typeof process === 'undefined') {
|
||||||
|
global.process = require('process')
|
||||||
|
} else {
|
||||||
|
var bProcess = require('process')
|
||||||
|
for (var p in bProcess) {
|
||||||
|
if (!(p in process)) {
|
||||||
|
process[p] = bProcess[p]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
process.browser = false
|
||||||
|
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer
|
||||||
|
|
||||||
|
// global.location = global.location || { port: 80 }
|
||||||
|
var isDev = typeof __DEV__ === 'boolean' && __DEV__
|
||||||
|
process.env['NODE_ENV'] = isDev ? 'development' : 'production'
|
||||||
|
if (typeof localStorage !== 'undefined') {
|
||||||
|
localStorage.debug = isDev ? '*' : ''
|
||||||
|
}
|
@ -25,7 +25,7 @@
|
|||||||
],
|
],
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Andy Prock",
|
"name": "Andy Prock",
|
||||||
"email": "aprock@gmail.com"
|
"email": "aprock@protonmail.com"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
@ -38,7 +38,6 @@
|
|||||||
"events": "^1.0.2",
|
"events": "^1.0.2",
|
||||||
"ip-regex": "^1.0.3",
|
"ip-regex": "^1.0.3",
|
||||||
"process": "^0.11.9",
|
"process": "^0.11.9",
|
||||||
"stream-browserify": "^2.0.1",
|
|
||||||
"util": "^0.10.3"
|
"util": "^0.10.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user