Skip to content

Commit fb2197f

Browse files
ajpallaresclaude
andcommitted
fix: fix customer info listener API and add missing iOS config files
Replace non-existent Purchases.customerInfoStream with the correct addCustomerInfoUpdateListener/removeCustomerInfoUpdateListener API. Also add missing iOS Flutter xcconfig and AppFrameworkInfo.plist files that are required for building. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 916923b commit fb2197f

4 files changed

Lines changed: 32 additions & 6 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>App</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>io.flutter.flutter.app</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>App</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1.0</string>
23+
<key>MinimumOSVersion</key>
24+
<string>13.0</string>
25+
</dict>
26+
</plist>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "Generated.xcconfig"

e2e-tests/MaestroTestApp/lib/purchase_through_paywall_screen.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'dart:async';
21
import 'package:flutter/material.dart';
32
import 'package:purchases_flutter/purchases_flutter.dart';
43
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';
@@ -14,20 +13,17 @@ class PurchaseThroughPaywallScreen extends StatefulWidget {
1413
class _PurchaseThroughPaywallScreenState
1514
extends State<PurchaseThroughPaywallScreen> {
1615
String _entitlements = 'none';
17-
StreamSubscription? _subscription;
1816

1917
@override
2018
void initState() {
2119
super.initState();
22-
_subscription = Purchases.customerInfoStream.listen((info) {
23-
_updateEntitlements(info);
24-
});
20+
Purchases.addCustomerInfoUpdateListener(_updateEntitlements);
2521
Purchases.getCustomerInfo().then(_updateEntitlements);
2622
}
2723

2824
@override
2925
void dispose() {
30-
_subscription?.cancel();
26+
Purchases.removeCustomerInfoUpdateListener(_updateEntitlements);
3127
super.dispose();
3228
}
3329

0 commit comments

Comments
 (0)