【问题标题】:Trigger.io App crashing when using forge.event.connectionStateChange.addListener使用 forge.event.connectionStateChange.addListener 时 Trigger.io App 崩溃
【发布时间】:2013-03-07 01:04:17
【问题描述】:

我正在尝试使用docs 中的forge.event.connectionStateChange.addListener。我创建了一个完全空的应用程序,将"event":true 添加到config.json 配置中,并将以下位添加到main.js

forge.logging.info("Add JavaScript to js/main.js!");

forge.event.connectionStateChange.addListener(
    function() {
      alert('Device ' + (forge.is.connection.connect() ? "is" : "is not") + 'connected.');
    },
    function(){
      alert('Erorr');
    }
);

当我运行应用程序并关闭机器的 wifi 时,应用程序崩溃。如果需要,我可以提供更多日志。

[DEBUG] Native call: {
[DEBUG]     callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG]     method = "launchimage.hide";
[DEBUG]     params =     {
[DEBUG]     };
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG]     callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG]     content = "<null>";
[DEBUG]     status = success;
[DEBUG] }
[INFO] No reload update available.
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] +[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4'
[INFO] *** First throw call stack:
[INFO] (0x33b6012 0x2e55e7e 0x34412ad 0x33a5bbc 0x33a594e 0x2e695c8 0x2895765 0x3339f3f 0x333996f 0x335c734 0x335bf44 0x335be1b 0x33107e3 0x3310668 0x1d99ffc 0x26e6 0x2625)
[INFO] libc++abi.dylib: terminate called throwing an exception

【问题讨论】:

  • 另外,我没有收到文档中提到的应用启动警报。
  • 我遇到了同样的问题,我什至没有使用监听器。当我在装有 iOS 6.1 的 iPhone 5 上切换到 wifi 时,我的只是在后台崩溃
  • @JohnClarkeMills 你是对的。当我放下我的监听器,只使用一个新创建的项目时,我看到了同样的崩溃。

标签: trigger.io


【解决方案1】:

抱歉 - 我们的错误:这是在 v1.4.32 中导致 Reload 出现问题的同一问题的症状。

v1.4.33 中有一个修复程序 - 请尝试一下,让我知道这是否适合您。

【讨论】:

  • 看起来 v1.4.33 允许我们关闭 wifi。当 wifi 返回时,我们看到 Pusher 通道断开连接并重新连接,而应用程序没有崩溃。谢谢!
猜你喜欢
  • 1970-01-01
  • 2013-10-02
  • 1970-01-01
  • 2019-07-17
  • 2021-08-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多