Skip to content

Commit

Permalink
Customer Center DocC updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fire-at-will authored Dec 10, 2024
1 parent 0e81efe commit 105b40b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
16 changes: 12 additions & 4 deletions RevenueCatUI/CustomerCenter/Views/CustomerCenterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ import SwiftUI

#if os(iOS)

/// Warning: This is currently in beta and subject to change.
/// Use the Customer Center in your app to help your customers manage common support tasks.
///
/// A SwiftUI view for displaying a customer support common tasks
/// Customer Center is a self-service UI that can be added to your app to help
/// your customers manage their subscriptions on their own. With it, you can prevent
/// churn with pre-emptive promotional offers, capture actionable customer data with
/// exit feedback prompts, and lower support volumes for common inquiries — all
/// without any help from your support team.
///
/// The `CustomerCenterView` can be used to integrate the Customer Center directly in your app with SwiftUI.
///
/// For more information, see the [Customer Center docs](https://www.revenuecat.com/docs/tools/customer-center).
@available(iOS 15.0, *)
@available(macOS, unavailable)
@available(tvOS, unavailable)
Expand All @@ -38,15 +46,15 @@ public struct CustomerCenterView: View {
/// Create a view to handle common customer support tasks
/// - Parameters:
/// - customerCenterActionHandler: An optional `CustomerCenterActionHandler` to handle actions
/// from the customer center.
/// from the Customer Center.
public init(customerCenterActionHandler: CustomerCenterActionHandler? = nil) {
self.init(customerCenterActionHandler: customerCenterActionHandler, mode: .default)
}

/// Create a view to handle common customer support tasks
/// - Parameters:
/// - customerCenterActionHandler: An optional `CustomerCenterActionHandler` to handle actions
/// from the customer center.
/// from the Customer Center.
init(customerCenterActionHandler: CustomerCenterActionHandler? = nil,
mode: CustomerCenterPresentationMode) {
self._viewModel = .init(wrappedValue:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ import SwiftUI

#if canImport(UIKit) && os(iOS)

/// A UIKit ViewController for displaying a customer support common tasks
/// Use the Customer Center in your app to help your customers manage common support tasks.
///
/// Customer Center is a self-service UI that can be added to your app to help
/// your customers manage their subscriptions on their own. With it, you can prevent
/// churn with pre-emptive promotional offers, capture actionable customer data with
/// exit feedback prompts, and lower support volumes for common inquiries — all
/// without any help from your support team.
///
/// The `CustomerCenterViewController` can be used to integrate the Customer Center directly in your app with UIKit.
///
/// For more information, see the [Customer Center docs](https://www.revenuecat.com/docs/tools/customer-center).
@available(iOS 15.0, *)
@available(macOS, unavailable)
@available(tvOS, unavailable)
Expand Down
4 changes: 2 additions & 2 deletions Sources/CustomerCenter/CustomerCenterPresentationMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import Foundation
/// Presentation options to use with the [presentCustomerCenter](x-source-tag://presentCustomerCenter) View modifiers.
public enum CustomerCenterPresentationMode {

/// Customer center presented using SwiftUI's `.sheet`.
/// Customer Center presented using SwiftUI's `.sheet`.
case sheet

/// Customer center presented using SwiftUI's `.fullScreenCover`.
/// Customer Center presented using SwiftUI's `.fullScreenCover`.
case fullScreen

}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Purchasing/Purchases/Purchases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ public extension Purchases {
}
}

/// Used by `RevenueCatUI` to download customer center data
/// Used by `RevenueCatUI` to download Customer Center data
func loadCustomerCenter() async throws -> CustomerCenterConfigData {
let response = try await Async.call { completion in
self.backend.customerCenterConfig.getCustomerCenterConfig(appUserID: self.appUserID,
Expand Down

0 comments on commit 105b40b

Please sign in to comment.