It would be nice to be able to pass parameters to react-native-xcode.sh
See original GitHub issueSteps to reproduce the behavior
react-native-xcode.sh
in the react
package allows for the passing of parameters, e.g., path to index.js for ENTRY_FILE.
Expected behavior
Developer should be able to specify parameters.
Actual behavior
No option available.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
IOS build stack indefinitely on section "Bundle React Native ...
I can build and run the app from XCode, but running from the CI using FastLane it seems to stack on section "Bundle...
Read more >Integrating React Native with existing Android and iOS ...
Passing parameter, callback to check the ability to communicate between js and native code. Navigate to a new Activity/ViewController from js ...
Read more >How can I pass a command line argument into a shell script?
I know that shell scripts just run commands as if they were executed in at the command prompt. I'd like to be able...
Read more >Advanced Setup for React Native
If you want to generate debug symbols for debug builds, you can pass --allow-fetch as a parameter to react-native-xcode in the above mentioned...
Read more >Use parameters in a custom query - Looker Studio Help
Parameters let you build more responsive, customizable reports. You can pass parameters in a data source back to the underlying query. To use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, I got what you’re tying to do now.
The best way to do it would be to have a configuration option in
package.json
, perhapspackageRoot
orbundlingRoot
or something similar, then have thefix script
action apply this for you if it’s there, and output what it currently does if it’s not. That should be a pretty easy PR to create I reckon.I do not think either of our suggestions will work:
(1) Modify/Add the node command within the settings option (2) Modify/Add the ENV values within the settings option
The reason why (1) doesn’t work is because that modification doesn’t replace the existing invocation of your
react-native-xcode.sh
call it just pre-pends whatever you pass into it;fix-script.js:32
. I need to pass a parameter intoreact-native-xcode.sh
.The reason why (2) doesn’t work is that because in
react-native-xcode.sh:66-70
if I set theENTRY_FILE
environment variable it will be overwritten.What I need to have happen (and what I am currently using as a work-around) is in my Xcode build phases I replace your
Bundle React Native code and images
step with:but by doing this I can’t take advantage of having the fix-script being invoked and possibly missing potential additional behavior you may add in the future.
To answer you stated question, my goal is to bundle my JS code and assets from a different path and name than the default in the main script.
Apologies for taking a little while in getting back to you and also if I’ve missed anything outstandingly obvious.