Skip to content

Release/6.15.0-beta.4#925

Merged
tonidero merged 5 commits into
paywallsfrom
release/6.15.0-beta.4
Jan 5, 2024
Merged

Release/6.15.0-beta.4#925
tonidero merged 5 commits into
paywallsfrom
release/6.15.0-beta.4

Conversation

@tonidero

@tonidero tonidero commented Jan 5, 2024

Copy link
Copy Markdown
Contributor

New features

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:
dependencies:
  purchases_ui_flutter: 6.15.0-beta.4

Usage:

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

@tonidero tonidero requested a review from a team January 5, 2024 11:01
Comment thread CHANGELOG-LATEST.md Outdated
@tonidero tonidero merged commit 1762413 into paywalls Jan 5, 2024
@tonidero tonidero deleted the release/6.15.0-beta.4 branch January 5, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants