Swiftpack.co - frios/RC-IAP as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by frios.
frios/RC-IAP 1.000.001
A RevenueCat based In-App Purchase Package
⭐️ 0
🕓 20 weeks ago
iOS
.package(url: "https://github.com/frios/RC-IAP.git", from: "1.000.001")

RC-IAP

A RevenueCat based in-app purchase package.

RC-IAP is a simple to implement RevenueCat based in-app purchase system. It takes care of displaying a purchase page with a Title, Image, and a message from the developer, all of which are optional (Title defaults to "In-App Purchases").

Setup is easy following the steps outlined below.

  1. Set up your RevenueCat products as described here: https://docs.revenuecat.com/docs/getting-started (this is the hardest part)

  2. Be sure to include InApp Purchases as an app capability

  3. In your app, instantiate IAPManager with your RevenueCat API Key

  4. Instantiate an IAPView and pass it the previously instantiated IAPManager as an environmentObject

struct ContentView: View {
    let iapManager = IAPManager(apiKey: revenueCatAPIKey)

    var body: some View {
        IAPView() //or pass in title, imageName and/or message
            .environmentObject(iapManager)
    }
}
  1. Thats all there is to it!

GitHub

link
Stars: 0
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics