Launch Week Day 3: Introducing Organization Notifications in Socket.Learn More
Socket
Book a DemoSign in
Socket

cordova-plugin-intercom

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-intercom - npm Package Compare versions

Comparing version
12.1.0
to
13.1.0
+3
-3
package.json
{
"name": "cordova-plugin-intercom",
"version": "12.1.0",
"version": "13.1.0",
"description": "Official Cordova/PhoneGap plugin for Intercom",

@@ -30,7 +30,7 @@ "cordova": {

"name": "cordova-android",
"version": ">=9.0.0"
"version": ">=10.0.0"
},
{
"name": "cordova-ios",
"version": ">=6.1.1"
"version": ">=6.2.0"
}

@@ -37,0 +37,0 @@ ],

<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-intercom" version="12.1.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-intercom" version="13.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>Intercom</name>

@@ -13,3 +13,3 @@ <author>Intercom</author>

<engine name="cordova-android" version=">=10.0.0" />
<engine name="cordova-ios" version=">=6.1.1" />
<engine name="cordova-ios" version=">=6.2.0" />
</engines>

@@ -66,3 +66,3 @@

<pods use-frameworks="true">
<pod name="Intercom" spec="~> 12.4.0" />
<pod name="Intercom" spec="~> 13.0.0" />
</pods>

@@ -69,0 +69,0 @@ </podspec>

