-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-native run-ios doesn't start packager in debug mode if React is linked via Pods #317
Comments
cc @lucasbento as he's working on similar field in #310. Feel free to check it out and suggest improvements! |
@noahtallen: thanks for opening this issue! By doesn't always do you mean that it launches the packager sometimes and other times not? Would you be able to provide a small repo with a code that I can reproduce locally? |
I'll try to create a repo for that! No, I'm sorry for the poor phrasing. It never launches the packager for iOS ewhen running from xcode or from the cli. It does launch for Android.
Noah
…
On Apr 15, 2019 at 2:44 AM, <Lucas Bento ***@***.***)> wrote:
@noahtallen (https://github.com/noahtallen): thanks for opening this issue!
By doesn't always do you mean that it launches the packager sometimes and other times not?
Would you be able to provide a small repo with a code that I can reproduce locally?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#317 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AF-cd5W9DVZ2Mj8chq9vFc6h7SW3Jnzyks5vhB_HgaJpZM4cuzew).
|
@noahtallen: alright, I'll wait for the project then. |
Howdy! Here's a repo reproducing the issue: test-react-native-packager. Please let me know if you have any questions. You should be able to see instructions in the readme. The rational behind removing the manually linked react is that I got so many build errors conflicting with other Pods and whatnot when I had it linked both ways! Having it this way has really reduced the amount of friction our team has when working with third party dependencies. If I'm not wrong, this is how it would be set up if one was adding react-native to an existing iOS project. |
@noahtallen: cool, I'll check it out! |
@noahtallen: FYI I see that you mentioned that you couldn't build it, I updated my local |
So, as per what I can see this is because the target Without podsWith podsI believe I can include the script to start the packager here by doing something like https://stackoverflow.com/a/20505234/4252781, I don't have much experience with this so I am not sure. @thymikee / @grabbou would you be able to point someone that can check if this is the right thing to do or not? |
The file |
I was thinking we could do it as a part of new `autolinking` supporting
build phases. We could then tell React Native to declare it just like any
other dep.
…On Wed, 17 Apr 2019 at 22:06, Orta ***@***.***> wrote:
The file React.podspec will want that script adding via script_phases
<https://guides.cocoapods.org/syntax/podspec.html#script_phases> key 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASZZRXQN3HQXNTWBTPYBELPQ57LLANCNFSM4HF3G6YA>
.
|
That can work, you can see how the support works here: https://github.com/react-native-community/cli/blob/master/packages/platform-ios/native_modules.rb#L43-L62 I should get some docs on this out |
I tried to investigate more of this but I don't really understand how this would fit in the autolinking, I'll be waiting for @orta's docs. |
Also having this issue after linking react native exclusively with Cocoapods during 0.59.5 update. In our case the issue is ALWAYS occurring in Debug. So please change the title of the issue as @noahtallen confirmed it is the same for him. I found a workaround:
|
I tried to put the meat of the issue in the title ;) @ou2s |
I had a problem after upgrade to RN 0.60 - The packager wasn't starting |
Yep, I can confirm moving the script into your app target's build phases is the right thing to do I think the react-native upgrade tool would need to add support for checking that there are no build phases which start the package |
Ah, OK, thanks, I've managed to do that (zulip/zulip-mobile@33f4b41).
That sounds right. I'm seeing the same as what's in those screenshots. Hmm, so, a solution like this one —
— isn't being considered anymore, it sounds like. (Why, I wonder?) IIUC, though, doesn't that mean that improvements like facebook/react-native@4ea6204 have no effect for people on RN v0.60.0 and above, where v0.60.0 is the version when CocoaPods is newly officially favored? At least, not unless people manually update the script in their own app target's build phases? These changes (some also new in v0.60) are hard to keep up with, as they don't appear in |
I said:
See also my post in Upgrade Support, at react-native-community/upgrade-support#76. |
Hi everyone, I've added this script to the app Build Phases (as @orta suggested) -> Run Script but see no change. Is there something else to do to make the packager start automatically? |
uncheck "For install builds only"
uncheck "For install builds only" |
Environment
Description
At some point through my iOS "journey", I must have disabled launching the packager. I think this happened at the same time I started linking react native exclusively through Pods. As a result, I have no React libs imported into the xcode project manually. I got rid of all of that and did it all through Pods, which has been working much better for linking other libraries!
Anyways, when I did that, it stopped launching the packager, so now I have to do it manually. I suppose I'm wondering A) how do I turn that back on? and B) is it possible the CLI should check and launch the packager itself if it was not launched during the build process?
The text was updated successfully, but these errors were encountered: