iOS上的React Native返回HTTP 406 Not Acceptable错误消息

时间:2017-01-10 12:15:58

标签: ios swift react-native swift2

我正在尝试使用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)

你能否建议修复决定?

1 个答案:

答案 0 :(得分:0)

我找到了失败的原因:错误的JS代码位置URL。