mac下真机不能reload

失败!! 待后续更新

1.终端显示 bogon,怀疑找不到主机名造成.修改hosts文件映射,不成功.
2.可能Bridge存在bug,替换如下,成功reload.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  NSURL* jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  
  [[RCTBundleURLProvider sharedSettings] setJsLocation:jsCodeLocation.host];
  
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"bookmanager"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
//  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
//                                                   moduleName:@"bookmanager"
//                                            initialProperties:nil];
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 官网 中文版本 好的网站 Content-type: text/htmlBASH Section: User ...
    不排版阅读 4,435评论 0 5
  • Swift1> Swift和OC的区别1.1> Swift没有地址/指针的概念1.2> 泛型1.3> 类型严谨 对...
    cosWriter阅读 11,135评论 1 32
  • 前言 在 Docker 常用指令详解 一文中介绍了 Docker 的常用指令, 在构建容器的时候使用了 --net...
    anyesu阅读 8,038评论 0 9
  • 作者:Maxwell Li日期:2018/08/17未经作者允许,禁止转载本文任何内容。如需转载请留言。 [TOC...
    Maxwell_Li阅读 717评论 0 0
  • 昨天十月初一寒衣节,晚上我和老公去给公公烧纸,我们周围也都是烧纸的人,有的人看着纸烧完了,也没走,一直站着、看着。...
    忆曼阅读 255评论 1 10