Releases: apphud/ApphudSDK
Releases · apphud/ApphudSDK
v.4.0.0
What's new in v4.0.0:
Paywall Screens (Visual Paywalls)
Apphud now supports fully customizable paywalls, designed in your favorite design tools and delivered over-the-air.
New APIs:
preloadPaywallScreens(placementIdentifiers: [String])
Pre-caches specified paywall screens.fetchPaywallScreen(_: ApphudPaywall, maxTimeout: TimeInterval = APPHUD_PAYWALL_SCREEN_LOAD_TIMEOUT, completion: @escaping (ApphudPaywallScreenFetchResult) -> Void)
Fetches a paywall screen with an optional timeout.unloadPaywallScreen(_ paywall: ApphudPaywall)
Unloads a previously fetched screen.ApphudPaywallScreenController
New class for managing the presentation of visual paywalls.
-
New SwiftUI API
Added:func fetchPaywallView( _ paywall: ApphudPaywall, maxTimeout: TimeInterval = APPHUD_PAYWALL_SCREEN_LOAD_TIMEOUT, cachePolicy: ApphudPaywallCachePolicy = .sandboxAndProduction, onDismiss: (() -> Void)? = nil ) async throws -> ApphudPaywallView
Model Enhancements
ApphudNonRenewingPurchase
isConsumablePurchase() async -> Bool
Indicates whether the purchase is consumable.
ApphudPaywall
hasVisualPaywall() -> Bool
Checks if a paywall has a visual screen.isVisualPaywallPreloaded() -> Bool
Checks if a visual paywall has been preloaded.
ApphudProduct
macroValues(locale: String = Locale.current.apphudLanguageCode()) async -> [String: any Sendable]?
Returns macro values for the given locale.
ApphudPurchaseResult
isRestoreResult: Bool
New property to indicate if the result came from a restore operation.
New Methods
refreshUserData(callback: @escaping ((ApphudUser?) -> Void))
Manually refreshes the user data from Apphud servers.
Breaking Changes
- Removed:
paywallsDidLoadCallback(maxAttempts:_:)paywallClosed(_:)
- Changed:
hasPremiumAccess()now returnsfalsefor consumable purchases.updateUserID(_:callback:)now accepts an optional completion callback.willPurchaseProductFrom(paywallIdentifier:, placementIdentifier:)updated.restorePurchases()(both async and callback versions) updated.
- Renamed:
showPendingScreen()toshowPendingRuleScreen()pendingScreenController()topendingRuleScreenController()
v4.0.0-beta5
What’s New in v4.0.0-beta5
-
Updated Paywall Callbacks
Paywall screens now use a new set of callbacks:onTransactionStarted: ((ApphudProduct?) -> Void)onTransactionCompleted: ((ApphudPurchaseResult) -> Void)onCloseButtonTapped: (() -> Void)
-
Dismiss Policy Changes
dismissPolicyhas been removed. UseshouldAutoDismissinstead (defaults totrue). -
New SwiftUI API
Added:func fetchPaywallView( _ paywall: ApphudPaywall, maxTimeout: TimeInterval = APPHUD_PAYWALL_SCREEN_LOAD_TIMEOUT, cachePolicy: ApphudPaywallCachePolicy = .sandboxAndProduction, onDismiss: (() -> Void)? = nil ) async throws -> ApphudPaywallView
v4.0.0-beta4
Added option to preload paywall screen with specified cache policy.
v4.0.0-beta2
What's new in version 4.0.0-beta2:
- Fixed import for Swift Package Manager that caused compiler error.
v4.0.0-beta
What's new in v4.0.0-beta:
This is a beta release of Apphud iOS SDK 4.0.0 with support for fully customizable paywall screens and several breaking changes.
Paywall Screens (Visual Paywalls)
Apphud now supports fully customizable paywalls, designed in your favorite design tools and delivered over-the-air.
New APIs:
preloadPaywallScreens(placementIdentifiers: [String])
Pre-caches specified paywall screens.fetchPaywallScreen(_: ApphudPaywall, maxTimeout: TimeInterval = APPHUD_PAYWALL_SCREEN_LOAD_TIMEOUT, completion: @escaping (ApphudPaywallScreenFetchResult) -> Void)
Fetches a paywall screen with an optional timeout.unloadPaywallScreen(_ paywall: ApphudPaywall)
Unloads a previously fetched screen.ApphudPaywallScreenController
New class for managing the presentation of visual paywalls.
Model Enhancements
ApphudNonRenewingPurchase
isConsumablePurchase() async -> Bool
Indicates whether the purchase is consumable.
ApphudPaywall
hasVisualPaywall() -> Bool
Checks if a paywall has a visual screen.isVisualPaywallPreloaded() -> Bool
Checks if a visual paywall has been preloaded.
ApphudProduct
macroValues(locale: String = Locale.current.apphudLanguageCode()) async -> [String: any Sendable]?
Returns macro values for the given locale.
ApphudPurchaseResult
isRestoreResult: Bool
New property to indicate if the result came from a restore operation.
New Methods
refreshUserData(callback: @escaping ((ApphudUser?) -> Void))
Manually refreshes the user data from Apphud servers.
Breaking Changes
- Removed:
paywallsDidLoadCallback(maxAttempts:_:)paywallClosed(_:)
- Changed:
hasPremiumAccess()now returnsfalsefor consumable purchases.updateUserID(_:callback:)now accepts an optional completion callback.willPurchaseProductFrom(paywallIdentifier:, placementIdentifier:)updated.restorePurchases()(both async and callback versions) updated.
- Renamed:
showPendingScreen()toshowPendingRuleScreen()pendingScreenController()topendingRuleScreenController()
v3.6.2
v3.6.0
What's New in v3.6.0:
- [Breaking] The
addAttributionmethod has been renamed tosetAttribution, introducing the newApphudAttributionDataclass. This allows developers to override attribution key mappings if needed. - Added support for custom attribution. Developers can now pass any attribution data to the
ApphudAttributionDataclass, which will be fetched and displayed in all Apphud Charts.
Attribution Migration Guide:
- For Apple Search Ads, replace the
addAttributionmethod with the following:
Apphud.setAttribution(data: ApphudAttributionData(rawData: [:]), from: .appleAdsAttribution, identifier: asaToken, callback: nil)- For AppsFlyer, replace the
addAttributionmethod with the following:
Apphud.setAttribution(data: ApphudAttributionData(rawData: conversionInfo), from: .appsFlyer, identifier: AppsFlyerLib.shared().getAppsFlyerUID(), callback: nil)- For Firebase, replace the
addAttributionmethod with the following:
Apphud.setAttribution(data: ApphudAttributionData(rawData: [:]), from: .firebase, identifier: appInstanceID)- For custom attribution, use the following code:
Apphud.setAttribution(data: ApphudAttributionData(rawData: yourAttributionDataHere), from: .custom, identifier: nil)