The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
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.1:
- Improved reinstall tracking
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 🙂
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 🙂
Bug fix for Flutter SDK
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`.
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.
What's new in 2.8.2:
* Improved interaction with Apple Search Ads attribution.
* Updated methods description and improve documentation.
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.
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.
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
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