You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/ios/ios-sdk-call-order.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ If you have the customer user ID at app launch, pass it into `activate()` direct
25
25
| 1 | Initialize your MMP or analytics SDK (AppsFlyer, Adjust, PostHog, Branch) | App launch, first | Wait for the MMP's UID callback, for example `getAppsFlyerUID`. |
26
26
| 2a |`Adapty.activate(with: config)` with `customerUserId` set on the config | App launch, after step 1, if you have the customer user ID | Recommended. No anonymous profile is ever created. |
27
27
| 2b |`Adapty.activate(with: config)` without `customerUserId`| App launch, after step 1, if you don't have the customer user ID (or never collect one) | Adapty creates an anonymous profile. |
28
-
| 3 |`Adapty.setIntegrationIdentifier(key:value:)` for each MMP | After step 2, before any user-action call | Required so MMP IDs land on the correct profile. |
28
+
| 3 |`Adapty.setIntegrationIdentifier(...)` for each MMP| After step 2, before any user-action call | Required so MMP IDs land on the correct profile. |
29
29
| 4 |`try await Adapty.identify("YOUR_USER_ID")`| After step 3 (or step 2 if no MMP), before step 5 — only on path 2b with authentication | Always `await`. Concurrent calls during `identify` produce `#3006 profileWasChanged`. |
30
30
| 5 |`getPaywall`, `getPaywallProducts`, `restorePurchases`, `makePurchase`, `updateAttribution`, `updateProfile`| After step 4 if you call `identify`; otherwise after step 3 (or step 2 if no MMP) | These calls need a stable profile. |
Adapty iOS SDK 4.0 drops CocoaPods support. Install the SDK with [Swift Package Manager](sdk-installation-ios#install-adapty-sdk).
29
+
30
+
If your project still uses CocoaPods, remove the `Adapty` and `AdaptyUI` pods from your `Podfile`, run `pod install` to clean them up, then add the package in Xcode via **File → Add Package Dependency** using `https://github.com/adaptyteam/AdaptySDK-iOS.git`.
23
31
24
32
## Removed APIs
25
33
@@ -221,3 +229,55 @@ Two changes affect every existing call site:
221
229
+ case remote(url: URL, preview: AdaptyUICustomImageAsset?, resolution: CGSize?)
222
230
+ case player(item: AVPlayerItem, player: AVPlayer, preview: AdaptyUICustomImageAsset?, resolution: CGSize?)
223
231
```
232
+
233
+
## Attribution and integration identifiers
234
+
235
+
### updateAttribution(_:source:)
236
+
237
+
The `source` parameter changes from `String` to the new `AdaptyAttributionSource` type, and the previously nested `AdaptyProfile.AttributionSource` is renamed to the top-level `AdaptyAttributionSource`. Use one of the predefined sources, or pass a string literal for any other source — `AdaptyAttributionSource` conforms to `ExpressibleByStringLiteral`, so existing string-literal calls keep compiling.
Predefined sources: `.appleAds`, `.adjust`, `.appsflyer`, `.branch`, `.tenjin`. If you keep the source in a `String` variable, wrap it: `AdaptyAttributionSource(rawValue: yourSource)`.
245
+
246
+
### setIntegrationIdentifier(_:)
247
+
248
+
`setIntegrationIdentifier(key:value:)` is replaced by a variadic method that takes one or more `AdaptyIntegrationIdentifier` values. Use the predefined factory methods instead of raw string keys:
In Xcode, go to **File** -> **Add Package Dependency...**. Note that the steps to add package dependencies may vary between Xcode versions, so refer to Xcode documentation if needed.
59
+
Adapty SDK is installed via Swift Package Manager. In Xcode, go to **File** -> **Add Package Dependency...**. Note that the steps to add package dependencies may vary between Xcode versions, so refer to Xcode documentation if needed.
62
60
63
61
1. Enter the repository URL:
64
62
```
@@ -76,36 +74,10 @@ In Xcode, go to **File** -> **Add Package Dependency...**. Note that the steps t
76
74
4. Click **Add Package** to complete the installation.
77
75
5.**Verify installation:** In your project navigator, you should see "Adapty" (and "AdaptyUI" if selected) under **Package Dependencies**.
CocoaPods is now in maintenance mode, with development officially stopped. We recommend switching to [Swift Package Manager](sdk-installation-ios#install-adapty-sdk).
86
-
77
+
:::important
78
+
Adapty iOS SDK 4.0 is a pre-release. Swift Package Manager does not resolve beta versions through the **Up to Next Major Version** (`from:`) rule, so you must pin the exact version. In Xcode, set the **Dependency Rule** to **Exact Version** and enter `4.0.0-beta.1`. In `Package.swift`, use `.exact("4.0.0-beta.1")`. See [Migrate Adapty iOS SDK to v4](migration-to-ios-sdk-v4).
87
79
:::
88
80
89
-
1. Add Adapty to your `Podfile`. Choose the modules you need:
90
-
91
-
1.**Adapty** is the mandatory module.
92
-
2.**AdaptyUI** is an optional module you need if you plan to use the [Adapty Paywall Builder](adapty-paywall-builder).
93
-
94
-
```shell showLineNumbers title="Podfile"
95
-
pod 'Adapty'
96
-
pod 'AdaptyUI'# optional module needed only for Paywall Builder
97
-
```
98
-
99
-
2. Run:
100
-
101
-
```sh showLineNumbers title="Shell"
102
-
pod install
103
-
```
104
-
105
-
This will create a `.xcworkspace` file for your app. Use this file for all future development.
106
-
</TabItem>
107
-
</Tabs>
108
-
109
81
## Activate Adapty module of Adapty SDK
110
82
111
83
Activate the Adapty SDK in your app code.
@@ -401,38 +373,3 @@ targetSettings: [
401
373
"AdaptyUIBuilder": .init().swiftVersion("6"),
402
374
]
403
375
```
404
-
405
-
#### Swift 6 build errors caused by Podfile SWIFT_VERSION override
406
-
407
-
When building for iOS with [CocoaPods](sdk-installation-ios#install-adapty-sdk), you may see Swift 6 compilation errors on Adapty pod targets. Typical symptoms include `@Sendable` mismatches in `AdaptyUIBuilderLogic`, missing `Sendable` conformance on Adapty types, or actor isolation errors.
408
-
409
-
The Adapty pods declare `s.swift_version = '6.0'` and require Swift 6 to build. Your own app code can stay on Swift 5 — only the Adapty pod targets (`Adapty`, `AdaptyUI`, `AdaptyUIBuilder`, `AdaptyLogger`) need to build with Swift 6.
410
-
411
-
The most common cause is a `post_install` hook in your `Podfile` that rewrites `SWIFT_VERSION` for every pod target:
412
-
413
-
```ruby showLineNumbers title="Podfile"
414
-
post_install do |installer|
415
-
installer.pods_project.targets.each do |target|
416
-
target.build_configurations.each do |config|
417
-
config.build_settings['SWIFT_VERSION'] ='5.9'
418
-
end
419
-
end
420
-
end
421
-
```
422
-
423
-
**Fix**: Exclude the Adapty pod targets from the override:
0 commit comments