Skip to content

Releases: apphud/ApphudSDK

v.4.0.0

13 Oct 11:09

Choose a tag to compare

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 returns false for consumable purchases.
    • updateUserID(_:callback:) now accepts an optional completion callback.
    • willPurchaseProductFrom(paywallIdentifier:, placementIdentifier:) updated.
    • restorePurchases() (both async and callback versions) updated.
  • Renamed:
    • showPendingScreen() to showPendingRuleScreen()
    • pendingScreenController() to pendingRuleScreenController()

v4.0.0-beta5

25 Sep 10:12

Choose a tag to compare

v4.0.0-beta5 Pre-release
Pre-release

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
    dismissPolicy has been removed. Use shouldAutoDismiss instead (defaults to true).

  • 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

16 Sep 12:22

Choose a tag to compare

v4.0.0-beta4 Pre-release
Pre-release

Added option to preload paywall screen with specified cache policy.

v4.0.0-beta2

18 Aug 10:47

Choose a tag to compare

v4.0.0-beta2 Pre-release
Pre-release

What's new in version 4.0.0-beta2:

  • Fixed import for Swift Package Manager that caused compiler error.

v4.0.0-beta

09 Jul 06:54
60d6b13

Choose a tag to compare

v4.0.0-beta Pre-release
Pre-release

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 returns false for consumable purchases.
    • updateUserID(_:callback:) now accepts an optional completion callback.
    • willPurchaseProductFrom(paywallIdentifier:, placementIdentifier:) updated.
    • restorePurchases() (both async and callback versions) updated.
  • Renamed:
    • showPendingScreen() to showPendingRuleScreen()
    • pendingScreenController() to pendingRuleScreenController()

v3.6.2

28 Mar 03:12
a4d2b93

Choose a tag to compare

What's new in v3.6.2:

  • Improved consumables tracking while using Apphud SDK in Observer mode and purchasing through the StoreKit2.

v3.6.0

10 Mar 08:18
9dc4319

Choose a tag to compare

What's New in v3.6.0:

  • [Breaking] The addAttribution method has been renamed to setAttribution, introducing the new ApphudAttributionData class. This allows developers to override attribution key mappings if needed.
  • Added support for custom attribution. Developers can now pass any attribution data to the ApphudAttributionData class, which will be fetched and displayed in all Apphud Charts.

Attribution Migration Guide:

  • For Apple Search Ads, replace the addAttribution method with the following:
Apphud.setAttribution(data: ApphudAttributionData(rawData: [:]), from: .appleAdsAttribution, identifier: asaToken, callback: nil)
  • For AppsFlyer, replace the addAttribution method with the following:
Apphud.setAttribution(data: ApphudAttributionData(rawData: conversionInfo), from: .appsFlyer, identifier: AppsFlyerLib.shared().getAppsFlyerUID(), callback: nil)
  • For Firebase, replace the addAttribution method 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)

v3.5.8

13 Jan 09:55
edad687

Choose a tag to compare

What's new in v3.5.8:

  • Fixed a bug that could lead to consumable purchases not to be tracked after purchasing an auto-renewable subscription in certain scenarios
  • Merged #127

v3.5.7

25 Nov 12:56
a022887

Choose a tag to compare

What's new in v3.5.7:

  • Support for Web-to-Web flows. This introduces a new SDK method attributeFromWeb(data: [AnyHashable: Any], callback: @escaping (Bool, ApphudUser?) -> Void). Added ability to restore by email.

v3.5.5

23 Oct 12:31
5e27d38

Choose a tag to compare

What's new in v3.5.5:

  • Initial support for Web-to-Web flow. This introduces a new SDK method attributeFromWeb(data: [AnyHashable: Any], callback: @escaping (Bool, ApphudUser?) -> Void).
  • Fixed a bug that could lead to missing a consumable purchase in rare cases.