Skip to content

Commit

Permalink
Merge branch 'ADP-1816-Integrations-for-iOS-320'
Browse files Browse the repository at this point in the history
* ADP-1816-Integrations-for-iOS-320:
  Added renaming of getPaywallConfiguration method
  • Loading branch information
Lutik-sun committed Nov 27, 2024
2 parents a16aa32 + 4b86ade commit dbef2b9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions versioned_docs/version-3.0/get-pb-paywalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ The result of the `createPaywallView` method can be used only once. If you need
<TabItem value="Swift" label="Swift" default>
```swift
import Adapty
import AdaptyUI

guard paywall.hasViewConfiguration else {
// use your custom logic
Expand Down
33 changes: 30 additions & 3 deletions versioned_docs/version-3.0/migration-integrations-to-iOS320.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,36 @@ import TabItem from '@theme/TabItem';

Adapty iOS SDK 3.2.0 is a major release that brought some improvements which however may require some migration steps from you.

1. Update how you handle promotional in-app purchases from the App Store (remove the `defermentCompletion` parameter from the `AdaptyDelegate` method)
2. Remove the `getProductsIntroductoryOfferEligibility` method
3. Update integration configuration: [Adjust](migration-integrations-to-iOS320#adjust), [Appsflyer](migration-integrations-to-iOS320#appsflyer), [Branch](migration-integrations-to-iOS320#branch)
1. Rename the `getViewConfiguration` method to `getPaywallConfiguration`.
2. Update how you handle promotional in-app purchases from the App Store (remove the `defermentCompletion` parameter from the `AdaptyDelegate` method)
3. Remove the `getProductsIntroductoryOfferEligibility` method
4. Update integration configuration: [Adjust](migration-integrations-to-iOS320#adjust), [Appsflyer](migration-integrations-to-iOS320#appsflyer), [Branch](migration-integrations-to-iOS320#branch)

## Rename getViewConfiguration method to getPaywallConfiguration

Update the method name to fetch the paywall's `viewConfiguration`:

```diff
import Adapty
import AdaptyUI

guard paywall.hasViewConfiguration else {
// use your custom logic
return
}

do {
- let paywallConfiguration = try await AdaptyUI.getViewConfiguration(
+ let paywallConfiguration = try await AdaptyUI.getPaywallConfiguration(
forPaywall: paywall
)
// use loaded configuration
} catch {
// handle the error
}
```

For more details about the method, check out [Fetch the view configuration of paywall designed using Paywall Builder](get-pb-paywalls#fetch-the-view-configuration-of-paywall-designed-using-paywall-builder)..

## Update handling of promotional in-app purchases from App Store

Expand Down

0 comments on commit dbef2b9

Please sign in to comment.