Skip to content

Commit

Permalink
6.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
af-vero committed Feb 18, 2024
1 parent 7630d20 commit 69b8c9b
Show file tree
Hide file tree
Showing 10 changed files with 169 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Versions

## v6.13.0
* Update iOS SDK version - 6.13.0
* Update Android SDK version - 6.13.0
* Added new iOS and Android API `setDeepLinkTimeout`
* Added new iOS and Android API `enableTCFDataCollection`
* Added new iOS and Android API `setConsentData`
* Added new iOS and Android API `setNonGDPRUser`

## v6.12.22
* Update EDM4U - 1.2.177
* Fix AFUnityUtils import
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

### <a id="plugin-build-for"> This plugin is built for

- Android AppsFlyer SDK **v6.12.2**
- iOS AppsFlyer SDK **v6.12.2**
- Android AppsFlyer SDK **v6.13.0**
- iOS AppsFlyer SDK **v6.13.0**

---
### <a id="init-sdk-deeplink"> AD_ID permission for Android
Expand Down
Binary file removed appsflyer-unity-plugin-6.12.22.unitypackage
Binary file not shown.
Binary file added appsflyer-unity-plugin-6.13.0.unitypackage
Binary file not shown.
6 changes: 3 additions & 3 deletions deploy/build_unity_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ echo "Start Build for appsflyer-unity-plugin.unitypackage"

DEPLOY_PATH=outputs
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-plugin-6.12.22.unitypackage"
PACKAGE_NAME="appsflyer-unity-plugin-6.13.0.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
echo "moving the external dependency manager to root"
mv external-dependency-manager-1.2.177.unitypackage ..

# Build the .unitypackage
/Volumes/T7Shield/Unity/2022.3.10f1/Unity.app/Contents/MacOS/Unity \
/Applications/Unity/Hub/Editor/2020.3.34f1/Unity.app/Contents/MacOS/Unity \
-gvh_disable \
-batchmode \
-importPackage external-dependency-manager-1.2.177.unitypackage \
Expand All @@ -23,7 +23,7 @@ mv external-dependency-manager-1.2.177.unitypackage ..
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.12.22.unitypackage" \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-6.13.0.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info."


Expand Down
6 changes: 3 additions & 3 deletions deploy/strict_mode_build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Start Build for appsflyer-unity-plugin.unitypackage. Strict Mode."

DEPLOY_PATH=outputs
UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity"
PACKAGE_NAME="appsflyer-unity-plugin-strict-mode-6.12.22.unitypackage"
PACKAGE_NAME="appsflyer-unity-plugin-strict-mode-6.13.0.unitypackage"
mkdir -p $DEPLOY_PATH

#move external dependency manager
Expand All @@ -26,7 +26,7 @@ echo "Commenting out functions. Done."


# Build the .unitypackage
/Volumes/T7Shield/Unity/2022.3.10f1/Unity.app/Contents/MacOS/Unity \
/Applications/Unity/Hub/Editor/2020.3.34f1/Unity.app/Contents/MacOS/Unity \
-gvh_disable \
-batchmode \
-importPackage external-dependency-manager-1.2.177.unitypackage \
Expand All @@ -37,7 +37,7 @@ echo "Commenting out functions. Done."
Assets \
$PWD/$DEPLOY_PATH/$PACKAGE_NAME \
-quit \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-strict-mode-6.12.22.unitypackage" \
&& echo "package exported successfully to outputs/appsflyer-unity-plugin-strict-mode-6.13.0.unitypackage" \
|| echo "Failed to export package. See create_unity_core.log for more info."


