Changed minimum deployment target to 13.0. If your app targets iOS 12 devices or lower, you should either upgrade to minimum 13.0 or use the previous SDK version.
We added the ability to purchase products using async/await
syntax and modern Product
struct as well as some other helpful methods. SDK gently operates with both StoreKit and StoreKit2 frameworks simultaneously.
func paywalls() async -> [ApphudPaywall]
method which returns paywalls with their App Store Product / SKProduct
models.paywall(_ identifier: String) async -> ApphudPaywall?
method which returns a specific paywall by identifier.func fetchSKProducts() async -> [SKProduct]
method which returns SKProducts
for identifiers added in Apphud Product Hub.func purchase(_ product: ApphudProduct, isPurchasing: Binding<Bool>? = nil) async -> ApphudPurchaseResult
method which returns classic ApphudPurchaseResult
.func restorePurchases() async -> Error?
method.fetchProducts() async throws -> [Product]
method which returns Product structs for identifiers added in Apphud Product Hub. Throwable.func purchase(_ product: Product, isPurchasing: Binding<Bool>? = nil) async -> ApphudAsyncPurchaseResult
method which returns a new ApphudAsyncPurchaseResult
struct.func apphudProductFor(_ product: Product) -> ApphudProduct?
method which returns the corresponding ApphudProduct
that matches theProduct
struct.func product() async throws -> Product?
method to the ApphudProduct
object. Now you can retrieve both SKProduct
and Product
models from within ApphudProduct
object.$isPurchasing
Binding to a boolean value that determines whether the payment is currently in process.var success: Bool
to ApphudPurchaseResult
.func didUpdateNotification() -> Notification.Name
notification method which is posted whenever any purchase or subscription changes. Useful in Swift and SwiftUI.appleSearchAds
enum value made unavailable due to the iAd framework is no longer supported by Apple. Use appleAdsAttribution
instead.getPaywalls(callback: @escaping ([ApphudPaywall]?, Error?) -> Void)
method in favor of paywallsDidLoadCallback(_ callback: @escaping ([ApphudPaywall]) -> Void)
and paywalls() async -> [ApphudPaywall]
methods.productsDidFetchCallback
to fetchProducts
and improved inner logic.refreshStoreKitProducts
method in favor of the improved fetchProducts
method.migratePurchasesIfNeeded {}
method for iOS 15+ devices.start(apiKey: String, ..., callback: (() -> Void)? = nil)
method. Useful for retrieving A/B experiment data as soon as possible.startManually(apiKey: String, ..., callback: (() -> Void)? = nil)
method. Useful for retrieving A/B experiment data as soon as possible.func optOutOfTracking()
method which opts out a user from tracking some parameters, like IP address, IDFA, IDFV, Device Type.isProtectedDataAvailable
is false. Useful for app prewarming in iOS 15+ when the screen is locked.You can now set custom purchase value for successful free trial purchases. This value will be used for trial_started
events for integrations, like Appsflyer or Facebook.
purchase(_ product: ApphudProduct, value: Double, callback: ((ApphudPurchaseResult) -> Void)?)
method.setCustomValueForTrial(_ value: Double, productId: String)
method analog for Observer Mode.What’s inside? In SwiftUI Demo App you will learn how to:
Binding<Bool>
variable.Apphud.didUpdateNotification()
.VStack
.SKProduct
model or new Product
struct.$isPurchasing
Binding.What’s inside? In Swift Demo App you will learn how to:
Apphud.didUpdateNotification()
.UIStackView
.SKProduct
model or new Product
struct.Apphud is the in-app subscription infrastructure that helps you increase app revenue. Like Apphud SDK? Feel free to put a star on Github.