我正在尝试使用Swift 2在我的iOS应用程序中显示React Native视图.React Native返回HTTP 406 Not Acceptable错误消息。
let bridge = RCTBridge(bundleURL: jsCodeLocation, moduleProvider: nil, launchOptions: ["controller":self])
let reactRootView: RCTRootView = RCTRootView(bridge: bridge, moduleName: moduleName, initialProperties: initialProperties)
reactRootView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
reactRootView.delegate = self
let viewController = UIViewController()
viewController.view.addSubview(reactRootView)
self.navigationController?.pushViewController(viewController, animated: true)
你能否建议修复决定?
答案 0 :(得分:0)
我找到了失败的原因:错误的JS代码位置URL。