versolearning / meteor-intercom

Reactive intercom integration for Meteor
47 stars 15 forks source link

Intercom Cordova Plugin #27

Open cdcv opened 8 years ago

cdcv commented 8 years ago

Would be great to add documentation for how to integrate with Intercom's Cordova plugin. Thanks!

dburles commented 8 years ago

Hey @cdcv this package doesn't (currently) make use of the cordova plugin, just https://www.npmjs.com/package/intercom-client

lorensr commented 8 years ago

I think he means how the two can coexist – how can you prevent the client side of this package from doing anything when Meteor.isCordova is true (and you're using the Cordova plugin instead).

dburles commented 8 years ago

Hey @cdcv can you elaborate a little on what you mean here?

cdcv commented 8 years ago

We are using Intercom in a mobile app that also uses the Intercom Cordova plugin. Therefore, on Cordova builds, we don't want the JS code to interact with Intercom (since the Cordova plugin will be doing this). Can you let us know how we should be doing that. Thanks.

dburles commented 8 years ago

Thanks @cdcv that makes sense. Right now there isn't a way to do that, though I'm happy to accept a pull request if it's something you might consider adding to the package.

lorensr commented 8 years ago

You don't have access to Meteor.settings inside package.js, right? If you did, could change this line:

https://github.com/versolearning/meteor-intercom/blob/master/package.js#L18

to

if (Meteor.settings.meteorIntercom.skipCordova)
  api.add_files(['intercom_loader.js', 'intercom_client.js'], 'web.browser');
else
  api.add_files(['intercom_loader.js', 'intercom_client.js'], 'client'); // includes 'web.cordova'
maximchouinard commented 8 years ago

+1, i tried implement both meteor intercom and cordova intercom, and i had to drop the desktop version because of the double response from intercom team on mobile.