Expand Down
75 changes: 75 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ The list of available methods for this plugin is described below.
- [setResolveDeepLinkURLs](#setresolvedeeplinkurls)
- [setOneLinkCustomDomain](#setonelinkcustomdomain)
- [setCurrencyCode](#setcurrencycode)
- [setDeepLinkTimeout](#setDeepLinkTimeout)
- [enableTCFDataCollection](#enableTCFDataCollection)
- [setConsentData](#setConsentData)
- [setNonGDPRUser](#setNonGDPRUser)
- [recordLocation](#recordlocation)
- [anonymizeUser](#anonymizeuser)
- [getAppsFlyerId](#getappsflyerid)
Expand Down Expand Up @@ -366,6 +370,77 @@ AppsFlyer.setCurrencyCode("GBP");

---

---

### setDeepLinkTimeout
**`void setDeepLinkTimeout(long deepLinkTimeout)`**

Setting the deepLink timeout value that should be used for DDL.
If you want to use it, set it before the DDL setting.

| parameter | type | description |
| ------------------ |----------|------------------|
| `deepLinkTimeout` | `long` | in milliseconds |

*Example:*

```c#
AppsFlyer.setDeepLinkTimeout(2000);
```

---

### enableTCFDataCollection
**`void enableTCFDataCollection(bool shouldCollectTcfData)`**

Calling enableTCFDataCollection(true) will enable collecting and sending any TCF related data.
Calling enableTCFDataCollection(false) will disable the collection of TCF related data and from sending it.

| parameter | type | description |
| ------------------------ |----------|-------------------------------- |
| `shouldCollectTcfData` | `bool` | true to enable data collection |

*Example:*

```c#
AppsFlyer.enableTCFDataCollection(true);;
```

---

### setConsentData
**`void setConsentData(bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization)`**

Sets or updates the user consent data related to GDPR and DMA regulations for advertising and data usage purposes within the application.
call this method when GDPR user is true

| parameter | type | description |
| ---------------------------------- |----------|---------------------------------------------------------------------- |
| `hasConsentForDataUsage` | `bool` | user agrees / disagrees to using their data for advertising purposes |
| `hasConsentForAdsPersonalization` | `bool` | user agrees / disagrees to using their data for ad personalization |

*Example:*

```c#
AppsFlyer.setConsentData(true, true);
```

---

### setNonGDPRUser
**`void setNonGDPRUser()`**

Sets or updates the user consent data related to GDPR and DMA regulations for advertising and data usage purposes within the application.
call this method when GDPR user is false

*Example:*

```c#
AppsFlyer.setNonGDPRUser();
```

---

### recordLocation
**`void recordLocation(double latitude, double longitude)`**

Expand Down
78 changes: 78 additions & 0 deletions docs/BasicIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,84 @@ If it’s important for you to associate the install event with the CUID, call `


---

## Send consent for DMA compliance

Unity SDK plugin offers two alternative methods for gathering consent data:

Through a Consent Management Platform (CMP): If the app uses a CMP that complies with the Transparency and Consent Framework (TCF) v2.2 protocol, the Unity SDK can automatically retrieve the consent details.

OR

Through a dedicated Unity SDK API: Developers can pass Google's required consent data directly to the Unity SDK using a specific API designed for this purpose.

### Use CMP to collect consent data

1. Initialize the SDK.
2. Call enableTCFDataCollection(true) api before startSDK() to instruct the SDK to collect the TCF data from the device.
3. Use the CMP to decide if you need the consent dialog in the current session to acquire the consent data. If you need the consent dialog move to step 4; otherwise move to step 5.
4. Get confirmation from the CMP that the user has made their consent decision and the data is available.
5. Call start().

```c#
AppsFlyer.initSDK(devKey, appID, this);

//YOUR_CMP_FLOW()
// if already has consent ready - you can start
AppsFlyer.startSDK();

//else Waiting for CMP completion and data ready and then start
AppsFlyer.startSDK();
```

### Manually collect consent data

1. Initialize the SDK.
2. Determine whether the GDPR applies or not to the user.

### When GDPR applies to the user
1. Given that GDPR is applicable to the user, determine whether the consent data is already stored for this session.
i. If there is no consent data stored, show the consent dialog to capture the user consent decision.
ii. If there is consent data stored continue to the next step.

2. Call setConsentData() with the following parameters:
- hasConsentForDataUsage - Indicates whether the user has consented to use their data for advertising purposes.
- hasConsentForAdsPersonalization - Indicates whether the user has consented to use their data for personalized advertising.
3. Call start().

```c#

// If the user is subject to GDPR - collect the consent data
// or retrieve it from the storage
...
// Set the consent data to the SDK:
AppsFlyer.setConsentData(true, true);

AppsFlyer.startSDK();
```

### When GDPR does not apply to the user
1. Call setNonGDPRUser().
2. Call start().

```c#
// If the user is not subject to GDPR:
AppsFlyer.setNonGDPRUser();

AppsFlyer.startSDK();
```

## Verify consent data is sent
To test whether your SDK sends DMA consent data with each event, perform the following steps:

1. Enable the SDK debug mode.
2. Search for consent_data in the log of the outgoing request.

for more information visit [iOS](https://dev.appsflyer.com/hc/docs/ios-send-consent-for-dma-compliance)
[Android](https://dev.appsflyer.com/hc/docs/android-send-consent-for-dma-compliance)
---

## Sending SKAN postback to Appsflyer
To register the AppsFlyer endpoint, you need to add the `NSAdvertisingAttributionReportEndpoint` key to your info.plist and set the value to `https://appsflyer-skadnetwork.com/`.
More info on how to update the info.plist can be found [here](https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/docs/Troubleshooting.md#updating-the-infoplist).
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 69b8c9b

Please sign in to comment.