title: React Native - App Build Failed on XCode (RNTextDetector)
body: <p>I am working on my company's old React Native project and trying to run the app on the simulator.</p>
  <p>These are the steps what I have done in order:</p>
  <ol>
  <li>I checked out the code from git</li>
  <li>Run command <code>npm install</code> to install node_modules</li>
  <li>go into ios folder and run <code>pod install</code> to create Pods folder</li>
  <li>Open XCode and run the app</li>
  </ol>
  <p>At the 4th step, the app was almost successfully built but then the errors occured in file <code>RNTextDetector.m</code> (the path is <code>{Root}/node_modules/rn-text-detector/ios/RNTextDetector.m</code>). Most of them are &quot;Use of undeclared identifier 'xxx'&quot;. Here are the errors:</p>
  <p><a href="https://i.stack.imgur.com/Z7nyj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z7nyj.png" alt="enter image description here" /></a></p>
  <p>Here is my package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;xxx&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;android&quot;: &quot;react-native run-android&quot;,
      &quot;ios&quot;: &quot;react-native run-ios&quot;,
      &quot;start&quot;: &quot;react-native start&quot;,
      &quot;test&quot;: &quot;jest&quot;,
      &quot;lint&quot;: &quot;eslint .&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@notifee/react-native&quot;: &quot;^3.0.4&quot;,
      &quot;@react-native-community/art&quot;: &quot;^1.2.0&quot;,
      &quot;@react-native-community/async-storage&quot;: &quot;^1.11.0&quot;,
      &quot;@react-native-community/datetimepicker&quot;: &quot;^3.5.2&quot;,
      &quot;@react-native-community/masked-view&quot;: &quot;^0.1.10&quot;,
      &quot;@react-native-community/progress-bar-android&quot;: &quot;^1.0.3&quot;,
      &quot;@react-native-community/progress-view&quot;: &quot;^1.0.3&quot;,
      &quot;@react-native-community/toolbar-android&quot;: &quot;0.2.1&quot;,
      &quot;@react-native-firebase/app&quot;: &quot;^12.9.0&quot;,
      &quot;@react-native-firebase/messaging&quot;: &quot;^12.9.0&quot;,
      &quot;@react-native-picker/picker&quot;: &quot;^2.2.1&quot;,
      &quot;@react-navigation/material-top-tabs&quot;: &quot;^6.2.1&quot;,
      &quot;@react-navigation/native&quot;: &quot;^6.0.1&quot;,
      &quot;@react-navigation/stack&quot;: &quot;^6.2.1&quot;,
      &quot;axios&quot;: &quot;^0.24.0&quot;,
      &quot;babel-preset-react-native&quot;: &quot;^4.0.1&quot;,
      &quot;expo-local-authentication&quot;: &quot;^12.1.1&quot;,
      &quot;flow-bin&quot;: &quot;^0.137.0&quot;,
      &quot;jest&quot;: &quot;^26.6.3&quot;,
      &quot;jwt-decode&quot;: &quot;^3.1.2&quot;,
      &quot;moment&quot;: &quot;^2.29.3&quot;,
      &quot;moment-timezone&quot;: &quot;^0.5.34&quot;,
      &quot;native-base&quot;: &quot;^2.13.12&quot;,
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-native&quot;: &quot;^0.64.2&quot;,
      &quot;react-native-biometrics&quot;: &quot;^2.1.4&quot;,
      &quot;react-native-calendars&quot;: &quot;^1.1267.0&quot;,
      &quot;react-native-camera&quot;: &quot;^3.35.0&quot;,
      &quot;react-native-chart-kit&quot;: &quot;^6.12.0&quot;,
      &quot;react-native-elements&quot;: &quot;^2.0.4&quot;,
      &quot;react-native-file-viewer&quot;: &quot;^2.1.1&quot;,
      &quot;react-native-fs&quot;: &quot;^2.16.6&quot;,
      &quot;react-native-gesture-handler&quot;: &quot;^1.10.3&quot;,
      &quot;react-native-image-crop-picker&quot;: &quot;^0.32.2&quot;,
      &quot;react-native-image-picker&quot;: &quot;^4.8.3&quot;,
      &quot;react-native-keyboard-aware-scroll-view&quot;: &quot;^0.9.1&quot;,
      &quot;react-native-linear-gradient&quot;: &quot;^2.5.6&quot;,
      &quot;react-native-modal&quot;: &quot;^11.5.6&quot;,
      &quot;react-native-pager-view&quot;: &quot;^5.4.24&quot;,
      &quot;react-native-pdf&quot;: &quot;^6.2.0&quot;,
      &quot;react-native-picker-select&quot;: &quot;^8.0.0&quot;,
      &quot;react-native-pie-chart&quot;: &quot;^2.0.2&quot;,
      &quot;react-native-reanimated&quot;: &quot;^1.9.0&quot;,
      &quot;react-native-rename&quot;: &quot;^2.9.0&quot;,
      &quot;react-native-render-html&quot;: &quot;^6.3.4&quot;,
      &quot;react-native-safe-area-context&quot;: &quot;^3.0.2&quot;,
      &quot;react-native-screens&quot;: &quot;^3.13.1&quot;,
      &quot;react-native-simple-toast&quot;: &quot;^1.1.2&quot;,
      &quot;react-native-svg&quot;: &quot;^12.1.1&quot;,
      &quot;react-native-swipe-list-view&quot;: &quot;^3.2.9&quot;,
      &quot;react-native-tab-view&quot;: &quot;^3.1.1&quot;,
      &quot;react-native-vector-icons&quot;: &quot;^7.0.0&quot;,
      &quot;react-navigation&quot;: &quot;^4.4.0&quot;,
      &quot;react-query&quot;: &quot;^3.34.2&quot;,
      &quot;react-redux&quot;: &quot;^7.2.0&quot;,
      &quot;redux&quot;: &quot;^4.0.5&quot;,
      &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
      &quot;redux-thunk&quot;: &quot;^2.3.0&quot;,
      &quot;rn-fetch-blob&quot;: &quot;^0.12.0&quot;,
      &quot;rn-text-detector&quot;: &quot;0.0.8&quot;,
      &quot;toggle-switch-react-native&quot;: &quot;^3.3.0&quot;,
      &quot;typescript&quot;: &quot;^3.9.7&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.12.9&quot;,
      &quot;@babel/runtime&quot;: &quot;^7.12.5&quot;,
      &quot;@react-native-community/eslint-config&quot;: &quot;^2.0.0&quot;,
      &quot;babel-jest&quot;: &quot;^26.6.3&quot;,
      &quot;babel-plugin-root-import&quot;: &quot;^6.5.0&quot;,
      &quot;babel-plugin-styled-components&quot;: &quot;^1.10.7&quot;,
      &quot;eslint&quot;: &quot;^7.14.0&quot;,
      &quot;metro-react-native-babel-preset&quot;: &quot;^0.64.0&quot;,
      &quot;react-test-renderer&quot;: &quot;^17.0.1&quot;
    },
    &quot;jest&quot;: {
      &quot;preset&quot;: &quot;react-native&quot;
    }
  }
  </code></pre>