Skip to content

Releases: apphud/ApphudSDK

3.0.0

21 Feb 10:56
Compare
Choose a tag to compare

We have worked hard on a new major iOS SDK update and happy to announce that it is now available.

What's new in iOS SDK 3.0.0:

Availability

  • 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 previous SDK version.

Swift Concurrency

We added 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.

  • Added asynchronous func paywalls() async -> [ApphudPaywall] method which returns paywalls with their App Store Product / SKProduct models.
  • Added asynchronous paywall(_ identifier: String) async -> ApphudPaywall? method which returns specific paywall by identifier.
  • Added asynchronous func fetchSKProducts() async -> [SKProduct] method which returns SKProducts for identifiers added in Apphud Product Hub.
  • Added asynchronous func purchase(_ product: ApphudProduct, isPurchasing: Binding<Bool>? = nil) async -> ApphudPurchaseResult method which returns classic ApphudPurchaseResult.
  • Added new asynchronous func restorePurchases() async -> Error? method.

StoreKit 2

  • Added asynchronous fetchProducts() async throws -> [Product] method which returns Product structs for identifiers added in Apphud Product Hub. Throwable.
  • Added asynchronous func purchase(_ product: Product, isPurchasing: Binding<Bool>? = nil) async -> ApphudAsyncPurchaseResult method which returns new ApphudAsyncPurchaseResult struct.
  • Added func apphudProductFor(_ product: Product) -> ApphudProduct? method which returns corresponding ApphudProduct that matches Product struct.
  • Added asynchronous func product() async throws -> Product? method to ApphudProduct object. Now you can retrieve both SKProduct and Product models from within ApphudProduct object.

SwiftUI

  • Added optional $isPurchasing Binding to a boolean value that determines whether the payment is currently in process.
  • New Apphud SwiftUI Demo App.

General Changes

  • Added new var success: Bool to ApphudPurchaseResult.
  • Added new 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 iAd framework is no longer supported by Apple. Use appleAdsAttribution instead.
  • Removed getPaywalls(callback: @escaping ([ApphudPaywall]?, Error?) -> Void) method in favor of paywallsDidLoadCallback(_ callback: @escaping ([ApphudPaywall]) -> Void) and paywalls() async -> [ApphudPaywall] methods.
  • Renamed productsDidFetchCallback to fetchProducts and improved inner logic.
  • Removed refreshStoreKitProducts method in favor of improved fetchProducts method.
  • Deprecated migratePurchasesIfNeeded {} method for iOS 15+ devices.
  • Fixed a bug when the very first in-app purchase was tracked with zero price if product id was not beforehand added in Product Hub.
  • Added optional callback to start(apiKey: String, ..., callback: (() -> Void)? = nil) method. Useful for retrieving A/B experiment data as soon as possible.
  • Added optional callback to startManually(apiKey: String, ..., callback: (() -> Void)? = nil) method. Useful for retrieving A/B experiment data as soon as possible.
  • Multiple refactors and internal improvements.
  • Redesigned Apphud Swift Demo App.

Privacy

  • Added new func optOutOfTracking() method which opts out a user from tracking of some parameters, like IP address, IDFA, IDFV, Device Type.
  • Added initialization delay when app is inactive and isProtectedDataAvailable is false. Useful for app prewarming in iOS 15+ when screen is locked.

Custom Purchase Value

You can now set custom purchase value for successful free trial purchases. This value will be used for trial_started event for integrations, like Appsflyer or Facebook.

  • Added new purchase(_ product: ApphudProduct, value: Double, callback: ((ApphudPurchaseResult) -> Void)?) method.
  • Added setCustomValueForTrial(_ value: Double, productId: String) method analog for Observer Mode.

Apphud SwiftUI Demo App

What’s inside? In SwiftUI Demo App you will learn how to:

  • present and dismiss a paywall using Binding<Bool> variable
  • update view according to subscription or puchase changes using Apphud.didUpdateNotification().
  • fetch paywalls and display multiple Apphud products on a view using VStack.
  • control purchase button text and availability.
  • use universal helper method to display pricing terms for any product with or without introductry offer.
  • make a purchase with both options: with SKProduct model or new Product struct.
  • update UI while purchase is in a process using $isPurchasing Binding.
  • dismiss paywall after successful purchase.

Redesigned Apphud Swift Demo App

What’s inside? In Swift Demo App you will learn how to:

  • update view according to subscription or puchase changes using Apphud.didUpdateNotification().
  • fetch paywalls and display multiple Apphud products on a view using UIStackView.
  • use universal helper method to display pricing terms for any product with or without introductry offer.
  • make a purchase with both options: with SKProduct model or new Product struct.
  • dismiss paywall after successful purchase.

Like Apphud SDK? Feel free to put a star on Github 🙂

2.8.8

24 Aug 14:29
Compare
Choose a tag to compare

Bug fix for Flutter SDK

2.8.6

18 Aug 14:38
Compare
Choose a tag to compare

What’s new in 2.8.6:

  • Added func userDidLoad(rawPaywalls: [ApphudPaywall]) in ApphudDelegate. This method called when user is registered in Apphud
  • Added func paywallsDidFullyLoad(paywalls: [ApphudPaywall]) in ApphudDelegate. This method called when paywalls are fully loaded with their SKProducts.

2.8.5

08 Aug 07:52
97a583a
Compare
Choose a tag to compare

What’s new in 2.8.5:

  • hasActiveSubscription(), hasPremiumAccess() improvements and bug fixes
  • Methods descriptions improvements
  • Added purchasePromo() logging
  • Added checkTransactions logic for force receipt sending if a new transaction was found.

2.8.2

10 Jun 07:25
Compare
Choose a tag to compare

What's new in 2.8.2:

  • Improved interaction with Apple Search Ads attribution.
  • Updated methods description and improve documentation.

2.8.1

29 Apr 16:26
Compare
Choose a tag to compare

What's new in 2.8.1:

  • Added new method willPurchaseProductFromPaywall(_ identifier: String) which allows you to specify paywall id in observer mode. This will allow you to use our A/B experiments in Observer Mode.
  • Deprecated facebook integration from SDK because it is now redundant.
  • Significant improvements and lots of refactoring related to request handling, logging and purchase tracking.

2.7.0

06 Apr 14:14
989a3b7
Compare
Choose a tag to compare

What’s new in 2.7.0:

  • WatchOS/tvOS support
  • Added new willPurchaseProductFromPaywall method, which allows to use A/B experiments in Observer Mode
  • Internal cache improvements and bug fixes
  • Now you can delete or update promotionals using the same SDK method grantPromotional or via web interface. Pass 0 daysCount to delete active promotional.

2.6.1

14 Mar 16:17
53d499a
Compare
Choose a tag to compare

What’s new in 2.6.1:

  • Fixed a bug when unstable internet connection could affect to products groups request
  • Fixed a bug when update user method could send nil id

2.6.0

11 Mar 09:40
cbc80e7
Compare
Choose a tag to compare

What’s new in 2.6.0:

  • Update paywalls and products groups cache
  • Add new func hasPremiumAccess - returns true if user has active subscription or non renewing purchase (lifetime)
  • Update methods descriptions

2.5.7

22 Feb 12:14
Compare
Choose a tag to compare

What’s new in 2.5.7:

  • Fixed 403 server error bug, when user could be blocked from sever 403 error code
  • Change func paywallShown(_ paywall: ApphudPaywall) and func paywallClosed(_ paywall: ApphudPaywall) to non optional paywall parameter
  • Add push token cache
  • Update general cache time
  • Update some Logs