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 intercom-android 15.10.3 and intercom-ios 17.4.0 #469

Merged
merged 9 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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: 3 additions & 0 deletions intercom_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## 9.0.11

* Removed references to v1 embedding.
* Implemented `displayHome` for all platforms.
* Bump Intercom Android SDK version to 15.10.3
* Bump Intercom iOS SDK version to 17.4.0

## 9.0.10

Expand Down
4 changes: 2 additions & 2 deletions intercom_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Flutter wrapper for Intercom [Android](https://github.com/intercom/intercom-android), [iOS](https://github.com/intercom/intercom-ios), and [Web](https://developers.intercom.com/installing-intercom/docs/basic-javascript) projects.

- Uses Intercom Android SDK Version `15.10.2`.
- Uses Intercom Android SDK Version `15.10.3`.
- The minimum Android SDK `minSdk` required is 21.
- The compile Android SDK `compileSdk` required is 34.
- Uses Intercom iOS SDK Version `17.3.0`.
- Uses Intercom iOS SDK Version `17.4.0`.
- The minimum iOS target version required is 15.
- The Xcode version required is 15.

Expand Down
2 changes: 1 addition & 1 deletion intercom_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'io.intercom.android:intercom-sdk:15.10.2'
implementation 'io.intercom.android:intercom-sdk:15.10.3'
implementation 'com.google.firebase:firebase-messaging:23.3.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ class IntercomFlutterPlugin : FlutterPlugin, MethodCallHandler, EventChannel.Str
Intercom.client().present(IntercomSpace.Tickets)
result.success("Launched Tickets space")
}
"displayHome" -> {
Intercom.client().present(IntercomSpace.Home)
result.success("Launched Home space")
}
else -> result.notImplemented()
}
}
Expand Down
3 changes: 3 additions & 0 deletions intercom_flutter/ios/Classes/IntercomFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ - (void) handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
} else if([@"displayTickets" isEqualToString:call.method]) {
[Intercom presentIntercom:tickets];
result(@"Presented tickets space");
} else if([@"displayHome" isEqualToString:call.method]) {
[Intercom presentIntercom:home];
result(@"Presented home space");
}
else {
result(FlutterMethodNotImplemented);
Expand Down
2 changes: 1 addition & 1 deletion intercom_flutter/ios/intercom_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ A new flutter plugin project.
s.dependency 'Flutter'
s.dependency 'Intercom'
s.static_framework = true
s.dependency 'Intercom', '17.3.0'
s.dependency 'Intercom', '17.4.0'
s.ios.deployment_target = '15.0'
end
5 changes: 5 additions & 0 deletions intercom_flutter/lib/intercom_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,9 @@ class Intercom {
Future<void> displayTickets() {
return IntercomFlutterPlatform.instance.displayTickets();
}

/// To display an Intercom Home space.
Future<void> displayHome() {
return IntercomFlutterPlatform.instance.displayHome();
}
}
4 changes: 2 additions & 2 deletions intercom_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
intercom_flutter_platform_interface: ^2.0.0
intercom_flutter_web: ^1.1.2
intercom_flutter_platform_interface: ^2.0.1
intercom_flutter_web: ^1.1.3

dev_dependencies:
flutter_test:
Expand Down
5 changes: 5 additions & 0 deletions intercom_flutter/test/intercom_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,9 @@ void main() {
await Intercom.instance.displayTickets();
expectMethodCall('displayTickets');
});

test('displayHome', () async {
await Intercom.instance.displayHome();
expectMethodCall('displayHome');
});
}
4 changes: 4 additions & 0 deletions intercom_flutter_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.1

* Added method `displayHome`.

## 2.0.0

* Removed deprecated methods `registerIdentifiedUser` and `registerUnidentifiedUser`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,9 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
Future<void> displayTickets() {
throw UnimplementedError('displayTickets() has not been implemented.');
}

/// To display an Intercom Home space.
Future<void> displayHome() {
throw UnimplementedError('displayHome() has not been implemented.');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ class MethodChannelIntercomFlutter extends IntercomFlutterPlatform {
await _channel.invokeMethod('displayTickets');
}

@override
Future<void> displayHome() async {
await _channel.invokeMethod('displayHome');
}

/// Convert the [PlatformException] details to [IntercomError].
/// From the Platform side if the intercom operation failed then error details
/// will be sent as details in [PlatformException].
Expand Down
2 changes: 1 addition & 1 deletion intercom_flutter_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: intercom_flutter_platform_interface
description: A common platform interface for the intercom_flutter plugin.
version: 2.0.0
version: 2.0.1
homepage: https://github.com/v3rm0n/intercom_flutter

dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ void main() {
<Matcher>[isMethodCall('displayTickets', arguments: null)],
);
});

test('displayHome', () async {
await intercom.displayHome();
expect(
log,
<Matcher>[isMethodCall('displayHome', arguments: null)],
);
});
});
}

Expand Down
4 changes: 4 additions & 0 deletions intercom_flutter_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.3

* Implemented method `displayHome`.

## 1.1.2

* Bump `web` to `^1.0.0`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,9 @@ void main() {
testWidgets('displayTickets', (WidgetTester _) async {
expect(plugin.displayTickets(), completes);
});

testWidgets('displayHome', (WidgetTester _) async {
expect(plugin.displayHome(), completes);
});
});
}
6 changes: 6 additions & 0 deletions intercom_flutter_web/lib/intercom_flutter_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ class IntercomFlutterWeb extends IntercomFlutterPlatform {
print("Launched Tickets space");
}

@override
Future<void> displayHome() async {
globalContext.callMethod('Intercom'.toJS, 'showSpace'.toJS, 'home'.toJS);
print("Launched Home space");
}

/// get the [window.intercomSettings]
Map<dynamic, dynamic> getIntercomSettings() {
if (globalContext.hasProperty('intercomSettings'.toJS).toDart) {
Expand Down
4 changes: 2 additions & 2 deletions intercom_flutter_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: intercom_flutter_web
description: Web platform implementation of intercom_flutter
version: 1.1.2
version: 1.1.3
homepage: https://github.com/v3rm0n/intercom_flutter

flutter:
Expand All @@ -15,7 +15,7 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
intercom_flutter_platform_interface: ^2.0.0
intercom_flutter_platform_interface: ^2.0.1
uuid: ^4.2.1 # to get the random uuid for loginUnidentifiedUser in web
web: ^1.0.0

Expand Down
Loading