“Invariant Violation:Application AwesomeProject 尚未注册"使用静态 jsbundle 为 iOS 设备构建时 [英] "Invariant Violation: Application AwesomeProject has not been registered" When building for iOS device with static jsbundle

查看:31
本文介绍了“Invariant Violation:Application AwesomeProject 尚未注册"使用静态 jsbundle 为 iOS 设备构建时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我不知道反应,但我认为部署到 iOS 设备而不是模拟器不会太难处理文档.它们有点稀疏,但我到了某个地方,现在我被卡住了.我创建了一个 main.jsbundle 并将其添加到 Xcode 项目并取消注释 AppDelegate.m 中的行.

First off, I don't know react, but I figured deploying to an iOS device instead of the simulator wouldn't be too difficult to do with the docs. They were a bit sparse but I got somewhere and now I'm stuck. I created a main.jsbundle and added it to the Xcode project and uncommented the line in AppDelegate.m.

当我部署它时,我收到此错误:

When I deploy it I get this error:

2015-03-26 16:13:08.538 AwesomeProject[4753:2477032] >
  RCTJSLog> "Running application "AwesomeProject" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"
2015-03-26 16:13:08.547 AwesomeProject[4753:2477032] >
  RCTJSLog> "Error: 
 stack: 
  runApplication                  main.jsbundle:33769
  jsCall                          main.jsbundle:7157
  _callFunction                   main.jsbundle:7404
  applyWithGuard                  main.jsbundle:877
  guardReturn                     main.jsbundle:7206
  callFunctionReturnFlushedQueue  main.jsbundle:7413
 URL: file:///private/var/mobile/Containers/Bundle/Application/DBC0DAF4-B568-4CF5-B156-9EFEE4E7FF4A/AwesomeProject.app/main.jsbundle
 line: 1536
 message: Invariant Violation: Application AwesomeProject has not been registered."
2015-03-26 16:13:08.723 AwesomeProject[4753:2477032] >
  RCTJSLog> "#CLOWNTOWN (error while displaying error): Network request failed"

推荐答案

我很确定@krazyeom 的修复与此错误无关.就我而言,我通过退出从我之前运行的测试应用程序运行的终端来解决此问题.终端似乎很困惑,并且仍然连接到一个项目不再加载到 XCode 的进程.请尝试以下操作:

I'm pretty sure @krazyeom's fix has nothing to do with this error. In my case, I fixed this by quitting the terminal that was running from a previous test app I had run. It seems the terminal was confused and was still hooked to a process whose project was no longer loaded in XCode. Try the following:

  1. 关闭 React Native 生成​​的终端.
  2. 完全关闭 XCode(可能没有必要).
  3. 重新打开所有内容并重新运行.

这篇关于“Invariant Violation:Application AwesomeProject 尚未注册"使用静态 jsbundle 为 iOS 设备构建时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