mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-03-09 07:02:01 -05:00
[PR #24] [MERGED] [core] Add In-App Purchases #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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.