Skip to content
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

[Packager] Only a single simulator gets LiveReload/HMR connections in Xcode 9 #14334

Closed
orta opened this issue Jun 6, 2017 · 4 comments
Closed
Labels
p: Microsoft Partner: Microsoft Resolution: Locked This issue was locked by the bot.

Comments

@orta
Copy link
Contributor

orta commented Jun 6, 2017

Description

Installed the Xcode9-beta simulator, opened up my app in two different devices and hit save.

screen shot 2017-06-06 at 09 15 10

You can see it happening in this tweet: https://twitter.com/orta/status/872002403930968064

Reproduction Steps and Sample Code

List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise.

  • The beta can be downloaded from https://developer.apple.com/xcode
  • If you run your app from the Xcode project, you can run it twice by changing the device type in this device switcher

screen shot 2017-06-06 at 09 20 24

Once you have two simulators running, whichever simulator you hit cmd +r on last is the one that receives notifications about the module changes.

Solution

Ideally React Native Packager would support multiple connections.

Additional Information

  • React Native version: 0.45
  • Platform: iOS
  • Development Operating System: macOS
  • Dev tools: Xcode 9
@cpojer
Copy link
Contributor

cpojer commented Jun 6, 2017

This file: https://github.com/facebook/react-native/blob/master/local-cli/server/util/attachHMRServer.js needs to be turned into a class per platform.

@hramos hramos added the Tooling label Jun 6, 2017
@linnett
Copy link
Contributor

linnett commented Jun 10, 2017

+1

This problem occurs also when there are multiple physical devices running hot reload. The only one that updated is the last one you enable

@ajostergaard
Copy link

I have what appears to be the same problem when running Android and iOS simulators simultaneously - the last one reloaded gets the hot reload. Does that work for others?

@facebook facebook locked as resolved and limited conversation to collaborators Aug 11, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 11, 2018
grabbou pushed a commit to react-native-community/cli that referenced this issue Sep 26, 2018
Summary:
This diff builds on top of the refactor to use `async/await` and adds multi-client support to Hot Module Reloading.

Thanks to async/await it's been quite straightforward to add this logic, since the only thing that I've had to do is to create a `Set` with the currently connected clients and passed the specified client to each method that was using the global client before.

This closes facebook/react-native#14334

Reviewed By: davidaurelio

Differential Revision: D5611176

fbshipit-source-id: ec29438887342877c372b61132efada16af58fa5
@hramos hramos added the p: Microsoft Partner: Microsoft label Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: Microsoft Partner: Microsoft Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants