Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit d3ca200

Browse files
author
Morgan Laco
committed
Patch RCTWebSocket
This is based off this solution: facebook/react-native#19579 to this issue: facebook/react-native#19569
1 parent ab84e8b commit d3ca200

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

boilerplate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ async function install (context) {
5151
})
5252
if (rnInstall.exitCode > 0) process.exit(rnInstall.exitCode)
5353

54+
system.run(`git apply --include=${process.cwd()}/node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj/project.pbxproj ${__dirname}/lib/project.pbxproj.patch`)
55+
5456
// remove the __tests__ directory and App.js that come with React Native
5557
filesystem.remove('__tests__')
5658
filesystem.remove('App.js')

lib/project.pbxproj.patch

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
diff --git a/before.pbxproj b/after.pbxproj
2+
index efb2609..91cef26 100644
3+
--- a/before.pbxproj
4+
+++ b/after.pbxproj
5+
@@ -9,7 +9,7 @@
6+
/* Begin PBXBuildFile section */
7+
1338BBE01B04ACC80064A9C9 /* RCTSRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */; };
8+
1338BBE11B04ACC80064A9C9 /* RCTWebSocketExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDF1B04ACC80064A9C9 /* RCTWebSocketExecutor.m */; };
9+
- 13526A521F362F7F0008EF00 /* libfishhook.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13526A511F362F7F0008EF00 /* libfishhook.a */; };
10+
+ 2D3ABDC220C7206E00DF56E9 /* libfishhook.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DBE0D001F3B181A0099AA32 /* libfishhook.a */; };
11+
2D3B5F3D1D9B165B00451313 /* RCTSRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */; };
12+
2D3B5F3E1D9B165B00451313 /* RCTWebSocketExecutor.m in Sources */ = {isa = PBXBuildFile; fileRef = 1338BBDF1B04ACC80064A9C9 /* RCTWebSocketExecutor.m */; };
13+
2D3B5F401D9B165B00451313 /* RCTWebSocketModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */; };
14+
@@ -87,7 +87,7 @@
15+
isa = PBXFrameworksBuildPhase;
16+
buildActionMask = 2147483647;
17+
files = (
18+
- 13526A521F362F7F0008EF00 /* libfishhook.a in Frameworks */,
19+
+ 2D3ABDC220C7206E00DF56E9 /* libfishhook.a in Frameworks */,
20+
);
21+
runOnlyForDeploymentPostprocessing = 0;
22+
};
23+
@@ -373,7 +373,7 @@
24+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
25+
GCC_WARN_UNUSED_FUNCTION = YES;
26+
GCC_WARN_UNUSED_VARIABLE = YES;
27+
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
28+
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
29+
MTL_ENABLE_DEBUG_INFO = YES;
30+
ONLY_ACTIVE_ARCH = YES;
31+
SDKROOT = iphoneos;
32+
@@ -417,7 +417,7 @@
33+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
34+
GCC_WARN_UNUSED_FUNCTION = YES;
35+
GCC_WARN_UNUSED_VARIABLE = YES;
36+
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
37+
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
38+
MTL_ENABLE_DEBUG_INFO = NO;
39+
SDKROOT = iphoneos;
40+
SKIP_INSTALL = YES;
41+
@@ -435,7 +435,7 @@
42+
EXECUTABLE_PREFIX = lib;
43+
GCC_PREPROCESSOR_DEFINITIONS = (
44+
"DEBUG=1",
45+
- "RCT_METRO_PORT=${RCT_METRO_PORT}",
46+
+ "RCT_METRO_PORT=${RCT_METRO_PORT}",
47+
"$(inherited)",
48+
);
49+
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
50+
@@ -556,4 +556,4 @@
51+
/* End XCConfigurationList section */
52+
};
53+
rootObject = 3C86DF3E1ADF2C930047B81A /* Project object */;
54+
-}
55+
+}
56+
\ No newline at end of file

0 commit comments

Comments
 (0)