Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #113

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

14 changes: 7 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
intercomSdkVersion = project.hasProperty('intercomSdkVersion') ? rootProject.ext.intercomSdkVersion : '12.5.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
intercomSdkVersion = project.hasProperty('intercomSdkVersion') ? rootProject.ext.intercomSdkVersion : '15.11.0'
}

buildscript {
Expand All @@ -12,16 +12,16 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

apply plugin: 'com.android.library'

android {
namespace "com.getcapacitor.community.intercom.intercom"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
defaultConfig {
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
versionCode 1
Expand Down Expand Up @@ -57,5 +57,5 @@ dependencies {
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation "io.intercom.android:intercom-sdk:$intercomSdkVersion"
implementation 'com.google.firebase:firebase-messaging:20.2.+'
implementation 'com.google.firebase:firebase-messaging:23.1.+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,12 @@ public void displayCarousel(PluginCall call) {
@PluginMethod
public void setUserHash(PluginCall call) {
String hmac = call.getString("hmac");
Intercom.client().setUserHash(hmac);
call.resolve();
try {
Intercom.client().setUserHash(hmac);
call.resolve();
} catch (Exception e) {
call.reject("Failed to send user hash to Intercom", e);
}
}

@PluginMethod
Expand Down
9 changes: 9 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import parser from '@typescript-eslint/parser';

export default {
files: ['**/*.ts'],
ignores: ['build/**', 'dist/**', 'example/**'],
languageOptions: {
parser,
},
};
3 changes: 2 additions & 1 deletion ios/Plugin/IntercomPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class IntercomPlugin: CAPPlugin {

NotificationCenter.default.addObserver(self, selector: #selector(self.didRegisterWithToken(notification:)), name: Notification.Name.capacitorDidRegisterForRemoteNotifications, object: nil)

observers.append(NotificationCenter.default.addObserver(forName: .IntercomWindowDidShow, object: nil, queue: OperationQueue.main) { [weak self] (_) in
observers.append(
NotificationCenter.default.addObserver(forName: .IntercomWindowDidShow, object: nil, queue: OperationQueue.main) { [weak self] (_) in
self?.notifyListeners("windowDidShow", data: nil)
})

Expand Down
6 changes: 3 additions & 3 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '13.0'
platform :ios, '15.0'

def capacitor_pods
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
Expand All @@ -9,10 +9,10 @@ end

target 'Plugin' do
capacitor_pods
pod 'Intercom', '>= 16.0.0'
pod 'Intercom', '>= 18.0.0'
end

target 'PluginTests' do
capacitor_pods
pod 'Intercom', '>= 16.0.0'
pod 'Intercom', '>= 18.0.0'
end
Loading