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
The Purchase Connector feature of the AppsFlyer SDK depends on specific libraries provided by Google and Apple for managing in-app purchases:
46
47
47
-
- For Android, it depends on the [Google Play Billing Library](https://developer.android.com/google/play/billing/integrate) (Supported versions: 5.x.x - 6.x.x).
48
-
- For iOS, it depends on [StoreKit](https://developer.apple.com/documentation/storekit).
48
+
- For Android, it depends on the [Google Play Billing Library](https://developer.android.com/google/play/billing/integrate) (Supported versions: 5.x.x - 7.x.x).
49
+
- For iOS, it depends on [StoreKit](https://developer.apple.com/documentation/storekit) (Supported versions: StoreKit1 and StoreKit2 (beta)).
49
50
50
51
However, these dependencies aren't actively included with the SDK. This means that the responsibility of managing these dependencies and including the necessary libraries in your project falls on you as the consumer of the SDK.
51
52
@@ -86,19 +87,39 @@ To properly set up the configuration object, you must specify certain parameters
86
87
-`logSubscriptions`: If set to `true`, the connector logs all subscription events.
87
88
-`logInApps`: If set to `true`, the connector logs all in-app purchase events.
88
89
-`sandbox`: If set to `true`, transactions are tested in a sandbox environment. Be sure to set this to `false` in production.
90
+
-`storeKitVersion`: (iOS only) Specifies which StoreKit version to use. Defaults to `StoreKitVersion.SK1` if not specified. Use `StoreKitVersion.SK2` for iOS 15.0+ features.
89
91
90
92
Here's an example usage:
91
93
92
94
```javascript
93
95
import appsFlyer, {
94
96
AppsFlyerPurchaseConnector,
95
97
AppsFlyerPurchaseConnectorConfig,
98
+
StoreKitVersion,
96
99
} from'react-native-appsflyer';
97
100
101
+
// Example 1: StoreKit1 (default if storeKitVersion is not specified)
-`transactionId` (string): The unique transaction identifier from the App Store transaction
612
+
613
+
**Note:** This method is iOS-specific and should only be called on iOS devices. On Android, consumable transactions are automatically handled by the Purchase Connector.
614
+
615
+
516
616
### <aid="important-notes"></a>Important Notes
517
617
518
618
1.**iOS StoreKit2**: The StoreKit2 data source is only available on iOS 15.0 and later. Make sure to check the iOS version before using it.
4.**Validation**: The parameters you set will be included in the purchase events sent to AppsFlyer. You can verify this in the AppsFlyer dashboard under the purchase events section.
Copy file name to clipboardExpand all lines: README.md
+9-27Lines changed: 9 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,40 +13,22 @@
13
13
### <aid="plugin-build-for"> This plugin is built for
14
14
15
15
- Android AppsFlyer SDK **v6.17.0**
16
-
- iOS AppsFlyer SDK **v6.17.0**
16
+
- iOS AppsFlyer SDK **v6.17.1**
17
17
- Tested with React-Native **v0.62.0** (older versions might be supported)
18
18
19
-
## <aid="breaking-changes"> ❗❗ Breaking changes when updating to v6.x.x❗❗
20
-
- From version `6.16.2`, `AppsFlyerConsent.forGDPRUser` and `AppsFlyerConsent.forNonGDPRUser` have been **deprecated**. Use the new `AppsFlyerConsent` constructor instead. See [Deprecation Notice](/Docs/RN_CMP.md#deprecation-notice).
19
+
## <aid="release-updates"> Release Updates
21
20
22
-
-From version `6.15.1`, upgraded to targetSDKVersion 34, Java 17, and Gradle 8.7 in [AppsFlyer Android SDK v6.15.1](https://support.appsflyer.com/hc/en-us/articles/115001256006-AppsFlyer-Android-SDK-release-notes).
21
+
-Starting with version `6.17.1` the plugin supports the Purchase Connector for validating and measuring Subscription and In-app purchase events. Integration guide can be found [here](https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/blob/master/Docs/RN_PurchaseConnector.md).
23
22
24
-
- From version `6.15.1`, iOS Minimum deployment target is set to 12.0.
23
+
- Starting with version `6.17.1` the TypeScript interfaces for Purchase Connector data sources have been simplified and are now **breaking changes**:
24
+
-`PurchaseRevenueDataSource.purchaseRevenueAdditionalParametersForProducts()` function has been replaced with `additionalParameters` object
25
+
-`PurchaseRevenueDataSourceStoreKit2.purchaseRevenueAdditionalParametersStoreKit2ForProducts()` function has been replaced with `additionalParameters` object
25
26
26
-
-From version `6.3.0`, we use `xcframework` for iOS platform. Then you need to use cocoapods version >= 1.10
27
+
-Starting with version `6.16.2`, `AppsFlyerConsent.forGDPRUser` and `AppsFlyerConsent.forNonGDPRUser` have been **deprecated**. Use the new `AppsFlyerConsent` constructor instead. See [Deprecation Notice](/Docs/RN_CMP.md#deprecation-notice).
27
28
28
-
- From version `6.2.30`, `logCrossPromotionAndOpenStore` api will register as `af_cross_promotion` instead of `af_app_invites` in your dashboard.<br>
29
-
Click on a link that was generated using `generateInviteLink` api will be register as `af_app_invites`.
29
+
- Starting with version `6.15.1`, upgraded to targetSDKVersion 34, Java 17, and Gradle 8.7 in [AppsFlyer Android SDK v6.15.1](https://support.appsflyer.com/hc/en-us/articles/115001256006-AppsFlyer-Android-SDK-release-notes).
30
30
31
-
- From version `6.0.0` we have renamed the following APIs:
0 commit comments