Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/5.5.0 #4308

Merged
merged 8 commits into from
Sep 30, 2024
Merged

Release/5.5.0 #4308

merged 8 commits into from
Sep 30, 2024

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Sep 27, 2024

🫂 Customer Center 🫂

This release adds public beta support for the new Customer Center on iOS 15.0+.

This central hub is a self-service section that can be added to your app to help your users manage their subscriptions on their own, reducing the support burden on developers
like you so you can spend more time building apps and less time dealing with support issues. We are hoping adding this new section to your app can help you reduce customer support
interactions, obtain feedback from your users and ultimately reduce churn by retaining them as subscribers, helping you make more money.

See our Customer Center documentation for more information.

Features currently available

  • Users can cancel current subscriptions
  • Users can ask for refunds
  • Users can change their subscription plans
  • Users can restore previous purchases and contact your support email if they have trouble restoring
  • Users will be asked to update their app if they are on an older version before being able to contact your support email
  • Developers can ask for reasons for cancellations or refunds, and automatically offer promo offers to retain users
  • Configuration is done in the RevenueCat dashboard, and advanced configuration is available via JSON

Limitations

  • Only available on iOS 15+
  • Limited visual configuration options in the dashboard. It is possible to configure the Customer Center via JSON.
  • We are exposing a SwiftUI view and a modifier at the moment. We haven't built a UIKit wrapper to help integrating on UIKit apps, but it's in the roadmap.

How to enable

You can use the CustomerCenterView view directly:

var body: some View {
    Group {
        NavigationStack {
            HomeView()
                .navigationTitle("Home")
                .navigationBarTitleDisplayMode(.inline)
                .toolbar {
                    ToolbarItem(placement: .topBarLeading) {
                        Button {
                        } label: {
                            Image(systemName: "line.3.horizontal")
                        }
                    }
                    ToolbarItem(placement: .topBarTrailing) {
                        Button {
                            self.isCustomerCenterPresented = true
                        } label: {
                            Image(systemName: "person.crop.circle")
                        }
                    }
                }
        }
    }
    .foregroundColor(.white)
    .sheet(isPresented: $isCustomerCenterPresented) {
        CustomerCenterView()
    }
}

Or you can use the modifier:

VStack {
    Button {
        self.presentingCustomerCenter = true
    } label: {
        TemplateLabel(name: "Customer Center", icon: "person.fill")
    }
}
.presentCustomerCenter(isPresented: self.$presentingCustomerCenter) {
    self.presentingCustomerCenter = false
}

Listening to events

You can listen to events in the Customer Center using the customerCenterActionHandler closure:

CustomerCenterView { customerCenterAction in
    switch customerCenterAction {
    case .restoreStarted:
    case .restoreFailed(_):
    case .restoreCompleted(_):
    case .showingManageSubscriptions:
    case .refundRequestStarted(_):
    case .refundRequestCompleted(_):
    }
}

or if using the modifier:

.presentCustomerCenter(
    isPresented: self.$presentingCustomerCenter,
    customerCenterActionHandler: { action in
        switch action {
        case .restoreCompleted(let customerInfo):
        case .restoreStarted:
        case .restoreFailed(let error):
        case .showingManageSubscriptions:
        case .refundRequestStarted(let productId):
        case .refundRequestCompleted(let status):
        case .feedbackSurveyCompleted(let surveyOptionID):
        }
    }
) {
    self.presentingCustomerCenter = false
}

Release Notes

RevenueCatUI SDK

Paywall Components

🐞 Bugfixes

Customer Center

🐞 Bugfixes

🔄 Other Changes

@vegaro vegaro marked this pull request as ready for review September 27, 2024 10:12
@vegaro vegaro requested a review from a team September 27, 2024 10:12
Copy link
Member

@aboedo aboedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hype

@tonidero
Copy link
Contributor

Ah this happened to me before, since the last commit is marked [skip ci] we won't be running the tests... We need to add another commit or rename the last one.

@vegaro
Copy link
Contributor Author

vegaro commented Sep 27, 2024

Thanks Toni. Just made a commit

@vegaro vegaro merged commit fa819d9 into main Sep 30, 2024
42 checks passed
@vegaro vegaro deleted the release/5.5.0 branch September 30, 2024 12:29
nyeu pushed a commit that referenced this pull request Oct 2, 2024
Co-authored-by: RCGitBot <dev+RCGitBot@revenuecat.com>
Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com>
MojtabaHs pushed a commit to MojtabaHs/purchases-ios that referenced this pull request Dec 12, 2024
Co-authored-by: RCGitBot <dev+RCGitBot@revenuecat.com>
Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com>
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.

5 participants