Skip to content

Commit

Permalink
#39 MissingPluginException(No implementation found for method registe…
Browse files Browse the repository at this point in the history
…rBackgroundCallback) (#53)
  • Loading branch information
ABausG committed Nov 30, 2021
1 parent a18c4f5 commit 7f5f7c3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Expand Up @@ -28,6 +28,10 @@ jobs:
- name: Test
run: flutter test --coverage
- uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

android:
name: Android Integration Tests
Expand All @@ -48,7 +52,7 @@ jobs:
with:
api-level: 29
working-directory: example
script: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/android_test.dart -d emulator-5554
script: flutter test integration_test/android_test.dart -d emulator-5554

# iOS Test based on https://medium.com/flutter-community/run-flutter-driver-tests-on-github-actions-13c639c7e4ab
# by @kate_sheremet
Expand Down Expand Up @@ -79,5 +83,5 @@ jobs:
with:
channel: stable
- name: "Run iOS integration tests"
run: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/ios_test.dart -d ${{steps.udid.outputs.UDID}}
run: flutter test integration_test/ios_test.dart -d ${{steps.udid.outputs.UDID}}
working-directory: example
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.1.5

* Fix MissingPluginException for `registerBackgroundCallback` on iOS [#39](https://github.com/ABausG/home_widget/issues/39)

## 0.1.4

* Fix `HomeWidget.updateWidget` not completing on iOS [#26](https://github.com/ABausG/home_widget/issues/26)
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -5,6 +5,7 @@
[![popularity](https://badges.bar/home_widget/popularity)](https://pub.dev/packages/home_widget/score)
[![pub points](https://badges.bar/home_widget/pub%20points)](https://pub.dev/packages/home_widget/score)
[![Build](https://github.com/abausg/home_widget/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/ABausG/home_widget/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/ABausG/home_widget/branch/main/graph/badge.svg?token=ZXTZOL6KFO)](https://codecov.io/gh/ABausG/home_widget)

HomeWidget is a Plugin to make it easier to create HomeScreen Widgets on Android and iOS.
HomeWidget does **not** allow writing Widgets with Flutter itself. It still requires writing the Widgets with native code. However, it provides a unified Interface for sending data, retrieving data and updating the Widgets
Expand Down
12 changes: 12 additions & 0 deletions example/integration_test/ios_test.dart
Expand Up @@ -79,6 +79,18 @@ void main() {
await HomeWidget.initiallyLaunchedFromHomeWidget();
expect(retrievedData, isNull);
});

group('Register Backgorund Callback', () {
testWidgets('RegisterBackgroundCallback completes without error',
(tester) async {
await HomeWidget.setAppGroupId('group.es.antonborri.integrationtest');
final registerCallbackResult =
await HomeWidget.registerBackgroundCallback(backgroundCallback);
expect(registerCallbackResult, isNull);
});
});
});
});
}

void backgroundCallback(Uri uri) {}
2 changes: 2 additions & 0 deletions ios/Classes/SwiftHomeWidgetPlugin.swift
Expand Up @@ -105,6 +105,8 @@ public class SwiftHomeWidgetPlugin: NSObject, FlutterPlugin, FlutterStreamHandle
return
}
result(initialUrl?.absoluteString)
} else if call.method == "registerBackgroundCallback" {
result(nil)
} else {
result(FlutterMethodNotImplemented)
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: home_widget
description: A plugin to provide a common interface for creating HomeScreen Widgets for Android and iOS.
version: 0.1.4
version: 0.1.5
repository: https://github.com/ABausG/home_widget

environment:
Expand Down

0 comments on commit 7f5f7c3

Please sign in to comment.