reactjs - Command `bundle` unrecognized.Did you mean to run this inside a react-native project? -


run react-native bundle command in terminal root directory of app

what root directory of app? trying run uiexplorer (on device) official repo giving me message when run

react-native bundle 

command bundle unrecognized.did mean run inside react-native project?

i think tried pretty every directory inside /react-native-master

you don't need run react-native bundle.

you should follow 'option 2' instruction in appdelegate.m, find screenshots below: enter image description here

the instruction in react-native website not clear, clearer instructions be:

  • open ios/appdelegate.m
  • comment out jscodelocation = [nsurl
    urlwithstring:@"http://localhost:8081/index.ios.bundle"];
  • uncomment jscodelocation = [[nsbundle mainbundle] urlforresource:@"main" withextension:@"jsbundle"];
  • run curl given in 'option 2' (e.g. http://localhost:8081/index.ios.bundle -o main.jsbundle)
  • if fails add --ipv4 flag end of it.
  • in xcode, right click on project directory , click add files "project name here" - choose main.jsbundle file that
    generated.

referenced from: https://github.com/facebook/react-native/issues/240

if still can't run it, check main.jsbundle if contains error. if does, make sure given curl path correct. end changing curl curl http://localhost:8081/examples/uiexplorer/uiexplorerapp.ios.bundle -o main.jsbundle in order work.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -