thekevinbrown/react-native-schemes-manager

Can't open developer menu with new scheme

Closed this issue · 5 comments

I am able to build and run my new scheme using react-native-schemes-manager, but I am not able to open up the react native debug menu using command + D or reloading using command + R.

I was wondering if it was because I am using cocoapods, but using this solution did not solve my issue.

Also, I've checked and made sure that the simulator is set to use the hardware keyboard.

The preprocessor macros for my new scheme on both my project and the Pods project have DEBUG=1.

What else am I missing?

Have you tried running react-native-schemes-manager all manually to see if that fixes it?

Also, which version are you using? If it's the beta it's entirely possible that it's a bug's fault.

Other than that it's just about going through XCode and making sure the changes are applied. If the above aren't helpful, any chance that you could create a reproduction case and send it through so I can have a look?

Running manually worked! Thanks so much. I had followed the instructions to remove the node modules and run yarn when having trouble, so I didn't think to run it manually. Thanks for the great repo! Don't know how I would have setup a prod and dev environment without it.

Update: After switching schemes, I have to close xcode and the simulator, run react-native-schemes-manager all manually and then debug tools and reloading works on the selected scheme. Debug tools and reloading will no longer work on my other scheme until quitting xcode/simulator and running manually again.

Don't know if that is expected behavior, but thought I'd share. Thanks again for the help!

Oh and I'm on version 1.0.5

This is what's happening:

  • There are a bunch of XCode related files in your node_modules.
  • This is a script that when it runs, reads those files and applies your settings to them.
  • It's set up with a postinstall hook so that for most situations it runs when changes are made that necessitate running again.
  • If XCode is open it may or may not see those changes.

I'm not sure exactly what setting the scheme in XCode would do, but in general I've noticed it's pretty militant about expecting to be the program that controls those files.

Generally I set all of this up on CI/CD so that the schemes are all built by clean automated processes, making it so I just do code changes, commit, and out the end I get 1..n .ipa files which I can distribute. Sometimes I even set it up to push to test flight automatically.

Hope that helps, and I'm glad you got it working!