What does 'No bundle URL present' mean in react-native/xcode? - xcode

I've set up a react native app and want to use xcode to build/run the projectName.xcworkspace file but I run into this error.
I tried the same with a brand new react native project I created without changing anything and I get the same error. What does this mean and how do I solve it?

This usually means that your app is not connected to your localhost (metro bundler is not running). To solve this, you can try running the following commands:
react-native start, then react-native run-ios (this will automatically build the app so there is no need to build it in xcode).
If the problem still persists, then you might have to check your localhost port and make sure that the app is using port 8081.

Related

Module moment not found after installing react-native-community/netinfo

I am facing the issue "react-native-community/netinfo" while running my react-native project.
I have reinstall this module but get the same error again.
Before I run my application, I run Yarn and pod install, that run successfully, but after that it is showing this error that I have shown in the in this image. How can I resolve this error to run my project?
I am attaching the error and followed the given steps but it did not work for me.
Unhandled JS Exception: #react-native-community/netinfo: NativeModule.RNCNetInfo is null. To fix this issue try these steps:
Run react-native link #react-native-community/netinfo in the project root.
Rebuild and re-run the app.
If you are using CocoaPods on iOS, run pod install in the ios directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
Check that the library was linked correctly when you used the link command by running through the manual installation instructions in the README.
If you are getting this error while unit testing you need to mock the native module. Follow the guide in the README

How to fix "Print: Entry, ":CFBundleIdentifier", Does Not Exist" while running others project, what to do?

I'm trying to launch project from github and this problem occurs:
Error occurs after running via react-native run-ios
I tried to launch it on different simulators - didn't work
Reinstalling node_models - didn't work
react-native upgrade - didn't work
Here's what you need to do
go to your cd to node_modules/react-native/third-party/glog-0.. and run ./configure
If you have any working react-native project then copy node_modules/react-native/ folder and replace with current project..
I know it's not a solution but that's how I am doing it right now. I am also looking for solution. Right now, it's working for me with this.
for me switching version of XCode worked great (from 10.1 to 9.2), while none of any other methods from the web did
thank you all

xCode: This app can not be installed at this time. Only get this error after adding the watchOS extension

App runs perfectly fine before adding the watchOS extension. But when I add it, it refuses to install the main app when I run it.
Things I've tried:
- clean, re-build
- reinstalled pods
- checked log file (gave me no useful info on what was happening)
- scrubbed every link I could find on google and found nothing that worked.
Any help?
Did you set up codesigning for the extension?
What message appears in your the system log of the device under test when the install fails?

Unable to run app on simulator

When I try to run the project in simulator, I get the error:
Failed to create plugin placeholder for
/Users/zc/Library/Developer/Xcode/DerivedData/iPhoneHandheldACT-cwlfykavlwlqwlhbecjubziblyzi/Build/Products/Debug-iphonesimulator/iPhoneHandheldACT.app/PlugIns/CallerID.appex
The build is successful, but run gives me the error.
This happened after I started re-organising the files in my project.
I tried deleting the derived data, clean and restarting the Xcode but it didn't help.
Removing the CallerID.apex from the embed framework section in Build Settings fixed this error.
For me the issue was that the version and bundle version of my widget configuration intent target didn't match the versions of the widget and the app.

How to eject expo project to native code

I eject project from expo with command npm run eject. It generates 2 folders ios and android. I tried to run the project by xcode but it still display this error. Maybe I'm not clear how to run project after eject, can you help me run it.
I run some statements to install pod, but cannot work https://github.com/CocoaPods/CocoaPods/issues/2303
So with ejecting, you should have been presented with two options:
? How would you like to eject from create-react-native-app? (Use arrow keys)
❯ React Native: I'd like a regular React Native project.
ExpoKit: I'll create or log in with an Expo account to use React Native and the Expo SDK.
Cancel: I'll continue with my current project structure.
If you chose the first (React Native), then there should have been no issues with opening up your Xcode project and running the app (there would also be no pods to install). Since your error and comment indicates otherwise, I can presume that you chose option 2: Expokit.
For that, you should have been prompted with something about making an Expo account or using an existing one:
? How would you like to eject from create-react-native-app?
React Native: I'd like a regular React Native project.
❯ ExpoKit: I'll create or log in with an Expo account to use React Native and the Expo SDK.
Cancel: I'll continue with my current project structure.
An Expo account is required to proceed.
? It appears you're already logged in to Expo as ...
After that, you'll need to follow the steps in Developing With ExpoKit. Specifically to get iOS running, you need follow all of the steps in this section after running npm run eject.
If you've done all of that, then it should work fine when running in conjunction with Expo XDE or exp. I've just tested both right now and it works without error. Double check your steps to make sure you didn't miss something. Otherwise, please edit your question with more details on exactly what commands you ran, what other dependencies you have, etc. as I'm unable to reproduce the error you have.
If you want to download new project without expo then try run:
react-native init ProjectNameHere
or , If you want to convert your own project without expo then try :
1. rm -rf node_modules
2. remove expo dependencies from package.json
3. npm install
4. react-native upgrade
(Note:This following step will create new ios and android folder and you have to redo the dependencies. I was struggling with the same issue so I posted my solution)

Resources