Browse Source

fixed rn38 warning

Daniel Zlotin 7 years ago
parent
commit
4080aec7a6
2 changed files with 19 additions and 0 deletions
  1. 14
    0
      playground/scripts/fixRN38.js
  2. 5
    0
      playground/scripts/quickInstall.js

+ 14
- 0
playground/scripts/fixRN38.js View File

@@ -0,0 +1,14 @@
1
+const _ = require('lodash');
2
+const shellUtils = require('shell-utils');
3
+const fs = require('fs');
4
+
5
+function run() {
6
+  console.log('fixing RCTJSStackFrame.m to not break analysis'); //eslint-disable-line
7
+
8
+  const path = `${process.cwd()}/node_modules/react-native/React/Base/RCTJSStackFrame.h`;
9
+  const lines = String(fs.readFileSync(path)).split('\n');
10
+  lines[24] = '+ (NSArray<RCTJSStackFrame *> *)stackFramesWithDictionaries:(NSArray *)dicts;';
11
+  fs.writeFileSync(path, lines.join('\n'));
12
+}
13
+
14
+run();

+ 5
- 0
playground/scripts/quickInstall.js View File

@@ -31,12 +31,17 @@ function hardlinkNavigation() {
31 31
   shellUtils.exec.execSync(`hardlink ../ ./node_modules/react-native-navigation/ || true`);
32 32
 }
33 33
 
34
+function fixRN38() {
35
+  shellUtils.exec.execSync(`node ./scripts/fixRN38.js`);
36
+}
37
+
34 38
 function run() {
35 39
   removeHardlinks();
36 40
   removeNodeModules();
37 41
   copyNodeModulesFromNavigation();
38 42
   installNavigation();
39 43
   ignoreReactWarnings();
44
+  fixRN38();
40 45
 }
41 46
 
42 47
 run();