Skip to content

Commit e5d5a3c

Browse files
authored
feat: Add CustomerCenter for flutter and RN (#660)
1 parent 9be27cd commit e5d5a3c

File tree

6 files changed

+120
-15
lines changed

6 files changed

+120
-15
lines changed

docs/tools/customer-center.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ To use Customer Center, simply:
4242

4343
1. [Install](/tools/customer-center/customer-center-installation) the RevenueCat UI SDK:
4444

45-
| RevenueCat SDK | Version required for Customer Center |
46-
| :----------------------- | :----------------------------------- |
47-
| [purchases-ios](https://github.com/RevenueCat/purchases-ios) | 5.14.0 and up |
48-
| [purchases-android](https://github.com/RevenueCat/purchases-android) | 8.12.0 and up |
49-
| [react-native-purchases-ui](https://github.com/RevenueCat/react-native-purchases) | Coming soon |
50-
| [purchases-flutter](https://github.com/RevenueCat/purchases-flutter) | Coming soon |
51-
| [purchases-kmp](https://github.com/RevenueCat/purchases-kmp) | Coming soon |
45+
import CustomerCenterSDKTable from '@site/src/components/CustomerCenter/CustomerCenterSDKTable';
46+
47+
<CustomerCenterSDKTable />
5248

5349
2. [Integrate](/tools/customer-center/customer-center-integration) the Customer Center into your app
5450

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Integrating Customer Center on Flutter
3+
sidebar_label: Flutter Integration
4+
slug: customer-center-flutter
5+
hidden: false
6+
---
7+
8+
## Installation
9+
10+
[![Release](https://img.shields.io/github/release/RevenueCat/purchases-flutter.svg?style=flat)](https://github.com/RevenueCat/purchases-flutter/releases)
11+
12+
- Add `purchases-ui-flutter` in your `pubspec.yaml`:
13+
```yaml
14+
dependencies:
15+
purchases_flutter: <latest version>
16+
purchases_ui_flutter: <latest version>
17+
```
18+
19+
## Integration
20+
21+
Opening the customer center is as simple as:
22+
23+
```dart
24+
await RevenueCatUI.presentCustomerCenter();
25+
```

docs/tools/customer-center/customer-center-installation.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
---
22
title: Installing the SDK
33
sidebar_label: Installation
4+
slug: customer-center-installation
5+
hidden: false
46
---
57

68
Customer Center is included as part of the RevenueCatUI package in the RevenueCat SDK. You'll need to install the RevenueCatUI package in your project to use it.
79

810
#### Supported SDK versions
911

10-
| RevenueCat SDK | Version required for Customer Center |
11-
| :----------------------- | :----------------------------------- |
12-
| [purchases-ios](https://github.com/RevenueCat/purchases-ios) | 5.14.0 and up |
13-
| [purchases-android](https://github.com/RevenueCat/purchases-android) | 8.12.0 and up |
14-
| [react-native-purchases-ui](https://github.com/RevenueCat/react-native-purchases) | Coming soon |
15-
| [purchases-flutter](https://github.com/RevenueCat/purchases-flutter) | Coming soon |
16-
| [purchases-kmp](https://github.com/RevenueCat/purchases-kmp) | Coming soon |
12+
import CustomerCenterSDKTable from '@site/src/components/CustomerCenter/CustomerCenterSDKTable';
13+
14+
<CustomerCenterSDKTable />
1715

1816
Within the SDKs, Customer Center is available on the following platforms:
1917
- ✅ iOS 15.0 and higher
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Integrating Customer Center on React Native
3+
sidebar_label: React Native Integration
4+
slug: customer-center-react-native
5+
hidden: false
6+
---
7+
8+
## Installation
9+
10+
[![Release](https://img.shields.io/github/release/RevenueCat/react-native-purchases.svg?style=flat)](https://github.com/RevenueCat/react-native-purchases/releases)
11+
12+
- Update your `package.json` to include `react-native-purchases-ui`:
13+
```json
14+
{
15+
"dependencies": {
16+
"react-native-purchases": "<latest version>",
17+
"react-native-purchases-ui": "<latest version>"
18+
}
19+
}
20+
```
21+
22+
## Integration
23+
24+
Opening the customer center is as simple as:
25+
26+
```tsx
27+
await RevenueCatUI.presentCustomerCenter();
28+
```

sidebars.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,11 @@ const customersCategory = Category({
331331
itemsPathPrefix: "tools/customer-center/",
332332
items: [
333333
Page({ slug: "customer-center-installation" }),
334+
Page({ slug: "customer-center-configuration" }),
334335
Page({ slug: "customer-center-integration" }),
335336
Page({ slug: "customer-center-integration-android" }),
336-
Page({ slug: "customer-center-configuration" }),
337+
Page({ slug: "customer-center-flutter" }),
338+
Page({ slug: "customer-center-react-native" }),
337339
],
338340
}),
339341
Page({ slug: "dashboard-and-metrics/customer-lists" }),
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React from "react";
2+
3+
export const CustomerCenterSDKTable: React.FC = () => {
4+
const sdkData = [
5+
{
6+
name: "purchases-ios",
7+
link: "https://github.com/RevenueCat/purchases-ios",
8+
version: "5.14.0 and higher",
9+
},
10+
{
11+
name: "purchases-android",
12+
link: "https://github.com/RevenueCat/purchases-android",
13+
version: "8.12.1 and higher",
14+
},
15+
{
16+
name: "react-native-purchases-ui",
17+
link: "https://github.com/RevenueCat/react-native-purchases",
18+
version: "8.6.0 and higher",
19+
},
20+
{
21+
name: "purchases-flutter",
22+
link: "https://github.com/RevenueCat/purchases-flutter",
23+
version: "8.7.0 and higher",
24+
},
25+
{
26+
name: "purchases-kmp",
27+
link: "https://github.com/RevenueCat/purchases-kmp",
28+
version: "Coming soon",
29+
},
30+
];
31+
32+
return (
33+
<table>
34+
<thead>
35+
<tr>
36+
<th>RevenueCat SDK</th>
37+
<th>Required Version</th>
38+
</tr>
39+
</thead>
40+
<tbody>
41+
{sdkData.map(({ name, link, version }) => (
42+
<tr key={name}>
43+
<td>
44+
<a href={link} target="_blank" rel="noopener noreferrer">
45+
{name}
46+
</a>
47+
</td>
48+
<td>{version}</td>
49+
</tr>
50+
))}
51+
</tbody>
52+
</table>
53+
);
54+
};
55+
56+
export default CustomerCenterSDKTable;

0 commit comments

Comments
 (0)