Open cdcv opened 8 years ago
Hey @cdcv this package doesn't (currently) make use of the cordova plugin, just https://www.npmjs.com/package/intercom-client
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).
Hey @cdcv can you elaborate a little on what you mean here?
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.
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.
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'
+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.
Would be great to add documentation for how to integrate with Intercom's Cordova plugin. Thanks!