@@ -17,3 +17,3 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:8.0.2'
if (pushType == 'fcm') {

@@ -32,3 +32,3 @@ classpath 'com.google.gms:google-services:4.3.3'

dependencies {
implementation 'io.intercom.android:intercom-sdk-base:12.4.1'
implementation 'io.intercom.android:intercom-sdk-base:14.0.5'
implementation 'com.google.code.gson:gson:2.8.6'

@@ -35,0 +35,0 @@ implementation 'com.intercom:twig:1.3.0'

@@ -26,3 +26,3 @@ #import "AppDelegate+IntercomPush.h"

IMP replacement = imp_implementationWithBlock(^void (id _self, UIApplication *application, NSData *deviceToken) {
[Intercom setDeviceToken:deviceToken];
[Intercom setDeviceToken:deviceToken failure:nil];

@@ -29,0 +29,0 @@ //perform host app push logic here

@@ -7,4 +7,4 @@ #import <Foundation/Foundation.h>

- (void)registerIdentifiedUser:(CDVInvokedUrlCommand*)command;
- (void)registerUnidentifiedUser:(CDVInvokedUrlCommand*)command;
- (void)loginUserWithUserAttributes:(CDVInvokedUrlCommand*)command;
- (void)loginUnidentifiedUser:(CDVInvokedUrlCommand*)command;
- (void)logout:(CDVInvokedUrlCommand*)command;

@@ -21,4 +21,2 @@

- (void)displayMessageComposer:(CDVInvokedUrlCommand*)command;
- (void)displayMessageComposerWithInitialMessage:(CDVInvokedUrlCommand*)command;
- (void)displayConversationsList:(CDVInvokedUrlCommand*)command;
- (void)displayHelpCenter:(CDVInvokedUrlCommand*)command;

@@ -25,0 +23,0 @@ - (void)displayHelpCenterCollections:(CDVInvokedUrlCommand*)command;

@@ -27,3 +27,3 @@ #import "IntercomBridge.h"

- (void)registerIdentifiedUser:(CDVInvokedUrlCommand*)command {
- (void)loginUserWithUserAttributes:(CDVInvokedUrlCommand*)command {
NSDictionary* options = command.arguments[0];

@@ -53,9 +53,16 @@ NSString* userId = options[@"userId"];

[Intercom loginUserWithUserAttributes:userAttributes success:nil failure:nil];
[Intercom loginUserWithUserAttributes:userAttributes success:^{
[self sendSuccess:command];
} failure:^(NSError * _Nonnull error) {
[self sendFailure:command withError:error];
}];
[self sendSuccess:command];
}
- (void)registerUnidentifiedUser:(CDVInvokedUrlCommand*)command {
[Intercom loginUnidentifiedUserWithSuccess:nil failure:nil];
[self sendSuccess:command];
- (void)loginUnidentifiedUser:(CDVInvokedUrlCommand*)command {
[Intercom loginUnidentifiedUserWithSuccess:^{
[self sendSuccess:command];
} failure:^(NSError * _Nonnull error) {
[self sendFailure:command withError:error];
}];
}

@@ -77,3 +84,7 @@

NSDictionary* attributesDict = command.arguments[0];
[Intercom updateUser:[self userAttributesForDictionary:attributesDict] success:nil failure:nil];
[Intercom updateUser:[self userAttributesForDictionary:attributesDict] success:^{
[self sendSuccess:command];
} failure:^(NSError * _Nonnull error) {
[self sendFailure:command withError:error];
}];
[self sendSuccess:command];

@@ -106,7 +117,2 @@ }

- (void)displayMessageComposer:(CDVInvokedUrlCommand*)command {
[Intercom presentMessageComposer:nil];
[self sendSuccess:command];
}
- (void)displayMessageComposerWithInitialMessage:(CDVInvokedUrlCommand*)command {
NSString *initialMessage = command.arguments[0];

@@ -117,8 +123,2 @@ [Intercom presentMessageComposer:initialMessage];

- (void)displayConversationsList:(CDVInvokedUrlCommand*)command {
NSLog(@"[Intercom-Cordova] WARNING - displayConversationsList is deprecated. Please use displayMessenger instead.");
[Intercom presentMessenger];
[self sendSuccess:command];
}
- (void)displayHelpCenter:(CDVInvokedUrlCommand*)command {

@@ -212,5 +212,6 @@ [Intercom presentHelpCenter];

UIApplication *application = [UIApplication sharedApplication];
[application registerUserNotificationSettings:[UIUserNotificationSettings
settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)
categories:nil]];
[[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:(UNAuthorizationOptionAlert
| UNAuthorizationOptionBadge
| UNAuthorizationOptionSound)
completionHandler:^(BOOL granted, NSError * _Nullable error) {}];
[application registerForRemoteNotifications];

@@ -378,2 +379,7 @@ [self sendSuccess:command];

- (void)sendFailure:(CDVInvokedUrlCommand*)command withError:(NSError *)error {
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
messageAsNSInteger:error.code];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}
@end
var intercom = {
registerIdentifiedUser: function(options, success, error) {
cordova.exec(success, error, 'Intercom', 'registerIdentifiedUser', [options]);
cordova.exec(success, error, 'Intercom', 'loginUserWithUserAttributes', [options]);
console.warn('registerIdentifiedUser() is deprecated and will be removed in a future release. Please use loginUserWithUserAttributes()');
},
loginUserWithUserAttributes: function(options, success, error) {
cordova.exec(success, error, 'Intercom', 'loginUserWithUserAttributes', [options]);
},
registerUnidentifiedUser: function(options, success, error) {
cordova.exec(success, error, 'Intercom', 'registerUnidentifiedUser', []);
cordova.exec(success, error, 'Intercom', 'loginUnidentifiedUser', []);
console.warn('registerUnidentifiedUser() is deprecated and will be removed in a future release. Please use loginUnidentifiedUser()');
},
loginUnidentifiedUser: function(options, success, error) {
cordova.exec(success, error, 'Intercom', 'loginUnidentifiedUser', []);
},
reset: function(success, error) {
cordova.exec(success, error, 'Intercom', 'logout', []);
console.warn('reset() is deprecated and will be removed in a future release. Please use logout()');
},
logout: function(success, error) {

@@ -18,6 +30,2 @@ cordova.exec(success, error, 'Intercom', 'logout', []);

setSecureMode: function(secureHash, secureData, success, error) {
cordova.exec(success, error, 'Intercom', 'setSecureMode', [secureHash, secureData]);
},
setUserHash: function(secureHash, success, error) {

@@ -38,13 +46,15 @@ cordova.exec(success, error, 'Intercom', 'setUserHash', [secureHash]);

},
displayMessageComposer: function(success, error) {
cordova.exec(success, error, 'Intercom', 'displayMessageComposer', []);
console.warn('displayMessageComposer() is deprecated and will be removed in a future release. Please use displayMessageComposer(initialMessage)')
},
displayMessageComposerWithInitialMessage: function(initialMessage, success, error) {
cordova.exec(success, error, 'Intercom', 'displayMessageComposerWithInitialMessage', [initialMessage]);
cordova.exec(success, error, 'Intercom', 'displayMessageComposer', [initialMessage]);
console.warn('displayMessageComposerWithInitialMessage(initialMessage) is deprecated and will be removed in a future release. Please use displayMessageComposer(initialMessage)')
},
displayConversationsList: function(success, error) {
cordova.exec(success, error, 'Intercom', 'displayConversationsList', []);
displayMessageComposer: function(initialMessage, success, error) {
cordova.exec(success, error, 'Intercom', 'displayMessageComposer', [initialMessage]);
},

@@ -51,0 +61,0 @@