Conversation
36c8ea4 to
4328eaf
Compare
| import io.flutter.app.FlutterActivity; | ||
| import io.flutter.view.FlutterMain; | ||
|
|
||
| public class EmbeddingV1Activity extends FlutterActivity { |
9da4c22 to
598a3f8
Compare
RevenueCatUI initial supportRevenueCatUI initial support
Looks like `describeEnum` was deprecated in the latest Flutter version and substituted with `name`. This PR changes current usages of that to fix the linter. From what I've been able to figure out, this `name` property is available since Dart 2.15, which is our minimum version so we should be good
aboedo
left a comment
There was a problem hiding this comment.
looking great so far, exciting times!
|
This is great on iOS but on android as we turn our main activity into subclass, when user closes the paywall, the whole app closes off. |
Hi @kamaravichow, thanks for reporting! Could you open an issue in this repo and provide some more details? That behavior sounds like a crash. Is there a stack trace you can provide so we understand the issue? |
I have the same issue: From logs |
|
@hamishjohnson that's the same as #902. We're currently looking into it, we'll have a fix on the next beta 🙏🏻 |
After RevenueCat/purchases-hybrid-common#602, we can now use the `PaywallHelpers.presentPaywallFromFragment` method to present the paywall and receive a result back using an internal view model. This makes it so the `PurchasesFlutterActivity` isn't needed anymore and we can make use of that functionality, shared with other hybrids. Note that this does mean developers need to make sure their android activity inherits from `FlutterFragmentActivity` (or other `FragmentActivity`) and not `FlutterActivity`, as we need to present the fragment. ### TODO - [x] Hide action bar: RevenueCat/purchases-android#1532 - [x] Update PHC with those 2 changes.
This merges latest `main` into `paywalls` --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com> Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
### New Features * 📱 Initial support for cross-platform RevenueCat Paywalls 🐾 🧱 (#852) #### Instructions: - For Android, you need to change your `MainActivity` to subclass `FlutterFragmentActivity` instead of `FlutterActivity`. - Update `purchases-flutter` in your `pubspec.yaml`: ```yaml dependencies: purchases_flutter: 6.6.0-beta.3 ``` #### Usage: ```dart await Purchases.presentPaywallIfNeeded("pro"); ``` #### Limitations: - Currently only full screen paywalls are supported - There is no way to detect paywall events other than using `addCustomerInfoUpdateListener` - Android's `minSdkVersion` is temporarily increased from `19` to `24` to support paywalls. This will be reverted in a future release as we split `purchases_flutter` and `purchases_flutter_ui` ### Breaking changes from previous beta - `PurchasesFlutterActivity` has been removed. Use `FlutterFragmentActivity` provided by Flutter instead ### Fixes from previous beta * Fix `presentPaywallIfNeeded` (#904) via Toni Rico (@tonidero) ### Other Changes * Update paywalls latest main (#906) via Toni Rico (@tonidero) * Update to use PHC PaywallHelpers instead of custom activity (#903) via Toni Rico (@tonidero) * Fix flutter analyze deprecation warnings (#872)
|
I get this error: This was in last beta version too. Keep up the good work! |
I'm also getting this error when calling |
|
Hi @hamishjohnson and @renatogp. We're tracking that issue in #886. We are planning a fix for that issue soon which will remove some functionality. We will add it back with a better API in future releases. |
Updates PHC to `8.10.0-beta.8`
Currently the `presentPaywall` and `presentPaywallIfNeeded` methods return a boolean indicating whether a purchase happened in the paywall. This API is confusing and not extensible and it wasn't properly working in iOS, see: #886. This first PR removes the return value from the method. In a future PR we will add proper result handling for the paywalls. Until then, the clients won't know what happened when the paywall was presented and will need to rely on the `Purchases.getCustomerInfo()` method to respond appropriately. This is a breaking change from the previous beta.
Creates `purchases_flutter_ui` flutter package in a folder with the functionality to `presentPaywall`/`presentPaywallIfNeeded` and removes it from the main sdk `purchases_flutter`. This allows to keep the min sdk version of the main sdk lower, while still requiring a higher minSdk version for the new library. The way to import the library now is to add in the pubspec.yaml: ``` dependencies: purchases_flutter: X.Y.Z purchases_flutter_ui: X.Y.Z ```
This renames the `purchases_flutter_ui` package added in #919 to `purchases_ui_flutter`
Updates `paywalls` to the latest `main` --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com> Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This fixes some issues found in the pub score for the new package `purchases-ui-flutter`
### New features * 📱 Initial support for cross-platform RevenueCat Paywalls 🐾 🧱 (#852) #### Instructions: - For Android, you need to change your `MainActivity` to subclass `FlutterFragmentActivity` instead of `FlutterActivity`. Also, the min sdk version of the new package is `24`. Please make sure your app's `android/build.gradle` minSdkVersion has that or a higher version. - Add `purchases-ui-flutter` in your `pubspec.yaml`: ```yaml dependencies: purchases_ui_flutter: 6.15.0-beta.4 ``` #### Usage: ```dart import 'package:purchases_ui_flutter/purchases_ui_flutter.dart'; await RevenueCatUI.presentPaywallIfNeeded("pro"); ``` #### Limitations: - Currently only full screen paywalls are supported - There is no way to detect paywall events other than using `addCustomerInfoUpdateListener` #### Breaking changes from previous beta: - Paywalls functionality has been extracted into a new dependency called purchases_ui_flutter. Add purchases_ui_flutter to your pubspec.yaml. Before this release, it was part of the main RevenueCat SDK `purchases_flutter`. - A new import is required to use this functionality: `import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';` - Usage has changed the class from `Purchases.presentPaywall` to `RevenueCatUI.presentPaywall`. - `presentPaywall` and `presentPaywallIfNeeded` now don't return a result. To detect purchases, please use `Purchases.getCustomerInfo` from the `purchases_flutter` SDK. A return value will be added in future releases. ### Other Changes * Fix pub score for `purchases-ui-flutter` (#924) via Toni Rico (@tonidero) * Update `paywalls` to latest `main` (#923) via Toni Rico (@tonidero) * Rename `purchases_flutter_ui` to `purchases_ui_flutter` (#921) via Toni Rico (@tonidero) * Separate paywalls into a different package (#919) via Toni Rico (@tonidero) * Remove result from presentPaywall methods (#916) via Toni Rico (@tonidero) * Update to use PHC PaywallHelpers instead of custom activity (#903) via Toni Rico (@tonidero)
After splitting the ci jobs for deploying both the flutter and paywalls sdks, we separated the github release to its own job to be executed after those 2. However, it didn't execute in the last release. This should fix that.
Adds a `PaywallResult` enum and makes it the return value of the `presentPaywall` and `presentPaywallIfNeeded` methods
| // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. | ||
| minSdkVersion flutter.minSdkVersion | ||
| // TODO: change | ||
| // minSdkVersion flutter.minSdkVersion |
There was a problem hiding this comment.
@tonidero we should be able to change this now, right?
There was a problem hiding this comment.
Hmm we would need to split the API tests since currently they also have the new package. Not sure if it's worth doing that though?
There was a problem hiding this comment.
Oh okay makes sense 👍🏻 I'll remove this then.
|
Merged with #931 |
Squashed and rebased RevenueCat#852.
Depends on RevenueCat/purchases-hybrid-common#549
TODO:
purchases-flutter-ui