Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

main.jsbundle file showing in my iOS project but still throwing "No bundle url present"

$
0
0

I am creating new React native app but facing error like "No bundle url present" while running it on iOS Simulator.

Command to Run App on iOS:

react-native run-ios --port=8089

I tried every possible solution suggested on below links.

What is the meaning of 'No bundle URL present' in react-native?

https://www.andrewcbancroft.com/2017/04/22/solving-react-natives-no-bundle-url-present-error/

and lots of other references but no luck at all.

Solution 1: I tried to add AppTranportSecurity flags in info.plist.

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
        <dict>
            <key>NSAllowsLocalNetworking</key>
            <true/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

Solution 2: Try to remove the build form iOS folder and build it again.

  • Remove the build folder with rm -r build
  • Run react-native run-ios again

Solution 3: Added below line in Package.json file

"build:ios": "react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle"

No luck at all.

Even my metro builder running on port 8089 as 8081 uses by MacFee firewall app.

enter image description here


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>