Skip to content
Merged
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
84 changes: 84 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build

on:
push:
branches: ['**']
pull_request:
branches: ['**']

jobs:
build:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

verify-web:
name: Verify Web
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Verify Web
run: npm run verify:web

verify-android:
name: Verify Android
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Install dependencies
run: npm ci

- name: Verify Android
run: npm run verify:android

verify-ios:
name: Verify iOS
runs-on: macos-latest
needs: build
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Verify iOS
run: npm run verify:ios
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
Expand Down
4 changes: 2 additions & 2 deletions JoinfluxCapacitorIntercom.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Pod::Spec.new do |s|
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '15.0'
s.dependency 'Capacitor', '~> 6.0'
s.ios.deployment_target = '15.0'
s.dependency 'Capacitor', '~> 7.0'
s.dependency 'Intercom', '~> 18.0'
s.swift_version = '5.1'
end
18 changes: 9 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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'
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'
}

buildscript {
Expand All @@ -11,18 +11,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.7.2'
}
}

apply plugin: 'com.android.library'

android {
namespace "com.joinflux.flux.intercom"
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -37,8 +37,8 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}

Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Mon May 05 15:03:45 AEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -101,41 +101,37 @@ public void registerIdentifiedUser(PluginCall call) {
assert email != null;

Registration registration = Registration.create().withUserId(userId).withEmail(email);
Intercom
.client()
.loginIdentifiedUser(
registration,
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}
Intercom.client().loginIdentifiedUser(
registration,
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}

@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
);
}
);
}

@PluginMethod
public void registerUnidentifiedUser(PluginCall call) {
Intercom
.client()
.loginUnidentifiedUser(
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}
Intercom.client().loginUnidentifiedUser(
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}

@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
);
}
);
}

@PluginMethod
Expand Down Expand Up @@ -163,22 +159,20 @@ public void updateUser(PluginCall call) {
}
Map<String, Object> customAttributes = mapFromJSON(call.getObject("customAttributes"));
builder.withCustomAttributes(customAttributes);
Intercom
.client()
.updateUser(
builder.build(),
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}
Intercom.client().updateUser(
builder.build(),
new IntercomStatusCallback() {
@Override
public void onSuccess() {
call.resolve();
}

@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
@Override
public void onFailure(@NonNull IntercomError intercomError) {
call.reject(String.valueOf(intercomError));
}
);
}
);
}

@PluginMethod
Expand Down
8 changes: 4 additions & 4 deletions ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -430,7 +430,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -453,7 +453,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
Expand All @@ -479,7 +479,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
Expand Down
Loading