question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native Run IOS takes a long time to run

See original GitHub issue

Run react-native info in your terminal and copy the results here.

  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
      Memory: 46.10 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.14.0 - /usr/local/bin/node
      Yarn: 1.15.2 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 24, 26, 27, 28
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 26.0.0, 26.0.1, 28.0.3
        System Images: android-26 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.5 => 0.59.5 

Steps To Reproduce

  1. Create any new React Native app
  2. Try running react-native run-ios

Describe what you expected to happen:

It should run quickly. 5 mins is more than enough but it took 18 minutes & still went on an infinite loop. I am working on this from 2-3 days & it takes shit load of time everyday. Earlier it wasn’t like that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
zhigang1992commented, May 12, 2019

Have you tried delete ios/build folder?

2reactions
deadcoder0904commented, May 12, 2019

Thank you @zhigang1992 deleting the ios/build folder and running react-native run-ios again fixed the issue.

I am also using latest version of react-native now

{
  "name": "react-native-google-admob",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "expo-ads-admob": "^4.0.0",
    "react": "16.8.6",
    "react-native": "0.59.8",
    "react-native-elements": "^1.1.0",
    "react-native-unimodules": "^0.3.1",
    "react-native-vector-icons": "^6.4.2"
  },
  "devDependencies": {
    "@babel/core": "^7.4.4",
    "@babel/runtime": "^7.4.4",
    "babel-jest": "^24.8.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.54.0",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

Although it took ~5-7 mins to build the first time which I think is still a lot. Close this if it’s normal 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native run-ios takes forever to build and sometimes ...
This usually happens on first build, so simple resolution is to quit the running process and then delete the ios/ ...
Read more >
Speeding up your Build phase - React Native
Building your React Native app could be expensive and take several minutes of developers time.
Read more >
React Native run-ios hangs on Build randomly? - Reddit
Hey! I was working in React Native and after solving an issue with copied resources with "react-native-vector-icons" , thus deleting said ...
Read more >
Xcode 12 is slow when launching apps (even sample projects)
Now app launches to device take 2 1/2 minutes after launch screen appears. Deleting the specific iOs DeviceSupport folder for the device's version...
Read more >
[Resolve]-Build Hangs While Running 'react-native run-ios'
This resolved the problem for me, Under project.workspace, there is a file called "contents.xcworkspacedata".(This can be opened from your IDE) There was a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found