Closed LukasB-DEV closed 1 month ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Thanks @LukasB-DEV for opening the issue. Just to make sure: Metro is running, right?
Yes Metro is running. I first start metro with "npm start" and that build with XCode
Ok, then this is something we have to investigate. Thanks for reporting this! QQ: are you behind a VPN, perhaps? Make sure that the device and the metro bundler are on the same network!
Passing over to the Metro team
This may not be the fix for you but I was dealing with a similar issue, where metro would not see my real iPhone but worked with my simulator. I tried adding:
Privacy - Local Network Usage Description
to my info.plist to resolve another issue with local devices permissions pop up not appearing, and on the next 'yarn ios' metro successfully connected.
Yes, it is related. If you deny connection to local networks on your device, it will start not connecting to Metro server running locally. Even if you go to settings and allow for network connection, it won't work right away.
The only solution seems to be:
I ended up in that scenario and restarting the phone solved it. Apparently, it is an iOS bug.
I have set Local network Usage Discription:
Local Networks from iPhone Settings are enabled but still the error. Or anything else i need to do?
@LukasB-DEV that descriptor should not be needed because in the Info.plist we already have an Allow Local Networking
set to YES.
Double check that in the iphone's Settings > <Your App>
the toggle for the Local Network is turned on.
Then turn off the phone physically and turn it on.
It should work.
@cipolleschi Hey! Do you have any ideas why can't I see setting Local Network
? I think it is the reason in my case and probably in others. It is definitely debug build, not release
So solution for me was
Build Phases
-> Bundle React Native code and images
-> disable Run script: For install builds only
it was enabled on my side for some reason :(
So solution for me was
Build Phases
->Bundle React Native code and images
-> disableRun script: For install builds only
it was enabled on my side for some reason :(
Thank you for this, actually gave up on a project for 2 weeks because I couldn't figure it out, working now because of this solution!
I've had this problem for a few weeks and I've found the solution. For my project, the issue stemmed from how "Debug" was configured in the project.pbxproj file. The system was interpreting the debug mode as Release because GCC_PREPROCESSOR_DEFINITIONS was set with DEBUG=0, when it should have been DEBUG=1. I can search for the problem in this section.
GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", );
@cipolleschi it also may need "Required background modes" at Plist and check "Remote notification" in Sign&Capabilites
Description
I Upgraded my React Native Projekt from 0.74.5 to 0.75.2 and now I am not able to run the App on a real IOS Device. In Simulator all works fine. On my IPhone, build with XCode, I get this error:
I already tried things from https://github.com/facebook/react-native/issues/26331#issuecomment-551065731 and added the Build step but this has not worked for me.
Steps to reproduce
React Native Version
0.75.2
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
Repro
Screenshots and Videos
No response