2013-08-05 38 views
0

版本2.0.0遗漏的类型错误:无法读取未定义

我试图使用解析对象按照文档的特性“推”:https://trigger.io/modules/parse/current/docs/index.html

forge.parse.push.subscribe(...) 

我得到的错误: Uncaught TypeError: Cannot read property 'push' of undefined其中。所以解析属性没有设置。我听说这是配置设置不正确的问题,但通过工具箱设置解析似乎没有任何效果,并且parse属性仍未设置。

我的配置:

{ 
    ... 
    "modules": { 
    ... 
    "parse": { 
     "version": "2.0", 
     "config": { 
     "clientKey": "xxx", 
     "applicationId": "xxx" 
     } 
    } 
    ... 
    } 
    ... 
} 

伪造签名:

{ 
    button: Object 
    config: Object 
    document: Object 
    enableDebug: function(){h.debug=true;h.priv.call("internal.showDebugWarning", },null,null);h.priv.call("internal.hideDebugWarning",{},null,null)} 
    event: Object 
    file: Object 
    geolocation: Object 
    internal: Object 
    is: Object 
    logging: Object 
    message: Object 
    notification: Object 
    prefs: Object 
    reload: Object 
    request: Object 
    tabs: Object 
    tools: Object 
    __proto__: Object 
} 

回答

2

它看起来像你试图在非移动目标(可能是网络)上使用Parse。解析推送通知仅适用于Android和iOS。

0

尝试以下。

forge.partners.parse.push.subscribe("offers", 
function() { 
    forge.logging.info("subscribed to offers push notifications!"); 
}, 
function (err) { 
    forge.logging.error("error subscribing to offers notifications: "+ 
    JSON.stringify(err)); 
}); 
+0

'未捕获的类型错误:无法读取未定义的属性'解析' –

+0

请阅读此https://trigger.io/docs/v1.4/api/modules/parse.html您确定已将所有设置为链接说? – Akki619

+0

'您目前正在查看非当前版本的文档,下面的信息可能不适用于当前的Forge核心版本。' –

相关问题