pushy / pushy-flutter

The official Pushy SDK for Flutter apps.
Apache License 2.0
21 stars 19 forks source link

fix background notification not being called with obfuscated dart code #45

Closed oexza closed 2 years ago

pushy commented 2 years ago

Hi @oexza, Thanks for the PR. When we build using the aforementioned @pragma('vm:entry-point') annotation, it breaks functionality of both obfuscated and non-obfuscated isolate background execution.

It might have to do with the Flutter version we're using. Therefore, at this time, we will not be merging the PR. However, we're glad you were able to resolve the issue and get obfuscated builds to work for you.

pushy commented 1 year ago

Hi @oexza , Thanks for your patience.

We believe commit https://github.com/pushy/pushy-flutter/commit/57a2178dadb5fccee84861438dc258bc43050f90 has now resolved this issue.

1) Please update the Pushy Flutter SDK in your app by editing the pubspec.yaml in the root directory of your project and updating the pushy_flutter package version to 2.0.9:

pushy_flutter: 2.0.9

2) Run flutter pub get to fetch the new version of our SDK.

3) Please add the following line of code to your lib/main.dart, right above the void backgroundNotificationListener() method declaration:

@pragma('vm:entry-point')

Please run your app again with --split-debug-info and let us know if the problem is indeed resolved.