We have to add in-app purchases for the iOS, macOS and Android store, so that users can also get the premium features of the app without using Stripe for payments.
The in-app purchases are only enabled when a user uses the app with the default Supabase environment or with the Supabase environment provided during build time. If a user uses his own Supabase instance, he will not be able to upgrade to the premium tier via in-app purchases.
We are using RevenueCat for in-app purchases, which automatically sends all the events for a user to the "revenuecat-webhooks-v1" edge function. Depending on the received event we can then upgrade / downgrade the users profile. To be able to use RevenueCat as an additional provider to Stripe we also had to add a new "subscriptionProvider" provider column to the "profiles" table, which stores the information via which provider a user upgraded his account.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/feeddeck/feeddeck/pull/24
**Author:** [@ricoberger](https://github.com/ricoberger)
**Created:** 10/11/2023
**Status:** ✅ Merged
**Merged:** 10/12/2023
**Merged by:** [@ricoberger](https://github.com/ricoberger)
**Base:** `main` ← **Head:** `add-in-app-purchases`
---
### 📝 Commits (3)
- [`ab0e443`](https://github.com/feeddeck/feeddeck/commit/ab0e443856011822a582070c6316fa0c82be8f73) [core] Add In-App Purchases
- [`48f52ab`](https://github.com/feeddeck/feeddeck/commit/48f52abbf14c72927dcb7dd4b6fcab7c9b2765d4) Merge branch 'main' into add-in-app-purchases
- [`b02adac`](https://github.com/feeddeck/feeddeck/commit/b02adac6b43d05a36d2dc2f6c35fe2925eb615cb) [core] Add In-App Purchases
### 📊 Changes
**27 files changed** (+1069 additions, -188 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/workflows/continuous-delivery.yaml` (+2 -0)
📝 `CONTRIBUTING.md` (+1 -0)
📝 `app/ios/Podfile.lock` (+14 -0)
📝 `app/ios/Runner.xcodeproj/project.pbxproj` (+4 -0)
📝 `app/lib/models/profile.dart` (+41 -0)
📝 `app/lib/repositories/profile_repository.dart` (+7 -0)
📝 `app/lib/repositories/settings_repository.dart` (+17 -0)
➕ `app/lib/widgets/settings/premium/settings_premium.dart` (+207 -0)
➕ `app/lib/widgets/settings/premium/settings_premium_inapp.dart` (+250 -0)
➕ `app/lib/widgets/settings/premium/settings_premium_inapp_restore.dart` (+198 -0)
📝 `app/lib/widgets/settings/premium/settings_premium_stripe.dart` (+8 -110)
📝 `app/lib/widgets/settings/profile/settings_profile_customer_portal.dart` (+77 -69)
📝 `app/lib/widgets/settings/settings.dart` (+2 -2)
📝 `app/macos/Flutter/GeneratedPluginRegistrant.swift` (+2 -0)
📝 `app/macos/Podfile` (+1 -1)
📝 `app/macos/Podfile.lock` (+16 -2)
📝 `app/macos/Runner.xcodeproj/project.pbxproj` (+7 -0)
📝 `app/pubspec.lock` (+16 -0)
📝 `app/pubspec.yaml` (+2 -1)
📝 `landing/app/pricing/page.tsx` (+8 -3)
_...and 7 more files_
</details>
### 📄 Description
We have to add in-app purchases for the iOS, macOS and Android store, so that users can also get the premium features of the app without using Stripe for payments.
The in-app purchases are only enabled when a user uses the app with the default Supabase environment or with the Supabase environment provided during build time. If a user uses his own Supabase instance, he will not be able to upgrade to the premium tier via in-app purchases.
We are using RevenueCat for in-app purchases, which automatically sends all the events for a user to the "revenuecat-webhooks-v1" edge function. Depending on the received event we can then upgrade / downgrade the users profile. To be able to use RevenueCat as an additional provider to Stripe we also had to add a new "subscriptionProvider" provider column to the "profiles" table, which stores the information via which provider a user upgraded his account.
<!--
Keep PR title verbose enough and add prefix telling about what source it touches e.g "[rss] Add feature xyz" or if the
the PR is not realated to a source use "[core]", e.g. "[core] Fix xyz".
If you add a breaking change within your PR you should add ":warning:" to the title,
e.g. ":warning: [core] My breaking change"
-->
<!--
Description of what have been changed. Please also reference an issue, when available.
-->
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/feeddeck/feeddeck/pull/24
Author: @ricoberger
Created: 10/11/2023
Status: ✅ Merged
Merged: 10/12/2023
Merged by: @ricoberger
Base:
main← Head:add-in-app-purchases📝 Commits (3)
ab0e443[core] Add In-App Purchases48f52abMerge branch 'main' into add-in-app-purchasesb02adac[core] Add In-App Purchases📊 Changes
27 files changed (+1069 additions, -188 deletions)
View changed files
📝
.github/workflows/continuous-delivery.yaml(+2 -0)📝
CONTRIBUTING.md(+1 -0)📝
app/ios/Podfile.lock(+14 -0)📝
app/ios/Runner.xcodeproj/project.pbxproj(+4 -0)📝
app/lib/models/profile.dart(+41 -0)📝
app/lib/repositories/profile_repository.dart(+7 -0)📝
app/lib/repositories/settings_repository.dart(+17 -0)➕
app/lib/widgets/settings/premium/settings_premium.dart(+207 -0)➕
app/lib/widgets/settings/premium/settings_premium_inapp.dart(+250 -0)➕
app/lib/widgets/settings/premium/settings_premium_inapp_restore.dart(+198 -0)📝
app/lib/widgets/settings/premium/settings_premium_stripe.dart(+8 -110)📝
app/lib/widgets/settings/profile/settings_profile_customer_portal.dart(+77 -69)📝
app/lib/widgets/settings/settings.dart(+2 -2)📝
app/macos/Flutter/GeneratedPluginRegistrant.swift(+2 -0)📝
app/macos/Podfile(+1 -1)📝
app/macos/Podfile.lock(+16 -2)📝
app/macos/Runner.xcodeproj/project.pbxproj(+7 -0)📝
app/pubspec.lock(+16 -0)📝
app/pubspec.yaml(+2 -1)📝
landing/app/pricing/page.tsx(+8 -3)...and 7 more files
📄 Description
We have to add in-app purchases for the iOS, macOS and Android store, so that users can also get the premium features of the app without using Stripe for payments.
The in-app purchases are only enabled when a user uses the app with the default Supabase environment or with the Supabase environment provided during build time. If a user uses his own Supabase instance, he will not be able to upgrade to the premium tier via in-app purchases.
We are using RevenueCat for in-app purchases, which automatically sends all the events for a user to the "revenuecat-webhooks-v1" edge function. Depending on the received event we can then upgrade / downgrade the users profile. To be able to use RevenueCat as an additional provider to Stripe we also had to add a new "subscriptionProvider" provider column to the "profiles" table, which stores the information via which provider a user upgraded his account.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.