2013-08-05 166 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核心版本。' –

相關問題