We use Intercom in our Meteor app. We only call Intercom in Javascript like Intercom('boot')
for instance (as described in their documentation for single page web apps).
This all works fine so far, except the push notifications. The documentation assumes Intercom is installed directly into a Cordova app.
Has anyone managed to get intercom push notifications to work on Android / iOS with a Meteor app?
答案 0 :(得分:1)
首先,您应该知道我自己还没有测试过,但是我对Meteor和Intercom都很熟悉。也就是说,这是我对成功之路的看法:
首先,您希望将其添加到mobile-config.js文件:
App.setPreference('intercom-app-id', 'xxxxxxxxxx');
App.setPreference('intercom-ios-api-key', 'ios_sdk-xxxxxxxx');
App.setPreference('intercom-android-api-key', 'android_sdk-xxxxxxxxx');
然后,您可以使用如下所示的Cordova功能:
if (Meteor.isCordova) {
// define values for userId and phoneNumber...
intercom.registerIdentifiedUser({userId: userId,phone:phoneNumber});
}
...
我不确定您如何尝试使用推送通知,但是请告诉我您对此的想法或是否有帮助。谢谢!