zoukankan      html  css  js  c++  java
  • react native 的js 文件从哪里获取

     /**
       * Loading JavaScript code - uncomment the one you want.
       *
       * OPTION 1
       * Load from development server. Start the server from the repository root:
       *
       * $ npm start
       *
       * To run on device, change `localhost` to the IP address of your computer
       * (you can get this by typing `ifconfig` into the terminal and selecting the
       * `inet` value under `en0:`) and make sure your computer and iOS device are
       * on the same Wi-Fi network.
       */
    
      jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
    
      /**
       * OPTION 2
       * Load from pre-bundled file on disk. To re-generate the static bundle
       * from the root of your project directory, run
       *
       * $ react-native bundle --minify
       *
       * see http://facebook.github.io/react-native/docs/runningondevice.html
       */
    
    //   jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    

      翻译下就是:

    (1)通过本地的npm start 直接运行,需要编译,首次运行会比较慢

    (2)获取jsbundle 的文件,直接运行。发布模式,也可以通过js 在线更新了。

                

  • 相关阅读:
    [SUCTF 2019]Pythonginx
    Buuctf-RSA1
    [网鼎杯 2020 朱雀组]phpweb
    [BJDCTF2020]ZJCTF,不过如此
    CTFHub-信息泄露
    vaex读取和处理大型文件的方法
    "生猪数据统计分析系统"----帮助文档
    法治理论1
    很短暂,很喜欢,很遗憾
    「CF1513E Cost Equilibrium」
  • 原文地址:https://www.cnblogs.com/likwo/p/5175116.html
Copyright © 2011-2022 走看看