Showing preview only (745K chars total). Download the full file or copy to clipboard to get everything.
Repository: AppsFlyerSDK/appsflyer-unity-plugin
Branch: master
Commit: 087f87fc8179
Files: 212
Total size: 686.6 KB
Directory structure:
gitextract_u2enc1o6/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── config.yml
│ └── workflows/
│ ├── Scripts/
│ │ ├── checkJira.sh
│ │ └── extractPackage.py
│ ├── activation.yml
│ ├── check_packages.yml
│ ├── close_inactive_issues.yml
│ ├── issues_workflow.yml
│ ├── main.yml
│ ├── readme_sync.yml
│ ├── release_QA_workflow.yml
│ ├── release_production_workflow.yml
│ ├── release_to_QA.yml
│ ├── release_to_production.yml
│ ├── responseToSupportIssue.yml
│ ├── responseToSupportIssueOnOpen.yml
│ ├── test-unity-auth.yml
│ └── update_links.yml
├── .gitignore
├── Assets/
│ ├── AppsFlyer/
│ │ ├── AFAdRevenueData.cs
│ │ ├── AFAdRevenueData.cs.meta
│ │ ├── AFInAppEvents.cs
│ │ ├── AFInAppEvents.cs.meta
│ │ ├── AFMiniJSON.cs
│ │ ├── AFMiniJSON.cs.meta
│ │ ├── AFPurchaseDetailsAndroid.cs
│ │ ├── AFPurchaseDetailsAndroid.cs.meta
│ │ ├── AFSDKPurchaseDetailsIOS.cs
│ │ ├── AFSDKPurchaseDetailsIOS.cs.meta
│ │ ├── AFSDKValidateAndLogResult.cs
│ │ ├── AFSDKValidateAndLogResult.cs.meta
│ │ ├── AppsFlyer.asmdef
│ │ ├── AppsFlyer.asmdef.meta
│ │ ├── AppsFlyer.cs
│ │ ├── AppsFlyer.cs.meta
│ │ ├── AppsFlyerAndroid.cs
│ │ ├── AppsFlyerAndroid.cs.meta
│ │ ├── AppsFlyerConsent.cs
│ │ ├── AppsFlyerConsent.cs.meta
│ │ ├── AppsFlyerEventArgs.cs
│ │ ├── AppsFlyerEventArgs.cs.meta
│ │ ├── AppsFlyerObject.prefab
│ │ ├── AppsFlyerObject.prefab.meta
│ │ ├── AppsFlyerObjectScript.cs
│ │ ├── AppsFlyerObjectScript.cs.meta
│ │ ├── AppsFlyerPurchaseConnector.cs
│ │ ├── AppsFlyerPurchaseConnector.cs.meta
│ │ ├── AppsFlyeriOS.cs
│ │ ├── AppsFlyeriOS.cs.meta
│ │ ├── Editor/
│ │ │ ├── AppsFlyer.Editor.asmdef
│ │ │ ├── AppsFlyer.Editor.asmdef.meta
│ │ │ ├── AppsFlyerDependencies.xml
│ │ │ ├── AppsFlyerDependencies.xml.meta
│ │ │ ├── AppsFlyerObjectEditor.cs
│ │ │ ├── AppsFlyerObjectEditor.cs.meta
│ │ │ └── appsflyer_logo.png.meta
│ │ ├── Editor.meta
│ │ ├── IAppsFlyerAndroidBridge.cs
│ │ ├── IAppsFlyerAndroidBridge.cs.meta
│ │ ├── IAppsFlyerConversionData.cs
│ │ ├── IAppsFlyerConversionData.cs.meta
│ │ ├── IAppsFlyerIOSBridge.cs
│ │ ├── IAppsFlyerIOSBridge.cs.meta
│ │ ├── IAppsFlyerNativeBridge.cs
│ │ ├── IAppsFlyerNativeBridge.cs.meta
│ │ ├── IAppsFlyerPurchaseValidation.cs
│ │ ├── IAppsFlyerPurchaseValidation.cs.meta
│ │ ├── IAppsFlyerUserInvite.cs
│ │ ├── IAppsFlyerUserInvite.cs.meta
│ │ ├── IAppsFlyerValidateAndLog.cs
│ │ ├── IAppsFlyerValidateAndLog.cs.meta
│ │ ├── IAppsFlyerValidateReceipt.cs
│ │ ├── IAppsFlyerValidateReceipt.cs.meta
│ │ ├── Mac/
│ │ │ ├── AppsFlyerBundle.bundle/
│ │ │ │ ├── Contents/
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Info.plist.meta
│ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ ├── AppsFlyerBundle
│ │ │ │ │ │ └── AppsFlyerBundle.meta
│ │ │ │ │ ├── MacOS.meta
│ │ │ │ │ ├── _CodeSignature/
│ │ │ │ │ │ ├── CodeResources
│ │ │ │ │ │ └── CodeResources.meta
│ │ │ │ │ └── _CodeSignature.meta
│ │ │ │ └── Contents.meta
│ │ │ └── AppsFlyerBundle.bundle.meta
│ │ ├── Mac.meta
│ │ ├── Plugins/
│ │ │ ├── iOS/
│ │ │ │ ├── AFUnityStoreKit2Bridge.swift
│ │ │ │ ├── AFUnityStoreKit2Bridge.swift.meta
│ │ │ │ ├── AFUnityUtils.h
│ │ │ │ ├── AFUnityUtils.h.meta
│ │ │ │ ├── AFUnityUtils.mm
│ │ │ │ ├── AFUnityUtils.mm.meta
│ │ │ │ ├── AppsFlyer+AppController.m
│ │ │ │ ├── AppsFlyer+AppController.m.meta
│ │ │ │ ├── AppsFlyerAppController.mm
│ │ │ │ ├── AppsFlyerAppController.mm.meta
│ │ │ │ ├── AppsFlyerAttribution.h
│ │ │ │ ├── AppsFlyerAttribution.h.meta
│ │ │ │ ├── AppsFlyerAttribution.m
│ │ │ │ ├── AppsFlyerAttribution.m.meta
│ │ │ │ ├── AppsFlyeriOSWrapper.h
│ │ │ │ ├── AppsFlyeriOSWrapper.h.meta
│ │ │ │ ├── AppsFlyeriOSWrapper.mm
│ │ │ │ └── AppsFlyeriOSWrapper.mm.meta
│ │ │ └── iOS.meta
│ │ ├── Plugins.meta
│ │ ├── ProductPurchase.cs
│ │ ├── ProductPurchase.cs.meta
│ │ ├── Tests/
│ │ │ ├── Castle.Core.dll.meta
│ │ │ ├── NSubstitute.dll.meta
│ │ │ ├── System.Runtime.CompilerServices.Unsafe.dll.meta
│ │ │ ├── System.Threading.Tasks.Extensions.dll.meta
│ │ │ ├── Tests.asmdef
│ │ │ ├── Tests.asmdef.meta
│ │ │ ├── Tests_Suite.cs
│ │ │ └── Tests_Suite.cs.meta
│ │ ├── Tests.meta
│ │ ├── Windows/
│ │ │ ├── AppsFlyerLib.pdb
│ │ │ ├── AppsFlyerLib.pdb.meta
│ │ │ ├── AppsFlyerLib.pri
│ │ │ ├── AppsFlyerLib.pri.meta
│ │ │ ├── AppsFlyerLib.winmd
│ │ │ ├── AppsFlyerLib.winmd.meta
│ │ │ ├── AppsFlyerWindows.cs
│ │ │ └── AppsFlyerWindows.cs.meta
│ │ ├── Windows.meta
│ │ ├── package.json
│ │ └── package.json.meta
│ └── AppsFlyer.meta
├── CHANGELOG.md
├── LICENSE
├── ProjectSettings/
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── MemorySettings.asset
│ ├── MultiplayerManager.asset
│ ├── NavMeshAreas.asset
│ ├── PackageManagerSettings.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ ├── VFXManager.asset
│ ├── VersionControlSettings.asset
│ └── XRSettings.asset
├── README.md
├── UserSettings/
│ ├── EditorUserSettings.asset
│ ├── Layouts/
│ │ ├── default-2021.dwlt
│ │ └── default-6000.dwlt
│ └── Search.settings
├── android-unity-wrapper/
│ ├── .gitignore
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── appsflyer/
│ │ │ └── unity/
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── drawable-v24/
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── values/
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── appsflyer/
│ │ └── unity/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── unitywrapper/
│ ├── .gitignore
│ ├── build.gradle
│ ├── consumer-rules.pro
│ ├── libs/
│ │ └── classes.jar
│ ├── proguard-rules.pro
│ ├── publish.gradle
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── com/
│ └── appsflyer/
│ └── unity/
│ ├── AppsFlyerAndroidWrapper.java
│ └── PurchaseRevenueBridge.java
├── appsflyer-unity-plugin-6.17.90.unitypackage
├── appsflyer-unity-plugin-6.17.91.unitypackage
├── deploy/
│ ├── build_unity_package.sh
│ ├── external-dependency-manager-1.2.183.unitypackage
│ └── strict_mode_build_package.sh
├── docs/
│ ├── API.md
│ ├── BasicIntegration.md
│ ├── DMAConsent.md
│ ├── DeepLinkIntegrate.md
│ ├── InAppEvents.md
│ ├── Installation.md
│ ├── Introduction.md
│ ├── MigrationGuide.md
│ ├── PushNotifications.md
│ ├── Testing.md
│ ├── Troubleshooting.md
│ ├── UnifiedDeepLink.md
│ ├── UninstallMeasurement.md
│ ├── UserInvite.md
│ ├── ad-revenue-unity.md
│ ├── conversion-data-unity.md
│ ├── purchase-connector.md
│ ├── purchase-validation-unity.md
│ └── validate-and-log-unity.md
├── obj/
│ └── Debug/
│ └── .NETFramework,Version=v4.7.1.AssemblyAttributes.cs
└── strict-mode-sdk/
├── appsflyer-unity-plugin-strict-mode-6.17.90.unitypackage
├── appsflyer-unity-plugin-strict-mode-6.17.91.unitypackage
└── strictMode.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: AppsFlyer Support (Customer Assistant Chatbot)
url: https://support.appsflyer.com/hc/en-us/articles/23583984402193-Using-the-Customer-Assistant-Chatbot
about: For the fastest and most effective support, please contact the AppsFlyer support team using the Customer Assistant Chatbot.
================================================
FILE: .github/workflows/Scripts/checkJira.sh
================================================
JIRA_TOKEN=$1
JIRA_FIXED_VERSION=$2
fixed_version_found=false
curl -X GET https://appsflyer.atlassian.net/rest/api/3/project/11723/versions --user $JIRA_TOKEN | jq -r '.[] | .name+""+(.id | tostring)' | while read version ; do
if [[ "$version" == *"$JIRA_FIXED_VERSION"* ]] ;then
echo "$JIRA_FIXED_VERSION Found!"
fixed_version_found=true
version_id=${version#"$JIRA_FIXED_VERSION"}
echo $(curl -s -X POST https://appsflyer.atlassian.net/rest/api/3/search/jql --user $JIRA_TOKEN -H "Content-Type: application/json" -d "{\"jql\": \"fixVersion=$version_id\", \"fields\": [\"summary\"]}" | jq -r '.issues[] | "- " + .fields["summary"]+"@"') > "$JIRA_FIXED_VERSION-releasenotes".txt
sed -i -r -e "s/@ /\n/gi" "$JIRA_FIXED_VERSION-releasenotes".txt
sed -i -r -e "s/@/\n/gi" "$JIRA_FIXED_VERSION-releasenotes".txt
cat "$JIRA_FIXED_VERSION-releasenotes".txt
fi
done
if [ fixed_version_found == false ];then
echo "$JIRA_FIXED_VERSION is not found!"
exit 1
fi
================================================
FILE: .github/workflows/Scripts/extractPackage.py
================================================
from importlib.resources import path
import re
import hashlib
import os
import sys
from unitypackage_extractor.extractor import extractPackage
class checkPackage:
def __init__(self, pathToPackage):
self.pathToPackage = pathToPackage
def extractPackage(self, pathToOuptut):
extractPackage(self.pathToPackage, outputPath=pathToOuptut)
def main():
package = checkPackage(sys.argv[1])
strict_package = checkPackage(sys.argv[2])
#testing integreity of files
print("###################### \n Extracting files in unity packages \n ######################")
package.extractPackage("./packageUnity")
strict_package.extractPackage("./strictPackageUnity")
path_of_the_strict_directory= 'strictPackageUnity/'
path_of_the_directory= 'packageUnity/'
path_of_repo = "Assets/"
files_to_not_check = ["package.json"]
files_for_strict_mode_only = ["AppsFlyeriOSWrapper.mm", "AppsFlyerDependencies.xml"]
#checksum of files
print("###################### \n testing integreity of files \n ######################")
package.extractPackage("./packageUnity")
for subdir, dirs, files in os.walk(path_of_repo):
for file in files:
file_in_package = os.path.join(*[path_of_the_directory, subdir,file])
file_in_repo = os.path.join(subdir, file)
file_in_strict_package = os.path.join(*[path_of_the_strict_directory, subdir,file])
if os.path.isfile(file_in_package) and os.path.isfile(file_in_repo) and os.path.isfile(file_in_strict_package):
if file in files_to_not_check:
continue
if file in files_for_strict_mode_only:
if getHash(file_in_package) != getHash(file_in_repo):
print("❌ the file ", file, "is not the same")
sys.exit(5)
print("file for non strict mode ", file, "md5 check passed ✅")
if file == "AppsFlyeriOSWrapper.mm":
if not hasCommentedMethods(file_in_strict_package):
print("❌ the methods are not commented in ", file_in_strict_package)
sys.exit(5)
print("file in strict mode ", file, " has the correct methods commented out ✅")
if file == "AppsFlyerDependencies.xml":
if not isSrictModeDependency(file_in_strict_package):
print("❌ the dependecy is not strict in ",file_in_strict_package )
sys.exit(5)
print("file in strict mode ", file, " has the correct depdendency ✅")
else:
if getHash(file_in_package) != getHash(file_in_repo) or getHash(file_in_repo) != getHash(file_in_strict_package):
print("❌ the file" , file, "is not the same")
sys.exit(5)
print("file ", file, "md5 check passed ✅")
def getHash(filePath):
md5 = hashlib.md5()
with open(filePath,'rb') as file:
hash = file.read()
md5.update(hash)
return md5.hexdigest()
#check that only the two methods are commented in the strict mode package
def hasCommentedMethods(file):
print("###################### \n checking that the methods are commented in the strict mode package \n ######################")
textfile = open(file, 'r')
filetext = textfile.read()
textfile.close()
matches1 = re.findall("[/]+.*\[+AppsFlyerLib.*disableAdvertisingIdentifier", filetext)
matches2 = re.findall("[/]+.*\[+AppsFlyerLib.*waitForATTUserAuthorizationWithTimeoutInterval", filetext)
return len(matches1) == 1 and len(matches2) == 1
#check that we are using the strict dependency in strict mode package
def isSrictModeDependency(file):
print("###################### \nchecking the depdendency for the strict mode \n ######################")
textfile = open(file, 'r')
filetext = textfile.read()
textfile.close()
match = re.findall("AppsFlyerFramework/Strict", filetext)
return len(match)>0
if __name__ == "__main__":
main()
================================================
FILE: .github/workflows/activation.yml
================================================
name: Acquire activation file for Unity
on:
push:
branches:
- dev/RD-81493/unit-tests
jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
================================================
FILE: .github/workflows/check_packages.yml
================================================
name: check packages and release to upm
on:
workflow_call:
inputs:
plugin_version:
required: true
type: string
jobs:
check-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: get version
run: |
echo "PLUGIN_VERSION=${{ inputs.plugin_version }}" >> $GITHUB_ENV
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install unitypackage_extractor
- name: execute py script
run:
python .github/workflows/Scripts/extractPackage.py appsflyer-unity-plugin-${{env.PLUGIN_VERSION}}.unitypackage strict-mode-sdk/appsflyer-unity-plugin-strict-mode-${{env.PLUGIN_VERSION}}.unitypackage
release-upm:
runs-on: ubuntu-latest
needs: check-packages
steps:
- uses: actions/checkout@v4
- name: split branch
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
git branch -d upm &> /dev/null || echo upm branch not found
git subtree split -P Assets/AppsFlyer -b upm
git checkout upm
echo "Checked out to upm branch"
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git rm -r Tests
git commit -m "Remove Tests folder from upm branch"
echo "Removed Tests folder"
git push -f -u origin upm
- name: create tag
run: |
git tag v${{inputs.plugin_version}}
git push origin v${{inputs.plugin_version}}
echo "Release v${{inputs.plugin_version}} to upm :bookmark:"
strict-upm:
runs-on: ubuntu-latest
needs: check-packages
steps:
- uses: actions/checkout@v4
- name: split branch
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
git branch -d Strict-upm &> /dev/null || echo Strict-upm branch not found
git subtree split -P Assets/AppsFlyer -b Strict-upm
git checkout Strict-upm
echo "Checked out to Strict-upm branch"
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git rm -r Tests
git commit -m "Remove Tests folder from Strict-upm branch"
echo "Removed Tests folder"
- name: Modify for strict mode
run: |
echo "Changing AppsFlyerFramework to Strict Mode"
grep -q "AppsFlyerFramework" Editor/AppsFlyerDependencies.xml
sed -i 's/AppsFlyerFramework/AppsFlyerFramework\/Strict/g' Editor/AppsFlyerDependencies.xml
echo "Changing package.json to Strict Mode"
grep -q "AppsFlyer Unity plugin" ./package.json
sed -i 's/AppsFlyer Unity plugin/AppsFlyer Unity plugin strict mode/g' ./package.json
echo "Commenting out disableAdvertisingIdentifier"
grep -q "\[AppsFlyerLib shared\].disableAdvertisingIdentifier" Plugins/iOS/AppsFlyeriOSWrapper.mm
sed -i 's/\[AppsFlyerLib shared\].disableAdvertisingIdentifier/\/\/\[AppsFlyerLib shared\].disableAdvertisingIdentifier/g' Plugins/iOS/AppsFlyeriOSWrapper.mm
echo "Commenting out waitForATTUserAuthorizationWithTimeoutInterval"
grep -q "\[\[AppsFlyerLib shared\] waitForATTUserAuthorizationWithTimeoutInterval:timeoutInterval\];" Plugins/iOS/AppsFlyeriOSWrapper.mm
sed -i 's/\[\[AppsFlyerLib shared\] waitForATTUserAuthorizationWithTimeoutInterval:timeoutInterval\];/\/\/\[\[AppsFlyerLib shared\] waitForATTUserAuthorizationWithTimeoutInterval:timeoutInterval\];/g' Plugins/iOS/AppsFlyeriOSWrapper.mm
- name: Commit changes and push
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
git config user.name $COMMIT_AUTHOR
git config user.email $COMMIT_EMAIL
git add -A
git commit -m "update package.json"
git push -f -u origin Strict-upm
- name: create tag
run: |
git tag Strict-v${{inputs.plugin_version}}
git push origin Strict-v${{inputs.plugin_version}}
echo "Release Strict mode v${{inputs.plugin_version}} to upm :bookmark:"
================================================
FILE: .github/workflows/close_inactive_issues.yml
================================================
# This workflow triggers the org-wide reusable workflow to close inactive issues on a schedule
on:
schedule:
- cron: "0 10 * * *" # Runs daily at 10:00 UTC
workflow_dispatch:
jobs:
close-issues:
uses: AppsFlyerSDK/github-common-workflow-and-template/.github/workflows/close_inactive_issues.yml@main
secrets: inherit
================================================
FILE: .github/workflows/issues_workflow.yml
================================================
name: Close inactive issues
on:
schedule:
- cron: "30 9 * * 0"
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/main.yml
================================================
name: Test runner unity-appsflyer-plugin
on:
workflow_call:
jobs:
run-unity-tests:
name: Run ${{ matrix.testMode }} tests for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testMode: [playmode]
targetPlatform: [iOS, Android, Shared]
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Free up disk space
run: |
rm -rf /usr/share/dotnet/
rm -rf "/usr/local/share/boost"
rm -rf "$AGENT_TOOLSDIRECTORY"
rm -rf /opt/ghc
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.targetPlatform }}-${{ matrix.testMode }}-${{ hashFiles('**/*.cs') }}
restore-keys: |
Library-${{ matrix.targetPlatform }}-${{ matrix.testMode }}-
Library-${{ matrix.targetPlatform }}-
Library-
- uses: game-ci/unity-test-runner@v4
id: tests
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: .
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.targetPlatform }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.targetPlatform }} Test Results
customParameters: >
-nographics
-buildTarget ${{ matrix.targetPlatform == 'Shared' && 'StandaloneLinux64' || matrix.targetPlatform }}
-defineSymbols ${{ matrix.targetPlatform == 'Shared' && '' || format('UNITY_{0}', matrix.targetPlatform) }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test results - ${{ matrix.targetPlatform }}
path: ${{ steps.tests.outputs.artifactsPath }}
================================================
FILE: .github/workflows/readme_sync.yml
================================================
name: Sync `docs` directory to ReadMe
# Run workflow for every push to the `main` branch
on:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
# Run GitHub Action to sync docs in `documentation` directory
- name: GitHub Action
# We recommend specifying a fixed version, i.e. @7.5.0
# Docs: https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
uses: readmeio/rdme@7.5.0
with:
rdme: docs ./docs --key=${{ secrets.README_SYNC_API_KEY }} --version=0.1
================================================
FILE: .github/workflows/release_QA_workflow.yml
================================================
name: plugin release to QA
on:
push:
branches:
- releases/[0-9]+.x.x/[0-9]+.[0-9]+.x/[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
paths-ignore:
- master
jobs:
Run-Unit-Tests:
uses: ./.github/workflows/main.yml
secrets: inherit
Release-To-QA:
needs: [Run-Unit-Tests]
uses: ./.github/workflows/release_to_QA.yml
secrets: inherit
================================================
FILE: .github/workflows/release_production_workflow.yml
================================================
name: plugin release to Production workflow
on:
pull_request:
types:
- closed
branches:
- 'master'
paths-ignore:
- '**.md'
- 'docs/**.md'
- '**.sh'
jobs:
Prepare-Release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.tag-step.outputs.PLUGIN_VERSION}}
output2: ${{ steps.tag-step.outputs.RELEASE_BRANCH_NAME}}
steps:
- uses: actions/checkout@v3
- name: Login to GitHub
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME}}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL}}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
- uses: mdecoleman/pr-branch-name@1.2.0
id: vars
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Determine release tag and release branch
id: tag-step
run: |
TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_OUTPUT
echo "RELEASE_BRANCH_NAME=${{ steps.vars.outputs.branch }}" >> $GITHUB_ENV
echo "RELEASE_BRANCH_NAME=${{ steps.vars.outputs.branch }}" >> $GITHUB_OUTPUT
Check-Packages:
needs: [Prepare-Release]
uses: ./.github/workflows/check_packages.yml
with:
plugin_version: ${{ needs.Prepare-Release.outputs.output1 }}
secrets: inherit
Update-Links:
needs: [Prepare-Release, Check-Packages]
uses: ./.github/workflows/update_links.yml
secrets: inherit
Generate-Tag:
needs: [Prepare-Release, Check-Packages, Update-Links]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create a version tag and push it
run: |
echo "Pushing release tag: ${{ needs.Prepare-Release.outputs.output1 }}!"
git checkout master
echo "Checked out to master"
git pull origin master
git tag ${{ needs.Prepare-Release.outputs.output1 }}
echo "Created release tag"
git push origin ${{needs.Prepare-Release.outputs.output1}}
echo "Pushed release tag ${{ needs.Prepare-Release.outputs.output1 }}"
Release-To-Production:
needs: [Prepare-Release, Check-Packages, Update-Links, Generate-Tag]
uses: ./.github/workflows/release_to_production.yml
with:
plugin_version: ${{ needs.Prepare-Release.outputs.output1 }}
branch_name: ${{ needs.Prepare-Release.outputs.output2 }}
secrets: inherit
================================================
FILE: .github/workflows/release_to_QA.yml
================================================
name: Release to QA
on:
workflow_call:
jobs:
Release-To-QA:
runs-on: ubuntu-latest
environment: Staging
steps:
- uses: actions/checkout@v3
- name: Login to Github
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
- name: Check fixed version and compare issues on Jira
env:
JIRA_TOKEN: ${{ secrets.CI_JIRA_TOKEN }}
BRANCH_NAME: ${{ github.ref_name }}
run: |
plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
jira_fixed_version="Unity SDK v$plugin_version"
echo "JIRA_FIXED_VERSION=$jira_fixed_version" >> $GITHUB_ENV
chmod +x .github/workflows/Scripts/checkJira.sh
.github/workflows/Scripts/checkJira.sh $JIRA_TOKEN "$jira_fixed_version"
- name: Update package.json
env:
BRANCH_NAME: ${{ github.ref_name }}
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
echo "updating package.json version"
plugin_version=$(echo "$BRANCH_NAME" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
sed -E -i "s/\"version\": \"[0-9]+.[0-9]+.[0-9]+\"/\"version\": \"$plugin_version\"/g" Assets/AppsFlyer/package.json
if [[ -n $(git status -s) ]]; then
echo "Commit and push"
git add Assets/AppsFlyer/package.json
git commit -m "update package.json"
git push origin $BRANCH_NAME
else
echo "package.json version is already up to date"
fi
- name: Send slack report
env:
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
run: |
ios_af_sdk_version=$(cat README.md | grep -Eo 'iOS AppsFlyer SDK v[0-9]+.[0-9]+.[0-9]+')
android_af_sdk_version=$(cat README.md | grep -Eo 'Android AppsFlyer SDK v[0-9]+.[0-9]+.[0-9]+')
# Extract plugin version from branch name
plugin_version=$(echo "${{github.ref_name}}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
# Send webhook to Slack with all required parameters
curl -X POST -H 'Content-type: application/json' --data '{
"plugin_version": "'"$plugin_version"'",
"git_branch": "'"${{github.ref_name}}"'",
"ios_sdk_dependency": "'"$ios_af_sdk_version"'",
"android_sdk_dependency": "'"$android_af_sdk_version"'",
"version_changes": "New Unity Plugin Release: Unity SDK v'"$plugin_version"'",
"deploy_type": "QA"
}' "$SLACK_TOKEN"
================================================
FILE: .github/workflows/release_to_production.yml
================================================
name: plugin release to Production
on:
workflow_call:
inputs:
plugin_version:
required: true
type: string
branch_name:
required: true
type: string
jobs:
Release-To-Production:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v3
- name: Login to Github
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
- name: Create GitHub Release
env:
VTAG: v${{ inputs.plugin_version }}
TAG: ${{ inputs.plugin_version }}
uses: "actions/github-script@v5"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
try {
await github.rest.repos.createRelease({
draft: false,
generate_release_notes: false,
name: process.env.VTAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.TAG
});
} catch (error) {
core.setFailed(error.message);
}
- name: Send slack report
env:
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
JIRA_TOKEN: ${{ secrets.CI_JIRA_TOKEN }}
run: |
jira_fixed_version="Unity SDK v${{inputs.plugin_version}}"
chmod +x .github/workflows/Scripts/checkJira.sh
.github/workflows/Scripts/checkJira.sh $JIRA_TOKEN "$jira_fixed_version"
ios_af_sdk_version=$(cat README.md | grep -Eo 'iOS AppsFlyer SDK v[0-9]+.[0-9]+.[0-9]+')
android_af_sdk_version=$(cat README.md | grep -Eo 'Android AppsFlyer SDK v[0-9]+.[0-9]+.[0-9]+')
# Create a simple release message without the text file
release_message="🚀 PRODUCTION RELEASE: Unity Plugin ${{inputs.plugin_version}}"
# Send webhook to Slack with all required parameters
curl -X POST -H 'Content-type: application/json' --data '{
"plugin_version": "'"${{inputs.plugin_version}}"'",
"git_branch": "'"${{inputs.branch_name}}"'",
"ios_sdk_dependency": "'"$ios_af_sdk_version"'",
"android_sdk_dependency": "'"$android_af_sdk_version"'",
"version_changes": "🚀 PRODUCTION RELEASE: Unity Plugin ${{inputs.plugin_version}}",
"deploy_type": "PRODUCTION"
}' "$SLACK_TOKEN"
================================================
FILE: .github/workflows/responseToSupportIssue.yml
================================================
# This workflow triggers the org-wide reusable workflow to respond to issues labeled as 'support'
on:
issues:
types:
- labeled
workflow_dispatch:
jobs:
add-comment:
uses: AppsFlyerSDK/github-common-workflow-and-template/.github/workflows/responseToSupportIssue.yml@main
secrets: inherit
================================================
FILE: .github/workflows/responseToSupportIssueOnOpen.yml
================================================
# This workflow triggers the org-wide reusable workflow to respond to newly opened issues
on:
issues:
types:
- opened
workflow_dispatch:
jobs:
add-comment:
uses: AppsFlyerSDK/github-common-workflow-and-template/.github/workflows/responseToSupportIssueOnOpen.yml@main
secrets: inherit
================================================
FILE: .github/workflows/test-unity-auth.yml
================================================
name: Test Unity Authentication
on:
workflow_dispatch:
jobs:
test-auth:
name: Test Unity License Activation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test Unity activation
uses: game-ci/unity-activate@v2
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
- name: Success message
run: echo "Unity authentication successful!"
================================================
FILE: .github/workflows/update_links.yml
================================================
name: update sdk links
on:
workflow_call:
jobs:
update-links:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Update links
id: update-links
env:
COMMIT_AUTHOR: ${{ secrets.CI_USERNAME }}
COMMIT_EMAIL: ${{ secrets.CI_EMAIL }}
run: |
echo "Getting the versions"
grep -o 'spec="com.appsflyer:[^"]\+"' Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml | sed -E 's/spec="com.appsflyer:([^"]+)"/\1/' | awk -F':' '{print $2}' > output.txt
grep -o 'name="AppsFlyerFramework" version="[^"]\+"' Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml | sed -E 's/name="AppsFlyerFramework" version="([^"]+)"/\1/' >> output.txt
echo "Changing links"
android_version=$(sed -n '1p' output.txt)
sed -E -i "s/af-android-sdk\/[0-9]+.[0-9]+.[0-9]+/af-android-sdk\/$android_version/g" docs/Installation.md
sed -E -i "s/af-android-sdk-[0-9]+.[0-9]+.[0-9]+/af-android-sdk-$android_version/g" docs/Installation.md
wrapper_version=$(sed -n '2p' output.txt)
sed -E -i "s/unity-wrapper\/[0-9]+.[0-9]+.[0-9]+/unity-wrapper\/$wrapper_version/g" docs/Installation.md
sed -E -i "s/unity-wrapper-[0-9]+.[0-9]+.[0-9]+/unity-wrapper-$wrapper_version/g" docs/Installation.md
ios_version=$(sed -n '3p' output.txt)
major_version="${ios_version%%.*}"
minor_version="${ios_version%.*}"
sed -E -i "s/appsflyer.com\/ios\/[0-9]+.x.x\/[0-9]+.[0-9]+.x\/[0-9]+.[0-9]+.[0-9]+\/AF-iOS-SDK-v[0-9]+.[0-9]+.[0-9]+/appsflyer.com\/ios\/$major_version.x.x\/$minor_version.x\/$ios_version\/AF-iOS-SDK-v$ios_version/g" docs/Installation.md
sed -E -i "s/unity-wrapper-[0-9]+.[0-9]+.[0-9]+/unity-wrapper-$wrapper_version/g" docs/Installation.md
rm output.txt
if [[ -n $(git status -s) ]]; then
echo "Links need updating, will create PR"
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git add docs/Installation.md
git commit -m "generate links"
echo "changes_made=true" >> $GITHUB_OUTPUT
else
echo "Links are already up to date"
echo "changes_made=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.update-links.outputs.changes_made == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "generate links"
title: "Update SDK links for version ${{ inputs.plugin_version || 'latest' }}"
body: |
This PR automatically updates the SDK links in the Installation.md file.
**Changes:**
- Updated Android SDK links
- Updated iOS SDK links
- Updated Unity wrapper links
This PR was created automatically by the release workflow.
branch: update-links-${{ github.run_number }}
base: master
delete-branch: true
================================================
FILE: .gitignore
================================================
.DS_Store
*.log
Logs/
Packages/
Temp/
Library/
/*/outputs/
#android studio
build
gen
.gradle
.idea
.hgcheck
infer-out
captures
local.properties
*.orig
*.rej
out
bin
dist
*.iml
build.gradle_mine
.DS_Store
*.idea
.vs/appsflyer-unity-plugin/xs/project-cache/
.vs/appsflyer-unity-plugin/xs/
.vsconfig
*.sln
*.csproj
*.cache
================================================
FILE: Assets/AppsFlyer/AFAdRevenueData.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
public enum MediationNetwork : ulong
{
GoogleAdMob = 1,
IronSource = 2,
ApplovinMax = 3,
Fyber = 4,
Appodeal = 5,
Admost = 6,
Topon = 7,
Tradplus = 8,
Yandex = 9,
ChartBoost = 10,
Unity = 11,
ToponPte = 12,
Custom = 13,
DirectMonetization = 14
}
public static class AdRevenueScheme
{
/**
* code ISO 3166-1 format
*/
public const string COUNTRY = "country";
/**
* ID of the ad unit for the impression
*/
public const string AD_UNIT = "ad_unit";
/**
* Format of the ad
*/
public const string AD_TYPE = "ad_type";
/**
* ID of the ad placement for the impression
*/
public const string PLACEMENT = "placement";
}
/// <summary>
// Data class representing ad revenue information.
//
// @property monetizationNetwork The name of the network that monetized the ad.
// @property mediationNetwork An instance of MediationNetwork representing the mediation service used.
// @property currencyIso4217Code The ISO 4217 currency code describing the currency of the revenue.
// @property eventRevenue The amount of revenue generated by the ad.
/// </summary>
public class AFAdRevenueData
{
public string monetizationNetwork { get; private set; }
public MediationNetwork mediationNetwork { get; private set; }
public string currencyIso4217Code { get; private set; }
public double eventRevenue { get; private set; }
public AFAdRevenueData(string monetization, MediationNetwork mediation, string currency, double revenue)
{
monetizationNetwork = monetization;
mediationNetwork = mediation;
currencyIso4217Code = currency;
eventRevenue = revenue;
}
}
}
================================================
FILE: Assets/AppsFlyer/AFAdRevenueData.cs.meta
================================================
fileFormatVersion: 2
guid: 49e1906ae949e4bfea400bd1da9f7e39
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AFInAppEvents.cs
================================================
using UnityEngine;
using System.Collections;
public class AFInAppEvents {
/**
* Event Type
* */
public const string LEVEL_ACHIEVED = "af_level_achieved";
public const string ADD_PAYMENT_INFO = "af_add_payment_info";
public const string ADD_TO_CART = "af_add_to_cart";
public const string ADD_TO_WISH_LIST = "af_add_to_wishlist";
public const string COMPLETE_REGISTRATION = "af_complete_registration";
public const string TUTORIAL_COMPLETION = "af_tutorial_completion";
public const string INITIATED_CHECKOUT = "af_initiated_checkout";
public const string PURCHASE = "af_purchase";
public const string RATE = "af_rate";
public const string SEARCH = "af_search";
public const string SPENT_CREDIT = "af_spent_credits";
public const string ACHIEVEMENT_UNLOCKED = "af_achievement_unlocked";
public const string CONTENT_VIEW = "af_content_view";
public const string TRAVEL_BOOKING = "af_travel_booking";
public const string SHARE = "af_share";
public const string INVITE = "af_invite";
public const string LOGIN = "af_login";
public const string RE_ENGAGE = "af_re_engage";
public const string UPDATE = "af_update";
public const string OPENED_FROM_PUSH_NOTIFICATION = "af_opened_from_push_notification";
public const string LOCATION_CHANGED = "af_location_changed";
public const string LOCATION_COORDINATES = "af_location_coordinates";
public const string ORDER_ID = "af_order_id";
/**
* Event Parameter Name
* **/
public const string LEVEL = "af_level";
public const string SCORE = "af_score";
public const string SUCCESS = "af_success";
public const string PRICE = "af_price";
public const string CONTENT_TYPE = "af_content_type";
public const string CONTENT_ID = "af_content_id";
public const string CONTENT_LIST = "af_content_list";
public const string CURRENCY = "af_currency";
public const string QUANTITY = "af_quantity";
public const string REGSITRATION_METHOD = "af_registration_method";
public const string PAYMENT_INFO_AVAILIBLE = "af_payment_info_available";
public const string MAX_RATING_VALUE = "af_max_rating_value";
public const string RATING_VALUE = "af_rating_value";
public const string SEARCH_STRING = "af_search_string";
public const string DATE_A = "af_date_a";
public const string DATE_B = "af_date_b";
public const string DESTINATION_A = "af_destination_a";
public const string DESTINATION_B = "af_destination_b";
public const string DESCRIPTION = "af_description";
public const string CLASS = "af_class";
public const string EVENT_START = "af_event_start";
public const string EVENT_END = "af_event_end";
public const string LATITUDE = "af_lat";
public const string LONGTITUDE = "af_long";
public const string CUSTOMER_USER_ID = "af_customer_user_id";
public const string VALIDATED = "af_validated";
public const string REVENUE = "af_revenue";
public const string RECEIPT_ID = "af_receipt_id";
public const string PARAM_1 = "af_param_1";
public const string PARAM_2 = "af_param_2";
public const string PARAM_3 = "af_param_3";
public const string PARAM_4 = "af_param_4";
public const string PARAM_5 = "af_param_5";
public const string PARAM_6 = "af_param_6";
public const string PARAM_7 = "af_param_7";
public const string PARAM_8 = "af_param_8";
public const string PARAM_9 = "af_param_9";
public const string PARAM_10 = "af_param_10";
}
================================================
FILE: Assets/AppsFlyer/AFInAppEvents.cs.meta
================================================
fileFormatVersion: 2
guid: 4075c6cf6f3d94b9a9f37f826e6a0e6f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AFMiniJSON.cs
================================================
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace AFMiniJSON {
// Example usage:
//
// using UnityEngine;
// using System.Collections;
// using System.Collections.Generic;
// using MiniJSON;
//
// public class MiniJSONTest : MonoBehaviour {
// void Start () {
// var jsonString = "{ \"array\": [1.44,2,3], " +
// "\"object\": {\"key1\":\"value1\", \"key2\":256}, " +
// "\"string\": \"The quick brown fox \\\"jumps\\\" over the lazy dog \", " +
// "\"unicode\": \"\\u3041 Men\u00fa sesi\u00f3n\", " +
// "\"int\": 65536, " +
// "\"float\": 3.1415926, " +
// "\"bool\": true, " +
// "\"null\": null }";
//
// var dict = Json.Deserialize(jsonString) as Dictionary<string,object>;
//
// Debug.Log("deserialized: " + dict.GetType());
// Debug.Log("dict['array'][0]: " + ((List<object>) dict["array"])[0]);
// Debug.Log("dict['string']: " + (string) dict["string"]);
// Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles
// Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs
// Debug.Log("dict['unicode']: " + (string) dict["unicode"]);
//
// var str = Json.Serialize(dict);
//
// Debug.Log("serialized: " + str);
// }
// }
/// <summary>
/// This class encodes and decodes JSON strings.
/// Spec. details, see http://www.json.org/
///
/// JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary.
/// All numbers are parsed to doubles.
/// </summary>
public static class Json {
/// <summary>
/// Parses the string json into a value
/// </summary>
/// <param name="json">A JSON string.</param>
/// <returns>An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false</returns>
public static object Deserialize(string json) {
// save the string for debug information
if (json == null) {
return null;
}
return Parser.Parse(json);
}
sealed class Parser : IDisposable {
const string WORD_BREAK = "{}[],:\"";
public static bool IsWordBreak(char c) {
return Char.IsWhiteSpace(c) || WORD_BREAK.IndexOf(c) != -1;
}
enum TOKEN {
NONE,
CURLY_OPEN,
CURLY_CLOSE,
SQUARED_OPEN,
SQUARED_CLOSE,
COLON,
COMMA,
STRING,
NUMBER,
TRUE,
FALSE,
NULL
};
StringReader json;
Parser(string jsonString) {
json = new StringReader(jsonString);
}
public static object Parse(string jsonString) {
using (var instance = new Parser(jsonString)) {
return instance.ParseValue();
}
}
public void Dispose() {
json.Dispose();
json = null;
}
Dictionary<string, object> ParseObject() {
Dictionary<string, object> table = new Dictionary<string, object>();
// ditch opening brace
json.Read();
// {
while (true) {
switch (NextToken) {
case TOKEN.NONE:
return null;
case TOKEN.COMMA:
continue;
case TOKEN.CURLY_CLOSE:
return table;
default:
// name
string name = ParseString();
if (name == null) {
return null;
}
// :
if (NextToken != TOKEN.COLON) {
return null;
}
// ditch the colon
json.Read();
// value
table[name] = ParseValue();
break;
}
}
}
List<object> ParseArray() {
List<object> array = new List<object>();
// ditch opening bracket
json.Read();
// [
var parsing = true;
while (parsing) {
TOKEN nextToken = NextToken;
switch (nextToken) {
case TOKEN.NONE:
return null;
case TOKEN.COMMA:
continue;
case TOKEN.SQUARED_CLOSE:
parsing = false;
break;
default:
object value = ParseByToken(nextToken);
array.Add(value);
break;
}
}
return array;
}
object ParseValue() {
TOKEN nextToken = NextToken;
return ParseByToken(nextToken);
}
object ParseByToken(TOKEN token) {
switch (token) {
case TOKEN.STRING:
return ParseString();
case TOKEN.NUMBER:
return ParseNumber();
case TOKEN.CURLY_OPEN:
return ParseObject();
case TOKEN.SQUARED_OPEN:
return ParseArray();
case TOKEN.TRUE:
return true;
case TOKEN.FALSE:
return false;
case TOKEN.NULL:
return null;
default:
return null;
}
}
string ParseString() {
StringBuilder s = new StringBuilder();
char c;
// ditch opening quote
json.Read();
bool parsing = true;
while (parsing) {
if (json.Peek() == -1) {
parsing = false;
break;
}
c = NextChar;
switch (c) {
case '"':
parsing = false;
break;
case '\\':
if (json.Peek() == -1) {
parsing = false;
break;
}
c = NextChar;
switch (c) {
case '"':
case '\\':
case '/':
s.Append(c);
break;
case 'b':
s.Append('\b');
break;
case 'f':
s.Append('\f');
break;
case 'n':
s.Append('\n');
break;
case 'r':
s.Append('\r');
break;
case 't':
s.Append('\t');
break;
case 'u':
var hex = new char[4];
for (int i=0; i< 4; i++) {
hex[i] = NextChar;
}
s.Append((char) Convert.ToInt32(new string(hex), 16));
break;
}
break;
default:
s.Append(c);
break;
}
}
return s.ToString();
}
object ParseNumber() {
string number = NextWord;
if (number.IndexOf('.') == -1) {
long parsedInt;
Int64.TryParse(number, out parsedInt);
return parsedInt;
}
double parsedDouble;
Double.TryParse(number, out parsedDouble);
return parsedDouble;
}
void EatWhitespace() {
while (Char.IsWhiteSpace(PeekChar)) {
json.Read();
if (json.Peek() == -1) {
break;
}
}
}
char PeekChar {
get {
return Convert.ToChar(json.Peek());
}
}
char NextChar {
get {
return Convert.ToChar(json.Read());
}
}
string NextWord {
get {
StringBuilder word = new StringBuilder();
while (!IsWordBreak(PeekChar)) {
word.Append(NextChar);
if (json.Peek() == -1) {
break;
}
}
return word.ToString();
}
}
TOKEN NextToken {
get {
EatWhitespace();
if (json.Peek() == -1) {
return TOKEN.NONE;
}
switch (PeekChar) {
case '{':
return TOKEN.CURLY_OPEN;
case '}':
json.Read();
return TOKEN.CURLY_CLOSE;
case '[':
return TOKEN.SQUARED_OPEN;
case ']':
json.Read();
return TOKEN.SQUARED_CLOSE;
case ',':
json.Read();
return TOKEN.COMMA;
case '"':
return TOKEN.STRING;
case ':':
return TOKEN.COLON;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '-':
return TOKEN.NUMBER;
}
switch (NextWord) {
case "false":
return TOKEN.FALSE;
case "true":
return TOKEN.TRUE;
case "null":
return TOKEN.NULL;
}
return TOKEN.NONE;
}
}
}
/// <summary>
/// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string
/// </summary>
/// <param name="json">A Dictionary<string, object> / List<object></param>
/// <returns>A JSON encoded string, or null if object 'json' is not serializable</returns>
public static string Serialize(object obj) {
return Serializer.Serialize(obj);
}
sealed class Serializer {
StringBuilder builder;
Serializer() {
builder = new StringBuilder();
}
public static string Serialize(object obj) {
var instance = new Serializer();
instance.SerializeValue(obj);
return instance.builder.ToString();
}
void SerializeValue(object value) {
IList asList;
IDictionary asDict;
string asStr;
if (value == null) {
builder.Append("null");
} else if ((asStr = value as string) != null) {
SerializeString(asStr);
} else if (value is bool) {
builder.Append((bool) value ? "true" : "false");
} else if ((asList = value as IList) != null) {
SerializeArray(asList);
} else if ((asDict = value as IDictionary) != null) {
SerializeObject(asDict);
} else if (value is char) {
SerializeString(new string((char) value, 1));
} else {
SerializeOther(value);
}
}
void SerializeObject(IDictionary obj) {
bool first = true;
builder.Append('{');
foreach (object e in obj.Keys) {
if (!first) {
builder.Append(',');
}
SerializeString(e.ToString());
builder.Append(':');
SerializeValue(obj[e]);
first = false;
}
builder.Append('}');
}
void SerializeArray(IList anArray) {
builder.Append('[');
bool first = true;
foreach (object obj in anArray) {
if (!first) {
builder.Append(',');
}
SerializeValue(obj);
first = false;
}
builder.Append(']');
}
void SerializeString(string str) {
builder.Append('\"');
char[] charArray = str.ToCharArray();
foreach (var c in charArray) {
switch (c) {
case '"':
builder.Append("\\\"");
break;
case '\\':
builder.Append("\\\\");
break;
case '\b':
builder.Append("\\b");
break;
case '\f':
builder.Append("\\f");
break;
case '\n':
builder.Append("\\n");
break;
case '\r':
builder.Append("\\r");
break;
case '\t':
builder.Append("\\t");
break;
default:
int codepoint = Convert.ToInt32(c);
if ((codepoint >= 32) && (codepoint <= 126)) {
builder.Append(c);
} else {
builder.Append("\\u");
builder.Append(codepoint.ToString("x4"));
}
break;
}
}
builder.Append('\"');
}
void SerializeOther(object value) {
// NOTE: decimals lose precision during serialization.
// They always have, I'm just letting you know.
// Previously floats and doubles lost precision too.
if (value is float) {
builder.Append(((float) value).ToString("R"));
} else if (value is int
|| value is uint
|| value is long
|| value is sbyte
|| value is byte
|| value is short
|| value is ushort
|| value is ulong) {
builder.Append(value);
} else if (value is double
|| value is decimal) {
builder.Append(Convert.ToDouble(value).ToString("R"));
} else {
SerializeString(value.ToString());
}
}
}
}
}
================================================
FILE: Assets/AppsFlyer/AFMiniJSON.cs.meta
================================================
fileFormatVersion: 2
guid: bc3d1c806d507463e9b560eb09d8eb0e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
public enum AFPurchaseType
{
Subscription = 0,
OneTimePurchase = 1
}
/// <summary>
/// Purchase details class matching Android SDK AFPurchaseDetails
/// </summary>
public class AFPurchaseDetailsAndroid
{
public AFPurchaseType purchaseType { get; private set; }
public string purchaseToken { get; private set; }
public string productId { get; private set; }
public AFPurchaseDetailsAndroid(AFPurchaseType type, String purchaseToken, String productId)
{
this.purchaseType = type;
this.purchaseToken = purchaseToken;
this.productId = productId;
}
}
}
================================================
FILE: Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs.meta
================================================
fileFormatVersion: 2
guid: d71b3864006f94ac08938b2ebdc940bc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
/// <summary>
/// Purchase type enum matching iOS SDK AFSDKPurchaseType
/// </summary>
public enum AFSDKPurchaseType
{
Subscription,
OneTimePurchase
}
/// <summary>
/// Purchase details class matching iOS SDK AFSDKPurchaseDetails
/// </summary>
public class AFSDKPurchaseDetailsIOS
{
public string productId { get; private set; }
public string transactionId { get; private set; }
public AFSDKPurchaseType purchaseType { get; private set; }
private AFSDKPurchaseDetailsIOS(string productId, string transactionId, AFSDKPurchaseType purchaseType)
{
this.productId = productId;
this.transactionId = transactionId;
this.purchaseType = purchaseType;
}
public static AFSDKPurchaseDetailsIOS Init(string productId, string transactionId, AFSDKPurchaseType purchaseType)
{
return new AFSDKPurchaseDetailsIOS(productId, transactionId, purchaseType);
}
}
}
================================================
FILE: Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs.meta
================================================
fileFormatVersion: 2
guid: 44bb6c4472701416080eb050732075ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AFSDKValidateAndLogResult.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
public enum AFSDKValidateAndLogStatus
{
AFSDKValidateAndLogStatusSuccess,
AFSDKValidateAndLogStatusFailure,
AFSDKValidateAndLogStatusError
}
/// <summary>
//
/// </summary>
public class AFSDKValidateAndLogResult
{
public AFSDKValidateAndLogStatus status { get; private set; }
public Dictionary<string, object> result { get; private set; }
public Dictionary<string, object> errorData { get; private set; }
public string error { get; private set; }
private AFSDKValidateAndLogResult(AFSDKValidateAndLogStatus status, Dictionary<string, object> result, Dictionary<string, object> errorData, string error)
{
this.status = status;
this.result = result;
this.errorData = errorData;
this.error = error;
}
public static AFSDKValidateAndLogResult Init(AFSDKValidateAndLogStatus status, Dictionary<string, object> result, Dictionary<string, object> errorData, string error)
{
return new AFSDKValidateAndLogResult(status, result, errorData, error);
}
}
}
================================================
FILE: Assets/AppsFlyer/AFSDKValidateAndLogResult.cs.meta
================================================
fileFormatVersion: 2
guid: 2df1c6f1eab2e4849bf2762a8d78933f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyer.asmdef
================================================
{
"name": "AppsFlyer",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: Assets/AppsFlyer/AppsFlyer.asmdef.meta
================================================
fileFormatVersion: 2
guid: 2a37df438292d4903b4e5159c5de3bf9
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyer.cs
================================================
using System;
using System.Collections.Generic;
using UnityEngine;
namespace AppsFlyerSDK
{
public class AppsFlyer : MonoBehaviour
{
public static readonly string kAppsFlyerPluginVersion = "6.17.91";
public static string CallBackObjectName = null;
private static EventHandler onRequestResponse;
private static EventHandler onInAppResponse;
private static EventHandler onDeepLinkReceived;
public static IAppsFlyerNativeBridge instance = null;
public delegate void unityCallBack(string message);
/// <summary>
/// Initialize the AppsFlyer SDK with your devKey and appID.
/// The dev key is required on all platforms, and the appID is required for iOS.
/// If you app is for Android only pass null for the appID.
/// </summary>
/// <param name="devKey"> AppsFlyer's Dev-Key, which is accessible from your AppsFlyer account under 'App Settings' in the dashboard.</param>
/// <param name="appID">Your app's Apple ID.</param>
/// <example>
/// <code>
/// AppsFlyer.initSDK("K2***********99", "41*****44"");
/// </code>
/// </example>
public static void initSDK(string devKey, string appID)
{
initSDK(devKey, appID, null);
}
/// <summary>
/// Initialize the AppsFlyer SDK with your devKey and appID.
/// The dev key is required on all platforms, and the appID is required for iOS.
/// If you app is for Android only pass null for the appID.
/// </summary>
/// <param name="devKey"> AppsFlyer's Dev-Key, which is accessible from your AppsFlyer account under 'App Settings' in the dashboard.</param>
/// <param name="appID">Your app's Apple ID.</param>
/// <param name="gameObject">pass the script of the game object being used.</param>
/// <example>
/// <code>
/// AppsFlyer.initSDK("K2***********99", 41*****44, this);
/// </code>
/// </example>
public static void initSDK(string devKey, string appID, MonoBehaviour gameObject)
{
if (gameObject != null)
{
#if UNITY_STANDALONE_OSX
CallBackObjectName = gameObject.GetType().ToString();
#else
CallBackObjectName = gameObject.name;
#endif
}
#if UNITY_IOS || UNITY_STANDALONE_OSX
if (instance == null || !instance.isInit)
{
instance = new AppsFlyeriOS(devKey, appID, gameObject);
instance.isInit = true;
}
#elif UNITY_ANDROID
if (instance == null || !instance.isInit)
{
AppsFlyerAndroid appsFlyerAndroid = new AppsFlyerAndroid();
appsFlyerAndroid.initSDK(devKey, gameObject);
instance = appsFlyerAndroid;
instance.isInit = true;
}
#elif UNITY_WSA_10_0
AppsFlyerWindows.InitSDK(devKey, appID, gameObject);
if (gameObject != null)
{
AppsFlyerWindows.GetConversionData(gameObject.name);
}
#else
#endif
}
/// <summary>
/// Once this API is invoked, our SDK will start.
/// Once the API is called a sessions will be immediately sent, and all background forground transitions will send a session.
/// </summary>
public static void startSDK()
{
#if UNITY_WSA_10_0
AppsFlyerWindows.Start();
#else
if (instance != null)
{
instance.startSDK(onRequestResponse != null, CallBackObjectName);
}
#endif
}
/// <summary>
/// Send an In-App Event.
/// In-App Events provide insight on what is happening in your app.
/// </summary>
/// <param name="eventName">Event Name as String.</param>
/// <param name="eventValues">Event Values as Dictionary.</param>
public static void sendEvent(string eventName, Dictionary<string, string> eventValues)
{
#if UNITY_WSA_10_0 && !UNITY_EDITOR
AppsFlyerWindows.LogEvent(eventName, eventValues);
#else
if (instance != null)
{
instance.sendEvent(eventName, eventValues, onInAppResponse != null, CallBackObjectName);
}
#endif
}
/// <summary>
/// Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.
/// In some extreme cases you might want to shut down all SDK activity due to legal and privacy compliance.
/// This can be achieved with the stopSDK API.
/// </summary>
/// <param name="isSDKStopped"> should sdk be stopped.</param>
public static void stopSDK(bool isSDKStopped)
{
if (instance != null)
{
instance.stopSDK(isSDKStopped);
}
}
// <summary>
/// Was the stopSDK(boolean) API set to true.
/// </summary>
/// <returns>boolean isSDKStopped.</returns>
public static bool isSDKStopped()
{
if (instance != null)
{
return instance.isSDKStopped();
}
return false;
}
/// <summary>
/// Get the AppsFlyer SDK version used in app.
/// </summary>
/// <returns>The current SDK version.</returns>
public static string getSdkVersion()
{
if (instance != null)
{
return instance.getSdkVersion();
}
return "";
}
/// <summary>
/// Enables Debug logs for the AppsFlyer SDK.
/// Should only be set to true in development / debug.
/// </summary>
/// <param name="shouldEnable">shouldEnable boolean.</param>
public static void setIsDebug(bool shouldEnable)
{
if (instance != null)
{
instance.setIsDebug(shouldEnable);
} else {
#if UNITY_IOS || UNITY_STANDALONE_OSX
instance = new AppsFlyeriOS();
instance.setIsDebug(shouldEnable);
#elif UNITY_ANDROID
instance = new AppsFlyerAndroid();
instance.setIsDebug(shouldEnable);
#else
#endif
}
}
/// <summary>
/// Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs.
/// This ID is available in AppsFlyer CSV reports along with Postback APIs for cross-referencing with your internal IDs.
/// </summary>
/// <param name="id">Customer ID for client.</param>
public static void setCustomerUserId(string id)
{
#if UNITY_WSA_10_0 && !UNITY_EDITOR
AppsFlyerWindows.SetCustomerUserId(id);
#else
if (instance != null)
{
instance.setCustomerUserId(id);
}
#endif
}
/// <summary>
/// Set the OneLink ID that should be used for User-Invite-API.
/// The link that is generated for the user invite will use this OneLink as the base link.
/// </summary>
/// <param name="oneLinkId">OneLink ID obtained from the AppsFlyer Dashboard.</param>
public static void setAppInviteOneLinkID(string oneLinkId)
{
if (instance != null)
{
instance.setAppInviteOneLinkID(oneLinkId);
}
}
/// <summary>
/// Set the deepLink timeout value that should be used for DDL.
/// </summary>
/// <param name="deepLinkTimeout">deepLink timeout in milliseconds.</param>
public static void setDeepLinkTimeout(long deepLinkTimeout)
{
if (instance != null)
{
instance.setDeepLinkTimeout(deepLinkTimeout);
}
}
/// <summary>
/// Set additional data to be sent to AppsFlyer.
/// </summary>
/// <param name="customData">additional data Dictionary.</param>
public static void setAdditionalData(Dictionary<string, string> customData)
{
if (instance != null)
{
instance.setAdditionalData(customData);
}
}
/// <summary>
/// Advertisers can wrap AppsFlyer OneLink within another Universal Link.
/// This Universal Link will invoke the app but any deep linking data will not propagate to AppsFlyer.
/// </summary>
/// <param name="urls">Array of urls.</param>
public static void setResolveDeepLinkURLs(params string[] urls)
{
if (instance != null)
{
instance.setResolveDeepLinkURLs(urls);
}
}
/// <summary>
/// Advertisers can use this method to set vanity onelink domains.
/// </summary>
/// <param name="domains">Array of domains.</param>
public static void setOneLinkCustomDomain(params string[] domains)
{
if (instance != null)
{
instance.setOneLinkCustomDomain(domains);
}
else
{
#if UNITY_IOS || UNITY_STANDALONE_OSX
instance = new AppsFlyeriOS();
#elif UNITY_ANDROID
instance = new AppsFlyerAndroid();
#else
#endif
}
}
/// <summary>
/// Setting user local currency code for in-app purchases.
/// The currency code should be a 3 character ISO 4217 code. (default is USD).
/// You can set the currency code for all events by calling the following method.
/// </summary>
/// <param name="currencyCode">3 character ISO 4217 code.</param>
public static void setCurrencyCode(string currencyCode)
{
if (instance != null)
{
instance.setCurrencyCode(currencyCode);
} else {
#if UNITY_IOS || UNITY_STANDALONE_OSX
instance = new AppsFlyeriOS();
instance.setCurrencyCode(currencyCode);
#elif UNITY_ANDROID
instance = new AppsFlyerAndroid();
instance.setCurrencyCode(currencyCode);
#else
#endif
}
}
/// <summary>
/// Sets or updates the user consent data related to GDPR and DMA regulations for advertising and data usage purposes within the application.
/// </summary>
/// <param name = "appsFlyerConsent" >instance of AppsFlyerConsent.</param>
public static void setConsentData(AppsFlyerConsent appsFlyerConsent)
{
if (instance != null)
{
instance.setConsentData(appsFlyerConsent);
}
}
/// <summary>
/// Logs ad revenue data along with additional parameters if provided.
/// </summary>
/// <param name = "adRevenueData" >instance of AFAdRevenueData containing ad revenue information.</param>
/// <param name = "additionalParameters" >An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.</param>
public static void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<string, string> additionalParameters)
{
if (instance != null)
{
instance.logAdRevenue(adRevenueData, additionalParameters);
}
}
/// <summary>
/// Manually record the location of the user.
/// </summary>
/// <param name="latitude">latitude as double.</param>
/// <param name="longitude">longitude as double.</param>
public static void recordLocation(double latitude, double longitude)
{
if (instance != null)
{
instance.recordLocation(latitude, longitude);
}
}
/// <summary>
/// Anonymize user Data.
/// Use this API during the SDK Initialization to explicitly anonymize a user's installs, events and sessions.
/// Default is false.
/// </summary>
/// <param name = "shouldAnonymizeUser" >shouldAnonymizeUser boolean.</param>
public static void anonymizeUser(bool shouldAnonymizeUser)
{
if (instance != null)
{
instance.anonymizeUser(shouldAnonymizeUser);
}
}
/// <summary>
/// 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.
/// </summary>
/// <param name = "shouldCollectTcfData" >should start TCF Data collection boolean.</param>
public static void enableTCFDataCollection(bool shouldCollectTcfData)
{
if (instance != null)
{
instance.enableTCFDataCollection(shouldCollectTcfData);
}
}
/// <summary>
/// Get AppsFlyer's unique device ID which is created for every new install of an app.
/// </summary>
/// <returns>AppsFlyer's unique device ID.</returns>
public static string getAppsFlyerId()
{
#if UNITY_WSA_10_0 && !UNITY_EDITOR
return AppsFlyerWindows.GetAppsFlyerId();
#else
if (instance != null)
{
return instance.getAppsFlyerId();
}
#endif
return string.Empty;
}
/// <summary>
/// Set a custom value for the minimum required time between sessions.
/// By default, at least 5 seconds must lapse between 2 app launches to count as separate 2 sessions.
/// </summary>
/// <param name="seconds">minimum time between 2 separate sessions in seconds.</param>
public static void setMinTimeBetweenSessions(int seconds)
{
if (instance != null)
{
instance.setMinTimeBetweenSessions(seconds);
}
}
/// <summary>
/// Set a custom host.
/// </summary>
/// <param name="hostPrefixName">Host prefix.</param>
/// <param name="hostName">Host name.</param>
public static void setHost(string hostPrefixName, string hostName)
{
if (instance != null)
{
instance.setHost(hostPrefixName, hostName);
} else {
#if UNITY_IOS || UNITY_STANDALONE_OSX
instance = new AppsFlyeriOS();
instance.setHost(hostPrefixName, hostName);
#elif UNITY_ANDROID
instance = new AppsFlyerAndroid();
instance.setHost(hostPrefixName, hostName);
#else
#endif
}
}
/// <summary>
/// Set the user emails and encrypt them.
/// cryptMethod Encryption method:
/// EmailCryptType.EmailCryptTypeMD5
/// EmailCryptType.EmailCryptTypeSHA1
/// EmailCryptType.EmailCryptTypeSHA256
/// EmailCryptType.EmailCryptTypeNone
/// </summary>
/// <param name="cryptMethod">Encryption method.</param>
/// <param name="emails">User emails.</param>
public static void setUserEmails(EmailCryptType cryptType, params string[] userEmails)
{
if (instance != null)
{
instance.setUserEmails(cryptType, userEmails);
}
}
public static void updateServerUninstallToken(string token)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.updateServerUninstallToken(token);
}
}
/// <summary>
/// Set the user phone number.
/// </summary>
/// <param name="phoneNumber">phoneNumber string</param>
public static void setPhoneNumber(string phoneNumber)
{
if (instance != null)
{
instance.setPhoneNumber(phoneNumber);
}
}
public static void setImeiData(string aImei)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setImeiData(aImei);
}
}
/// <summary>
/// Used by advertisers to exclude all networks/integrated partners from getting data.
/// </summary>
[Obsolete("Please use setSharingFilterForPartners api")]
public static void setSharingFilterForAllPartners()
{
if (instance != null)
{
instance.setSharingFilterForAllPartners();
}
}
public static void setAndroidIdData(string aAndroidId)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setAndroidIdData(aAndroidId);
}
}
public static void waitForCustomerUserId(bool wait)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.waitForCustomerUserId(wait);
}
}
/// <summary>
/// Used by advertisers to set some (one or more) networks/integrated partners to exclude from getting data.
/// </summary>
/// <param name="partners">partners to exclude from getting data</param>
[Obsolete("Please use setSharingFilterForPartners api")]
public static void setSharingFilter(params string[] partners)
{
if (instance != null)
{
instance.setSharingFilter(partners);
}
}
public static void setCustomerIdAndStartSDK(string id)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setCustomerIdAndStartSDK(id);
}
}
/// <summary>
/// Lets you configure how which partners should the SDK exclude from data-sharing.
/// </summary>
/// <param name="partners">partners to exclude from getting data</param>
public static void setSharingFilterForPartners(params string[] partners)
{
#if UNITY_IOS || UNITY_STANDALONE_OSX
AppsFlyeriOS.setSharingFilterForPartners(partners);
#elif UNITY_ANDROID
AppsFlyerAndroid.setSharingFilterForPartners(partners);
#else
#endif
}
public static string getOutOfStore()
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
return appsFlyerAndroidInstance.getOutOfStore();
}
return string.Empty;
}
public static void setOutOfStore(string sourceName)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setOutOfStore(sourceName);
}
}
/// <summary>
/// Register a Conversion Data Listener.
/// Allows the developer to access the user attribution data in real-time for every new install, directly from the SDK level.
/// By doing this you can serve users with personalized content or send them to specific activities within the app,
/// which can greatly enhance their engagement with your app.
/// </summary>
/// <example>
/// <code>
/// AppsFlyer.getConversionData(this.name);
/// </code>
/// </example>
public static void getConversionData(string objectName)
{
#if UNITY_WSA_10_0 && !UNITY_EDITOR
AppsFlyerWindows.GetConversionData("");
#else
if (instance != null)
{
instance.getConversionData(objectName);
}
#endif
}
public static void setCollectAndroidID(bool isCollect)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setCollectAndroidID(isCollect);
}
}
public static void setIsUpdate(bool isUpdate)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setIsUpdate(isUpdate);
}
}
public static void setCollectIMEI(bool isCollect)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setCollectIMEI(isCollect);
}
}
public static void setDisableCollectAppleAdSupport(bool disable)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setDisableCollectAppleAdSupport(disable);
}
}
public static void setShouldCollectDeviceName(bool shouldCollectDeviceName)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setShouldCollectDeviceName(shouldCollectDeviceName);
}
}
/// <summary>
/// Use the following API to attribute the click and launch the app store's app page.
/// </summary>
/// <param name="appID">promoted App ID</param>
/// <param name="campaign">cross promotion campaign</param>
/// <param name="userParams">additional user params</param>
/// <example>
/// <code>
/// Dictionary<string, string> parameters = new Dictionary<string, string>();
/// parameters.Add("af_sub1", "val");
/// parameters.Add("custom_param", "val2");
/// AppsFlyer.attributeAndOpenStore("123456789", "test campaign", parameters, this);
/// </code>
/// </example>
public static void attributeAndOpenStore(string appID, string campaign, Dictionary<string, string> userParams, MonoBehaviour gameObject)
{
if (instance != null)
{
instance.attributeAndOpenStore(appID, campaign, userParams, gameObject);
}
}
public static void setPreinstallAttribution(string mediaSource, string campaign, string siteId)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setPreinstallAttribution(mediaSource, campaign, siteId);
}
}
public static void setDisableCollectIAd(bool disableCollectIAd)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setDisableCollectIAd(disableCollectIAd);
}
}
public static bool isPreInstalledApp()
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
return appsFlyerAndroidInstance.isPreInstalledApp();
}
return false;
}
public static void setUseReceiptValidationSandbox(bool useReceiptValidationSandbox)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setUseReceiptValidationSandbox(useReceiptValidationSandbox);
}
}
/// <summary>
/// To attribute an impression use the following API call.
/// Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
/// </summary>
/// <param name="appID">promoted App ID.</param>
/// <param name="campaign">cross promotion campaign.</param>
/// <param name="parameters">parameters Dictionary.</param>
public static void recordCrossPromoteImpression(string appID, string campaign, Dictionary<string, string> parameters)
{
if (instance != null)
{
instance.recordCrossPromoteImpression(appID, campaign, parameters);
}
}
public static void setUseUninstallSandbox(bool useUninstallSandbox)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setUseUninstallSandbox(useUninstallSandbox);
}
}
public static string getAttributionId()
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
return appsFlyerAndroidInstance.getAttributionId();
}
return string.Empty;
}
public static void handlePushNotifications()
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.handlePushNotifications();
}
}
/// <summary>
/// [Deprecated] Validates an in-app purchase on iOS.
/// Use the V2 overload with AFSDKPurchaseDetailsIOS instead.
/// </summary>
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
public static void validateAndSendInAppPurchase(string productIdentifier, string price, string currency, string transactionId, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.validateAndSendInAppPurchase(productIdentifier, price, currency, transactionId, additionalParameters, gameObject);
}
}
/// <summary>
/// Validates an in-app purchase on iOS using the V2 API.
/// </summary>
public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
}
}
/// <summary>
/// [Deprecated] Validates an in-app purchase on Android.
/// Use the V2 overload with AFPurchaseDetailsAndroid instead.
/// </summary>
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
public static void validateAndSendInAppPurchase(string publicKey, string signature, string purchaseData, string price, string currency, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.validateAndSendInAppPurchase(publicKey, signature,purchaseData, price, currency, additionalParameters, gameObject);
}
}
/// <summary>
/// Validates an in-app purchase on Android using the V2 API.
/// </summary>
public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.validateAndSendInAppPurchase(details, purchaseAdditionalDetails, gameObject);
}
}
public static void handleOpenUrl(string url, string sourceApplication, string annotation)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.handleOpenUrl(url, sourceApplication, annotation);
}
}
public static void registerUninstall(byte[] deviceToken)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.registerUninstall(deviceToken);
}
}
public static void waitForATTUserAuthorizationWithTimeoutInterval(int timeoutInterval)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.waitForATTUserAuthorizationWithTimeoutInterval(timeoutInterval);
}
}
public static void setCurrentDeviceLanguage(string language)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.setCurrentDeviceLanguage(language);
}
}
/// <summary>
/// The LinkGenerator class builds the invite URL according to various setter methods which allow passing on additional information on the click.
/// See - https://support.appsflyer.com/hc/en-us/articles/115004480866-User-invite-attribution-
/// </summary>
/// <param name="parameters">parameters Dictionary.</param>
public static void generateUserInviteLink(Dictionary<string, string> parameters, MonoBehaviour gameObject)
{
if (instance != null)
{
instance.generateUserInviteLink(parameters, gameObject);
}
}
public static void disableSKAdNetwork(bool isDisabled)
{
if (instance != null && instance is IAppsFlyerIOSBridge)
{
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.disableSKAdNetwork(isDisabled);
} else {
#if UNITY_IOS || UNITY_STANDALONE_OSX
instance = new AppsFlyeriOS();
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.disableSKAdNetwork(isDisabled);
#else
#endif
}
}
public static void setCollectOaid(bool isCollect)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setCollectOaid(isCollect);
}
}
/// <summary>
/// Use this method if you’re integrating your app with push providers
/// that don’t use the default push notification JSON schema the SDK expects.
/// See docs for more info.
/// </summary>
/// <param name="paths">array of nested json path</param>
public static void addPushNotificationDeepLinkPath(params string[] paths)
{
if (instance != null)
{
instance.addPushNotificationDeepLinkPath(paths);
}
}
public static void setDisableAdvertisingIdentifiers(bool disable)
{
if (instance != null && instance is IAppsFlyerAndroidBridge)
{
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setDisableAdvertisingIdentifiers(disable);
}
}
/// <summary>
/// Subscribe for unified deeplink API.
/// This is called automatically from OnDeepLinkReceived.
/// CallBackObjectName is set in the init method.
/// </summary>
public static void subscribeForDeepLink()
{
if (instance != null)
{
instance.subscribeForDeepLink(CallBackObjectName);
}
}
/// <summary>
/// Allows sending custom data for partner integration purposes.
/// partnerId : id of the partner
/// partnerInfo: customer data
/// </summary>
public static void setPartnerData(string partnerId, Dictionary<string, string> partnerInfo)
{
if (instance != null)
{
instance.setPartnerData(partnerId, partnerInfo);
}
}
/// <summary>
/// Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.
/// </summary>
public static void setDisableNetworkData(bool disable) {
if (instance != null && instance is IAppsFlyerAndroidBridge) {
IAppsFlyerAndroidBridge appsFlyerAndroidInstance = (IAppsFlyerAndroidBridge)instance;
appsFlyerAndroidInstance.setDisableNetworkData(disable);
}
}
/// <summary>
/// Use to disable app vendor identifier (IDFV) collection, 'true' to disable.
/// </summary>
public static void disableIDFVCollection(bool isDisabled)
{
#if UNITY_IOS || UNITY_STANDALONE_OSX
if (instance == null) {
instance = new AppsFlyeriOS();
}
if (instance != null && instance is IAppsFlyerIOSBridge) {
IAppsFlyerIOSBridge appsFlyeriOSInstance = (IAppsFlyerIOSBridge)instance;
appsFlyeriOSInstance.disableIDFVCollection(isDisabled);
}
#else
#endif
}
/// <summary>
/// Start callback event.
/// </summary>
public static event EventHandler OnRequestResponse
{
add
{
onRequestResponse += value;
}
remove
{
onRequestResponse -= value;
}
}
/// <summary>
/// In-App callback event.
/// </summary>
public static event EventHandler OnInAppResponse
{
add
{
onInAppResponse += value;
}
remove
{
onInAppResponse -= value;
}
}
/// <summary>
/// Unified DeepLink Event
/// </summary>
public static event EventHandler OnDeepLinkReceived
{
add
{
onDeepLinkReceived += value;
subscribeForDeepLink();
}
remove
{
onDeepLinkReceived -= value;
}
}
/// <summary>
/// Used to accept start callback from UnitySendMessage on native side.
/// </summary>
public void inAppResponseReceived(string response)
{
if (onInAppResponse != null)
{
onInAppResponse.Invoke(null, parseRequestCallback(response));
}
}
/// <summary>
/// Used to accept in-app callback from UnitySendMessage on native side.
/// </summary>
public void requestResponseReceived(string response)
{
if (onRequestResponse != null)
{
onRequestResponse.Invoke(null, parseRequestCallback(response));
}
}
/// <summary>
/// Used to accept deeplink callback from UnitySendMessage on native side.
/// </summary>
public void onDeepLinking(string response)
{
DeepLinkEventsArgs args = new DeepLinkEventsArgs(response);
if (onDeepLinkReceived != null)
{
onDeepLinkReceived.Invoke(null, args);
}
}
private static AppsFlyerRequestEventArgs parseRequestCallback(string response)
{
int responseCode = 0;
string errorDescription = "";
try
{
Dictionary<string, object> dictionary = CallbackStringToDictionary(response);
var errorResponse = dictionary.ContainsKey("errorDescription") ? dictionary["errorDescription"] : "";
errorDescription = (string)errorResponse;
responseCode = (int)(long) dictionary["statusCode"];
}
catch (Exception e)
{
AFLog("parseRequestCallback", String.Format("{0} Exception caught.", e));
}
return new AppsFlyerRequestEventArgs(responseCode, errorDescription);
}
/// <summary>
/// Helper method to convert json strings to dictionary.
/// </summary>
/// <param name="str">json string</param>
/// <returns>dictionary representing the input json string.</returns>
public static Dictionary<string, object> CallbackStringToDictionary(string str)
{
return AFMiniJSON.Json.Deserialize(str) as Dictionary<string, object>;
}
/// <summary>
/// Helper method to log AppsFlyer events and callbacks.
/// </summary>
/// <param name="methodName">method name</param>
/// <param name="str">message to log</param>
public static void AFLog(string methodName, string str)
{
Debug.Log(string.Format("AppsFlyer_Unity_v{0} {1} called with {2}", kAppsFlyerPluginVersion, methodName, str));
}
}
public enum EmailCryptType
{
// None
EmailCryptTypeNone = 0,
// SHA256
EmailCryptTypeSHA256 = 1,
}
}
================================================
FILE: Assets/AppsFlyer/AppsFlyer.cs.meta
================================================
fileFormatVersion: 2
guid: 45161025a517d427381d3d06153a5ad3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerAndroid.cs
================================================
using System;
using System.Collections.Generic;
using UnityEngine;
namespace AppsFlyerSDK
{
#if UNITY_ANDROID
public class AppsFlyerAndroid : IAppsFlyerAndroidBridge
{
public bool isInit { get; set; }
private static AndroidJavaClass appsFlyerAndroid = new AndroidJavaClass("com.appsflyer.unity.AppsFlyerAndroidWrapper");
public AppsFlyerAndroid() { }
/// <summary>
/// Use this method to init the sdk for the application.
/// Call this method before startSDK.
/// </summary>
/// <param name="devkey"> AppsFlyer's Dev-Key, which is accessible from your AppsFlyer account under 'App Settings' in the dashboard.</param>
/// <param name="gameObject">The current game object. This is used to get the conversion data callbacks. Pass null if you do not need the callbacks.</param>
public void initSDK(string devkey, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("initSDK", devkey, gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// Use this method to start the sdk for the application.
/// The AppsFlyer's Dev-Key must be provided.
/// </summary>
/// <param name="devkey"> AppsFlyer's Dev-Key, which is accessible from your AppsFlyer account under 'App Settings' in the dashboard.</param>
public void startSDK(bool onRequestResponse, string CallBackObjectName)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("startTracking", onRequestResponse, CallBackObjectName);
#endif
}
/// <summary>
/// Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.
/// In some extreme cases you might want to shut down all SDK activity due to legal and privacy compliance.
/// This can be achieved with the stopSDK API.
/// </summary>
/// <param name="isSDKStopped">boolean should SDK be stopped.</param>
public void stopSDK(bool isSDKStopped)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("stopTracking", isSDKStopped);
#endif
}
/// <summary>
/// Get the AppsFlyer SDK version used in app.
/// </summary>
/// <returns>AppsFlyer SDK version.</returns>
public string getSdkVersion()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getSdkVersion");
#else
return "";
#endif
}
/// <summary>
/// Manually pass the Firebase / GCM Device Token for Uninstall measurement.
/// </summary>
/// <param name="token">Firebase Device Token.</param>
public void updateServerUninstallToken(string token)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("updateServerUninstallToken", token);
#endif
}
/// <summary>
/// Enables Debug logs for the AppsFlyer SDK.
/// Should only be set to true in development / debug.
/// </summary>
/// <param name="shouldEnable">shouldEnable boolean.</param>
public void setIsDebug(bool shouldEnable)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setIsDebug", shouldEnable);
#endif
}
/// <summary>
/// By default, IMEI and Android ID are not collected by the SDK if the OS version is higher than KitKat (4.4)
/// and the device contains Google Play Services(on SDK versions 4.8.8 and below the specific app needed GPS).
/// Use this API to explicitly send IMEI to AppsFlyer.
/// </summary>
/// <param name="aImei">device's IMEI.</param>
public void setImeiData(string aImei)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setImeiData", aImei);
#endif
}
/// <summary>
/// By default, IMEI and Android ID are not collected by the SDK if the OS version is higher than KitKat(4.4)
/// and the device contains Google Play Services(on SDK versions 4.8.8 and below the specific app needed GPS).
/// Use this API to explicitly send Android ID to AppsFlyer.
/// </summary>
/// <param name="aAndroidId">device's Android ID.</param>
public void setAndroidIdData(string aAndroidId)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setAndroidIdData", aAndroidId);
#endif
}
/// <summary>
/// Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs.
/// This ID is available in AppsFlyer CSV reports along with Postback APIs for cross-referencing with your internal IDs.
/// </summary>
/// <param name="id">Customer ID for client.</param>
public void setCustomerUserId(string id)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCustomerUserId", id);
#endif
}
/// <summary>
/// It is possible to delay the SDK Initialization until the customerUserID is set.
/// This feature makes sure that the SDK doesn't begin functioning until the customerUserID is provided.
/// If this API is used, all in-app events and any other SDK API calls are discarded, until the customerUserID is provided.
/// </summary>
/// <param name="wait">wait boolean.</param>
public void waitForCustomerUserId(bool wait)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("waitForCustomerUserId", wait);
#endif
}
/// <summary>
/// Use this API to provide the SDK with the relevant customer user id and trigger the SDK to begin its normal activity.
/// </summary>
/// <param name="id">Customer ID for client.</param>
public void setCustomerIdAndStartSDK(string id)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCustomerIdAndTrack", id);
#endif
}
/// <summary>
/// Get the current AF_STORE value.
/// </summary>
/// <returns>AF_Store value.</returns>
public string getOutOfStore()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getOutOfStore");
#else
return "";
#endif
}
/// <summary>
/// Manually set the AF_STORE value.
/// </summary>
/// <param name="sourceName">value to be set.</param>
public void setOutOfStore(string sourceName)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setOutOfStore", sourceName);
#endif
}
/// <summary>
/// Set the OneLink ID that should be used for User-Invites.
/// The link that is generated for the user invite will use this OneLink as the base link.
/// </summary>
/// <param name="oneLinkId">OneLink ID obtained from the AppsFlyer Dashboard.</param>
public void setAppInviteOneLinkID(string oneLinkId)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setAppInviteOneLinkID", oneLinkId);
#endif
}
/// <summary>
/// Set additional data to be sent to AppsFlyer.
/// </summary>
/// <param name="customData">additional data Dictionary.</param>
public void setAdditionalData(Dictionary<string, string> customData)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setAdditionalData", convertDictionaryToJavaMap(customData));
#endif
}
//// <summary>
/// Set the deepLink timeout value that should be used for DDL.
/// </summary>
/// <param name="deepLinkTimeout">deepLink timeout in milliseconds.</param>
public void setDeepLinkTimeout(long deepLinkTimeout)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setDeepLinkTimeout", deepLinkTimeout);
#endif
}
/// <summary>
/// Set the user emails.
/// </summary>
/// <param name="emails">User emails.</param>
public void setUserEmails(params string[] userEmails)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setUserEmails", (object)userEmails);
#endif
}
/// <summary>
/// Set the user phone number.
/// </summary>
/// <param name="phoneNumber">User phoneNumber.</param>
public void setPhoneNumber(string phoneNumber){
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setPhoneNumber", phoneNumber);
#endif
}
/// <summary>
/// Set the user emails and encrypt them.
/// cryptMethod Encryption method:
/// EmailCryptType.EmailCryptTypeMD5
/// EmailCryptType.EmailCryptTypeSHA1
/// EmailCryptType.EmailCryptTypeSHA256
/// EmailCryptType.EmailCryptTypeNone
/// </summary>
/// <param name="cryptMethod">Encryption method.</param>
/// <param name="emails">User emails.</param>
public void setUserEmails(EmailCryptType cryptMethod, params string[] emails)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setUserEmails", getEmailType(cryptMethod), (object)emails);
#endif
}
/// <summary>
/// Opt-out of collection of Android ID.
/// If the app does NOT contain Google Play Services, Android ID is collected by the SDK.
/// However, apps with Google play services should avoid Android ID collection as this is in violation of the Google Play policy.
/// </summary>
/// <param name="isCollect">boolean, false to opt-out.</param>
public void setCollectAndroidID(bool isCollect)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCollectAndroidID", isCollect);
#endif
}
/// <summary>
/// Opt-out of collection of IMEI.
/// If the app does NOT contain Google Play Services, device IMEI is collected by the SDK.
/// However, apps with Google play services should avoid IMEI collection as this is in violation of the Google Play policy.
/// </summary>
/// <param name="isCollect">boolean, false to opt-out.</param>
public void setCollectIMEI(bool isCollect)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCollectIMEI", isCollect);
#endif
}
/// <summary>
/// Advertisers can wrap AppsFlyer OneLink within another Universal Link.
/// This Universal Link will invoke the app but any deep linking data will not propagate to AppsFlyer.
/// </summary>
/// <param name="urls">Array of urls.</param>
public void setResolveDeepLinkURLs(params string[] urls)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setResolveDeepLinkURLs", (object)urls);
#endif
}
/// <summary>
/// Advertisers can use this method to set vanity onelink domains.
/// </summary>
/// <param name="domains">Array of domains.</param>
public void setOneLinkCustomDomain(params string[] domains)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setOneLinkCustomDomain", (object)domains);
#endif
}
/// <summary>
/// Manually set that the application was updated.
/// </summary>
/// <param name="isUpdate">isUpdate boolean value.</param>
public void setIsUpdate(bool isUpdate)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setIsUpdate", isUpdate);
#endif
}
/// <summary>
/// Setting user local currency code for in-app purchases.
/// The currency code should be a 3 character ISO 4217 code. (default is USD).
/// You can set the currency code for all events by calling the following method.
/// </summary>
/// <param name="currencyCode">3 character ISO 4217 code.</param>
public void setCurrencyCode(string currencyCode)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCurrencyCode", currencyCode);
#endif
}
/// <summary>
/// Manually record the location of the user.
/// </summary>
/// <param name="latitude">latitude as double.</param>
/// <param name="longitude">longitude as double.</param>
public void recordLocation(double latitude, double longitude)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("trackLocation", latitude, longitude);
#endif
}
/// <summary>
/// Send an In-App Event.
/// In-App Events provide insight on what is happening in your app.
/// </summary>
/// <param name="eventName">Event Name as String.</param>
/// <param name="eventValues">Event Values as Dictionary.</param>
public void sendEvent(string eventName, Dictionary<string, string> eventValues)
{
sendEvent(eventName, eventValues, false, AppsFlyer.CallBackObjectName);
}
public void sendEvent(string eventName, Dictionary<string, string> eventValues, bool shouldCallback, string callBackObjectName)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("trackEvent", eventName, convertDictionaryToJavaMap(eventValues), shouldCallback, callBackObjectName);
#endif
}
/// <summary>
/// Anonymize user Data.
/// Use this API during the SDK Initialization to explicitly anonymize a user's installs, events and sessions.
/// Default is false.
/// </summary>
/// <param name="isDisabled">isDisabled boolean.</param>
public void anonymizeUser(bool isDisabled)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setDeviceTrackingDisabled", isDisabled);
#endif
}
/// <summary>
/// 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.
/// </summary>
/// <param name = "shouldCollectTcfData" >should start TCF Data collection boolean.</param>
public void enableTCFDataCollection(bool shouldCollectTcfData)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("enableTCFDataCollection", shouldCollectTcfData);
#endif
}
/// <summary>
/// Enable the collection of Facebook Deferred AppLinks.
/// Requires Facebook SDK and Facebook app on target/client device.
/// This API must be invoked prior to initializing the AppsFlyer SDK in order to function properly.
/// </summary>
/// <param name="isEnabled">should Facebook's deferred app links be processed by the AppsFlyer SDK.</param>
public void enableFacebookDeferredApplinks(bool isEnabled)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("enableFacebookDeferredApplinks", isEnabled);
#endif
}
/// <summary>
/// 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
/// </summary>
/// <param name = "hasConsentForDataUsage" >hasConsentForDataUsage boolean.</param>
/// <param name = "hasConsentForAdsPersonalization" >hasConsentForAdsPersonalization boolean.</param>
public void setConsentData(AppsFlyerConsent appsFlyerConsent)
{
#if !UNITY_EDITOR
string isUserSubjectToGDPR = appsFlyerConsent.isUserSubjectToGDPR?.ToString().ToLower() ?? "null";
string hasConsentForDataUsage = appsFlyerConsent.hasConsentForDataUsage?.ToString().ToLower() ?? "null";
string hasConsentForAdsPersonalization = appsFlyerConsent.hasConsentForAdsPersonalization?.ToString().ToLower() ?? "null";
string hasConsentForAdStorage = appsFlyerConsent.hasConsentForAdStorage?.ToString().ToLower() ?? "null";
appsFlyerAndroid.CallStatic("setConsentData", isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization, hasConsentForAdStorage);
#endif
}
/// <summary>
/// Logs ad revenue data along with additional parameters if provided.
/// <param name = "adRevenueData" >instance of AFAdRevenueData containing ad revenue information.</param>
/// <param name = "additionalParameters" >An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.</param>
public void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<string, string> additionalParameters)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("logAdRevenue", adRevenueData.monetizationNetwork, getMediationNetwork(adRevenueData.mediationNetwork), adRevenueData.currencyIso4217Code, adRevenueData.eventRevenue, convertDictionaryToJavaMap(additionalParameters));
#endif
}
/// <summary>
/// Restrict reengagement via deep-link to once per each unique deep-link.
/// Otherwise deep re-occurring deep-links will be permitted for non-singleTask Activities and deep-linking via AppsFlyer deep-links.
/// The default value is false.
/// </summary>
/// <param name="doConsume">doConsume boolean.</param>
public void setConsumeAFDeepLinks(bool doConsume)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setConsumeAFDeepLinks", doConsume);
#endif
}
/// <summary>
/// Specify the manufacturer or media source name to which the preinstall is attributed.
/// </summary>
/// <param name="mediaSource">Manufacturer or media source name for preinstall attribution.</param>
/// <param name="campaign">Campaign name for preinstall attribution.</param>
/// <param name="siteId">Site ID for preinstall attribution.</param>
public void setPreinstallAttribution(string mediaSource, string campaign, string siteId)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setPreinstallAttribution", mediaSource, campaign, siteId);
#endif
}
/// <summary>
/// Boolean indicator for preinstall by Manufacturer.
/// </summary>
/// <returns>boolean isPreInstalledApp.</returns>
public bool isPreInstalledApp()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<bool>("isPreInstalledApp");
#else
return false;
#endif
}
/// <summary>
/// Get the Facebook attribution ID, if one exists.
/// </summary>
/// <returns>string Facebook attribution ID.</returns>
public string getAttributionId()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getAttributionId");
#else
return "";
#endif
}
/// <summary>
/// Get AppsFlyer's unique device ID is created for every new install of an app.
/// </summary>
/// <returns>AppsFlyer's unique device ID.</returns>
public string getAppsFlyerId()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getAppsFlyerId");
#else
return "";
#endif
}
/// <summary>
/// [Deprecated] API for server verification of in-app purchases - please use V2 with AFPurchaseDetailsAndroid instead.
/// An af_purchase event with the relevant values will be automatically sent if the validation is successful.
/// </summary>
/// <param name="publicKey">License Key obtained from the Google Play Console.</param>
/// <param name="signature"><code>data.INAPP_DATA_SIGNATURE</code> from <code>onActivityResult(int requestCode, int resultCode, Intent data)</code></param>
/// <param name="purchaseData"><code>data.INAPP_PURCHASE_DATA</code> from <code>onActivityResult(int requestCode, int resultCode, Intent data)</code></param>
/// <param name="price">Purchase price, should be derived from <code>skuDetails.getStringArrayList("DETAILS_LIST")</code></param>
/// <param name="currency">Purchase currency, should be derived from <code>skuDetails.getStringArrayList("DETAILS_LIST")</code></param>
/// <param name="additionalParameters">additionalParameters Freehand parameters to be sent with the purchase (if validated).</param>
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
public void validateAndSendInAppPurchase(string publicKey, string signature, string purchaseData, string price, string currency, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("validateAndTrackInAppPurchase", publicKey, signature, purchaseData, price, currency, convertDictionaryToJavaMap(additionalParameters), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// V2 - API for server verification of in-app purchases.
/// An af_purchase event with the relevant values will be automatically sent if the validation is successful.
/// </summary>
/// <param name="details">AFPurchaseDetailsAndroid instance.</param>
/// <param name="purchaseAdditionalDetails">purchaseAdditionalDetails Freehand parameters to be sent with the purchase (if validated).</param>
public void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("validateAndTrackInAppPurchaseV2", (int)details.purchaseType, details.purchaseToken, details.productId, convertDictionaryToJavaMap(purchaseAdditionalDetails), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// Was the stopSDK(boolean) API set to true.
/// </summary>
/// <returns>boolean isSDKStopped.</returns>
public bool isSDKStopped()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<bool>("isTrackingStopped");
#else
return false;
#endif
}
/// <summary>
/// Set a custom value for the minimum required time between sessions.
/// By default, at least 5 seconds must lapse between 2 app launches to count as separate 2 sessions.
/// </summary>
/// <param name="seconds">minimum time between 2 separate sessions in seconds.</param>
public void setMinTimeBetweenSessions(int seconds)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setMinTimeBetweenSessions", seconds);
#endif
}
/// <summary>
/// Set a custom host.
/// </summary>
/// <param name="hostPrefixName">Host prefix.</param>
/// <param name="hostName">Host name.</param>
public void setHost(string hostPrefixName, string hostName)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setHost", hostPrefixName, hostName);
#endif
}
/// <summary>
/// Get the host name.
/// Default value is "appsflyer.com".
/// </summary>
/// <returns>Host name.</returns>
public string getHostName()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getHostName");
#else
return "";
#endif
}
/// <summary>
/// Get the custom host prefix.
/// </summary>
/// <returns>Host prefix.</returns>
public string getHostPrefix()
{
#if !UNITY_EDITOR
return appsFlyerAndroid.CallStatic<string>("getHostPrefix");
#else
return "";
#endif
}
/// <summary>
/// Used by advertisers to exclude all networks/integrated partners from getting data.
/// </summary>
public void setSharingFilterForAllPartners()
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setSharingFilterForAllPartners");
#endif
}
/// <summary>
/// Used by advertisers to set some (one or more) networks/integrated partners to exclude from getting data.
/// </summary>
/// <param name="partners">partners to exclude from getting data</param>
public void setSharingFilter(params string[] partners)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setSharingFilter", (object)partners);
#endif
}
/// <summary>
/// Lets you configure how which partners should the SDK exclude from data-sharing.
/// </summary>
/// <param name="partners">partners to exclude from getting data</param>
public static void setSharingFilterForPartners(params string[] partners)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setSharingFilterForPartners", (object)partners);
#endif
}
/// <summary>
/// Register a Conversion Data Listener.
/// Allows the developer to access the user attribution data in real-time for every new install, directly from the SDK level.
/// By doing this you can serve users with personalized content or send them to specific activities within the app,
/// which can greatly enhance their engagement with your app.
/// </summary>
public void getConversionData(string objectName)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("getConversionData", objectName);
#endif
}
/// <summary>
/// Register a validation listener for the validateAndSendInAppPurchase API.
/// </summary>
public void initInAppPurchaseValidatorListener(MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("initInAppPurchaseValidatorListener", gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// setCollectOaid
/// You must include the appsflyer oaid library for this api to work.
/// </summary>
/// <param name="isCollect">isCollect oaid - set fasle to opt out</param>
public void setCollectOaid(bool isCollect)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setCollectOaid", isCollect);
#endif
}
/// <summary>
/// Use the following API to attribute the click and launch the app store's app page.
/// </summary>
/// <param name="promoted_app_id">promoted App ID</param>
/// <param name="campaign">cross promotion campaign</param>
/// <param name="userParams">additional user params</param>
public void attributeAndOpenStore(string promoted_app_id, string campaign, Dictionary<string, string> userParams, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("attributeAndOpenStore", promoted_app_id, campaign, convertDictionaryToJavaMap(userParams));
#endif
}
/// <summary>
/// To attribute an impression use the following API call.
/// Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
/// </summary>
/// <param name="appID">promoted App ID.</param>
/// <param name="campaign">cross promotion campaign.</param>
/// <param name="parameters">parameters Dictionary.</param>
public void recordCrossPromoteImpression(string appID, string campaign, Dictionary<string, string> parameters)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("recordCrossPromoteImpression", appID, campaign, convertDictionaryToJavaMap(parameters));
#endif
}
/// <summary>
/// The LinkGenerator class builds the invite URL according to various setter methods which allow passing on additional information on the click.
/// See - https://support.appsflyer.com/hc/en-us/articles/115004480866-User-invite-attribution-
/// </summary>
/// <param name="parameters">parameters Dictionary.</param>
public void generateUserInviteLink(Dictionary<string, string> parameters, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("createOneLinkInviteListener", convertDictionaryToJavaMap(parameters), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// To measure push notifications as part of a retargeting campaign.
/// </summary>
public void handlePushNotifications(){
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("handlePushNotifications");
#endif
}
/// <summary>
/// Use this method if you’re integrating your app with push providers
/// that don’t use the default push notification JSON schema the SDK expects.
/// See docs for more info.
/// </summary>
/// <param name="paths">array of nested json path</param>
public void addPushNotificationDeepLinkPath(params string[] paths)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("addPushNotificationDeepLinkPath", (object)paths);
#endif
}
/// <summary>
/// subscribe to unified deep link callbacks
/// </summary>
public void subscribeForDeepLink(string objectName){
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("subscribeForDeepLink", objectName);
#endif
}
/// <summary>
/// Disables collection of various Advertising IDs by the SDK. This includes Google Advertising ID (GAID), OAID and Amazon Advertising ID (AAID)
/// </summary>
/// <param name="disable">disable boolean.</param>
public void setDisableAdvertisingIdentifiers(bool disable)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setDisableAdvertisingIdentifiers", disable);
#endif
}
/// <summary>
/// Allows sending custom data for partner integration purposes.
/// </summary>
public void setPartnerData(string partnerId, Dictionary<string, string> partnerInfo)
{
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setPartnerData", partnerId, convertDictionaryToJavaMap(partnerInfo));
#endif
}
/// <summary>
/// Use to opt-out of collecting the network operator name (carrier) and sim operator name from the device.
/// </summary>
public void setDisableNetworkData(bool disable) {
#if !UNITY_EDITOR
appsFlyerAndroid.CallStatic("setDisableNetworkData", disable);
#endif
}
/// <summary>
/// Internal Helper Method.
/// </summary>
private static AndroidJavaObject getEmailType(EmailCryptType cryptType)
{
AndroidJavaClass emailsCryptTypeEnum = new AndroidJavaClass("com.appsflyer.AppsFlyerProperties$EmailsCryptType");
AndroidJavaObject emailsCryptType;
switch (cryptType)
{
case EmailCryptType.EmailCryptTypeSHA256:
emailsCryptType = emailsCryptTypeEnum.GetStatic<AndroidJavaObject>("SHA256");
break;
default:
emailsCryptType = emailsCryptTypeEnum.GetStatic<AndroidJavaObject>("NONE");
break;
}
return emailsCryptType;
}
/// <summary>
/// Internal Helper Method.
/// </summary>
private static AndroidJavaObject getMediationNetwork(MediationNetwork mediationNetwork)
{
AndroidJavaClass mediationNetworkEnumClass = new AndroidJavaClass("com.appsflyer.MediationNetwork");
AndroidJavaObject mediationNetworkObject;
switch (mediationNetwork)
{
case MediationNetwork.IronSource:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("IRONSOURCE");
break;
case MediationNetwork.ApplovinMax:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("APPLOVIN_MAX");
break;
case MediationNetwork.GoogleAdMob:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("GOOGLE_ADMOB");
break;
case MediationNetwork.Fyber:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("FYBER");
break;
case MediationNetwork.Appodeal:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("APPODEAL");
break;
case MediationNetwork.Admost:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("ADMOST");
break;
case MediationNetwork.Topon:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("TOPON");
break;
case MediationNetwork.Tradplus:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("TRADPLUS");
break;
case MediationNetwork.Yandex:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("YANDEX");
break;
case MediationNetwork.ChartBoost:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("CHARTBOOST");
break;
case MediationNetwork.Unity:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("UNITY");
break;
case MediationNetwork.ToponPte:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("TOPON_PTE");
break;
case MediationNetwork.Custom:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("CUSTOM_MEDIATION");
break;
case MediationNetwork.DirectMonetization:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("DIRECT_MONETIZATION_NETWORK");
break;
default:
mediationNetworkObject = mediationNetworkEnumClass.GetStatic<AndroidJavaObject>("NONE");
break;
}
return mediationNetworkObject;
}
/// <summary>
/// Internal Helper Method.
/// </summary>
private static AndroidJavaObject convertDictionaryToJavaMap(Dictionary<string, string> dictionary)
{
AndroidJavaObject map = new AndroidJavaObject("java.util.HashMap");
IntPtr putMethod = AndroidJNIHelper.GetMethodID(map.GetRawClass(), "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
jvalue[] val;
if (dictionary != null)
{
foreach (var entry in dictionary)
{
val = AndroidJNIHelper.CreateJNIArgArray(new object[] { entry.Key, entry.Value });
AndroidJNI.CallObjectMethod(map.GetRawObject(), putMethod,val);
AndroidJNI.DeleteLocalRef(val[0].l);
AndroidJNI.DeleteLocalRef(val[1].l);
}
}
return map;
}
}
#endif
}
================================================
FILE: Assets/AppsFlyer/AppsFlyerAndroid.cs.meta
================================================
fileFormatVersion: 2
guid: 172d18dd98e7e4ed3b30110568b0fae4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerConsent.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
/// <summary>
// Data class representing a user's consent for data processing in accordance with GDPR and DMA
// (Digital Markets Act) compliance, specifically regarding advertising preferences.
// This class should be used to notify and record the user's applicability
// under GDPR, their general consent to data usage, and their consent to personalized
// advertisements based on user data.
/// ## Properties:
/// - `isUserSubjectToGDPR` (optional) - Indicates whether GDPR regulations apply to the user.
/// This may also serve as a general compliance flag for other regional regulations.
/// - `hasConsentForDataUsage` (optional) - Indicates whether the user consents to the processing
/// of their data for advertising purposes.
/// - `hasConsentForAdsPersonalization` (optional) - Indicates whether the user consents to the
/// use of their data for personalized advertising.
/// - `hasConsentForAdStorage` (optional) - Indicates whether the user consents to ad-related storage access.
///
/// **Usage Example:**
/// ```csharp
/// var consent = new AppsFlyerConsent(
/// isUserSubjectToGDPR: true,
/// hasConsentForDataUsage: true,
/// hasConsentForAdsPersonalization: false,
/// hasConsentForAdStorage: true
/// );
/// **Deprecated APIs:**
/// - `ForGDPRUser(...)` and `ForNonGDPRUser(...)` should no longer be used.
/// - Use `new AppsFlyerConsent(...)` instead with relevant consent fields.
///
/// </summary>
public class AppsFlyerConsent
{
public bool? isUserSubjectToGDPR { get; private set; }
public bool? hasConsentForDataUsage { get; private set; }
public bool? hasConsentForAdsPersonalization { get; private set; }
public bool? hasConsentForAdStorage { get; private set; }
public AppsFlyerConsent( bool? isUserSubjectToGDPR = null, bool? hasConsentForDataUsage = null, bool? hasConsentForAdsPersonalization = null, bool? hasConsentForAdStorage = null)
{
this.isUserSubjectToGDPR = isUserSubjectToGDPR;
this.hasConsentForDataUsage = hasConsentForDataUsage;
this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;
this.hasConsentForAdStorage = hasConsentForAdStorage;
}
[Obsolete("Use the new constructor with optional booleans instead.")]
private AppsFlyerConsent(bool isGDPR, bool hasForDataUsage, bool hasForAdsPersonalization)
{
isUserSubjectToGDPR = isGDPR;
hasConsentForDataUsage = hasForDataUsage;
hasConsentForAdsPersonalization = hasForAdsPersonalization;
}
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForGDPRUser(bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization)
{
return new AppsFlyerConsent(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);
}
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForNonGDPRUser()
{
return new AppsFlyerConsent(false);
}
}
}
================================================
FILE: Assets/AppsFlyer/AppsFlyerConsent.cs.meta
================================================
fileFormatVersion: 2
guid: a97c986fe4ee0461badf7042e08db3f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerEventArgs.cs
================================================
using System;
using System.Collections.Generic;
namespace AppsFlyerSDK
{
/// <summary>
/// Event args for AppsFlyer requests.
/// Used for sessions and in-app events.
/// Used to handle post request logic.
///
/// Examples:
/// statusCode / errorDescription
///
/// 200 - null
///
/// 10 - "Event timeout. Check 'minTimeBetweenSessions' param"
/// 11 - "Skipping event because 'isStopTracking' enabled"
/// 40 - Network error: Error description comes from Android
/// 41 - "No dev key"
/// 50 - "Status code failure" + actual response code from the server
///
/// </summary>
public class AppsFlyerRequestEventArgs : EventArgs
{
public AppsFlyerRequestEventArgs(int code, string description)
{
statusCode = code;
errorDescription = description;
}
public int statusCode { get; }
public string errorDescription { get; }
}
/// <summary>
/// Event args for OnDeepLinkReceived.
/// Used to handle deep linking results.
/// </summary>
public class DeepLinkEventsArgs : EventArgs
{
/// <summary>
/// DeepLink dictionary to get additional parameters
/// </summary>
public Dictionary<string, object> deepLink;
/// <summary>
/// DeepLink status: FOUND, NOT_FOUND, ERROR
/// </summary>
public DeepLinkStatus status { get; }
/// <summary>
/// DeepLink error: TIMEOUT, NETWORK, HTTP_STATUS_CODE, UNEXPECTED
/// </summary>
public DeepLinkError error { get; }
public string getMatchType()
{
return getDeepLinkParameter("match_type");
}
public string getDeepLinkValue()
{
return getDeepLinkParameter("deep_link_value");
}
public string getClickHttpReferrer()
{
return getDeepLinkParameter("click_http_referrer");
}
public string getMediaSource()
{
return getDeepLinkParameter("media_source");
}
public string getCampaign()
{
return getDeepLinkParameter("campaign");
}
public string getCampaignId()
{
return getDeepLinkParameter("campaign_id");
}
public string getAfSub1()
{
return getDeepLinkParameter("af_sub1");
}
public string getAfSub2()
{
return getDeepLinkParameter("af_sub2");
}
public string getAfSub3()
{
return getDeepLinkParameter("af_sub3");
}
public string getAfSub4()
{
return getDeepLinkParameter("af_sub4");
}
public string getAfSub5()
{
return getDeepLinkParameter("af_sub5");
}
public bool isDeferred()
{
if (deepLink != null && deepLink.ContainsKey("is_deferred"))
{
try
{
return (bool)deepLink["is_deferred"];
}
catch (Exception e)
{
AppsFlyer.AFLog("DeepLinkEventsArgs.isDeferred", String.Format("{0} Exception caught.", e));
}
}
return false;
}
public Dictionary<string, object> getDeepLinkDictionary()
{
return deepLink;
}
public DeepLinkEventsArgs(string str)
{
try
{
Dictionary<string, object> dictionary = AppsFlyer.CallbackStringToDictionary(str);
string status = "";
string error = "";
if (dictionary.ContainsKey("status") && dictionary["status"] != null)
{
status = dictionary["status"].ToString();
}
if (dictionary.ContainsKey("error") && dictionary["error"] != null)
{
error = dictionary["error"].ToString();
}
if (dictionary.ContainsKey("deepLink") && dictionary["deepLink"] != null)
{
this.deepLink = AppsFlyer.CallbackStringToDictionary(dictionary["deepLink"].ToString());
}
if (dictionary.ContainsKey("is_deferred"))
{
this.deepLink["is_deferred"] = dictionary["is_deferred"];
}
switch (status)
{
case "FOUND":
this.status = DeepLinkStatus.FOUND;
break;
case "NOT_FOUND":
this.status = DeepLinkStatus.NOT_FOUND;
break;
default:
this.status = DeepLinkStatus.ERROR;
break;
}
switch (error)
{
case "TIMEOUT":
this.error = DeepLinkError.TIMEOUT;
break;
case "NETWORK":
this.error = DeepLinkError.NETWORK;
break;
case "HTTP_STATUS_CODE":
this.error = DeepLinkError.HTTP_STATUS_CODE;
break;
default:
this.error = DeepLinkError.UNEXPECTED;
break;
}
}
catch (Exception e)
{
AppsFlyer.AFLog("DeepLinkEventsArgs.parseDeepLink", String.Format("{0} Exception caught.", e));
}
}
private string getDeepLinkParameter(string name)
{
if (deepLink != null && deepLink.ContainsKey(name) && deepLink[name] != null)
{
return deepLink[name].ToString();
}
return null;
}
}
public enum DeepLinkStatus {
FOUND, NOT_FOUND, ERROR
}
public enum DeepLinkError {
TIMEOUT, NETWORK, HTTP_STATUS_CODE, UNEXPECTED
}
}
================================================
FILE: Assets/AppsFlyer/AppsFlyerEventArgs.cs.meta
================================================
fileFormatVersion: 2
guid: a0fc241ad5a9b43a7b461a6147dbc74c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerObject.prefab
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7315102894599890749
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6207133488976360133}
- component: {fileID: 4405976200006927252}
m_Layer: 0
m_Name: AppsFlyerObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6207133488976360133
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7315102894599890749}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4405976200006927252
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7315102894599890749}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a2ec6ba1ee8b48749524f015ed572a6, type: 3}
m_Name:
m_EditorClassIdentifier:
devKey:
appID:
isDebug: 0
getConversionData: 0
================================================
FILE: Assets/AppsFlyer/AppsFlyerObject.prefab.meta
================================================
fileFormatVersion: 2
guid: 0bfe3b149145747cc92dc53bb4df4e9b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerObjectScript.cs
================================================
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AppsFlyerSDK;
// This class is intended to be used the the AppsFlyerObject.prefab
public class AppsFlyerObjectScript : MonoBehaviour , IAppsFlyerConversionData
{
// These fields are set from the editor so do not modify!
//******************************//
public string devKey;
public string appID;
public string UWPAppID;
public string macOSAppID;
public bool isDebug;
public bool getConversionData;
//******************************//
void Start()
{
// These fields are set from the editor so do not modify!
//******************************//
AppsFlyer.setIsDebug(isDebug);
#if UNITY_WSA_10_0 && !UNITY_EDITOR
AppsFlyer.initSDK(devKey, UWPAppID, getConversionData ? this : null);
#elif UNITY_STANDALONE_OSX && !UNITY_EDITOR
AppsFlyer.initSDK(devKey, macOSAppID, getConversionData ? this : null);
#else
AppsFlyer.initSDK(devKey, appID, getConversionData ? this : null);
#endif
//******************************/
AppsFlyer.startSDK();
}
void Update()
{
}
// Mark AppsFlyer CallBacks
public void onConversionDataSuccess(string conversionData)
{
AppsFlyer.AFLog("didReceiveConversionData", conversionData);
Dictionary<string, object> conversionDataDictionary = AppsFlyer.CallbackStringToDictionary(conversionData);
// add deferred deeplink logic here
}
public void onConversionDataFail(string error)
{
AppsFlyer.AFLog("didReceiveConversionDataWithError", error);
}
public void onAppOpenAttribution(string attributionData)
{
AppsFlyer.AFLog("onAppOpenAttribution", attributionData);
Dictionary<string, object> attributionDataDictionary = AppsFlyer.CallbackStringToDictionary(attributionData);
// add direct deeplink logic here
}
public void onAppOpenAttributionFailure(string error)
{
AppsFlyer.AFLog("onAppOpenAttributionFailure", error);
}
}
================================================
FILE: Assets/AppsFlyer/AppsFlyerObjectScript.cs.meta
================================================
fileFormatVersion: 2
guid: 2a2ec6ba1ee8b48749524f015ed572a6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs
================================================
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using System;
namespace AppsFlyerSDK
{
public interface IAppsFlyerPurchaseRevenueDataSource
{
Dictionary<string, object> PurchaseRevenueAdditionalParametersForProducts(HashSet<object> products, HashSet<object> transactions);
}
public interface IAppsFlyerPurchaseRevenueDataSourceStoreKit2
{
Dictionary<string, object> PurchaseRevenueAdditionalParametersStoreKit2ForProducts(HashSet<object> products, HashSet<object> transactions);
}
public class AppsFlyerPurchaseRevenueBridge : MonoBehaviour
{
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void RegisterUnityPurchaseRevenueParamsCallback(Func<string, string, string> callback);
[DllImport("__Internal")]
private static extern void RegisterUnityPurchaseRevenueParamsCallbackSK2(Func<string, string, string> callback);
#endif
private static IAppsFlyerPurchaseRevenueDataSource _dataSource;
private static IAppsFlyerPurchaseRevenueDataSourceStoreKit2 _dataSourceSK2;
public static void RegisterDataSource(IAppsFlyerPurchaseRevenueDataSource dataSource)
{
_dataSource = dataSource;
#if UNITY_IOS && !UNITY_EDITOR
RegisterUnityPurchaseRevenueParamsCallback(GetAdditionalParameters);
#elif UNITY_ANDROID && !UNITY_EDITOR
using (AndroidJavaClass jc = new AndroidJavaClass("com.appsflyer.unity.PurchaseRevenueBridge"))
{
jc.CallStatic("setUnityBridge", new UnityPurchaseRevenueBridgeProxy());
}
#endif
}
public static void RegisterDataSourceStoreKit2(IAppsFlyerPurchaseRevenueDataSourceStoreKit2 dataSource)
{
#if UNITY_IOS && !UNITY_EDITOR
_dataSourceSK2 = dataSource;
RegisterUnityPurchaseRevenueParamsCallbackSK2(GetAdditionalParametersSK2);
#endif
}
public static Dictionary<string, object> GetAdditionalParametersForAndroid(HashSet<object> products, HashSet<object> transactions)
{
return _dataSource?.PurchaseRevenueAdditionalParametersForProducts(products, transactions)
?? new Dictionary<string, object>();
}
#if UNITY_IOS && !UNITY_EDITOR
[AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
public static string GetAdditionalParameters(string productsJson, string transactionsJson)
{
try
{
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
if (!string.IsNullOrEmpty(productsJson))
{
var dict = AFMiniJSON.Json.Deserialize(productsJson) as Dictionary<string, object>;
if (dict != null)
{
if (dict.TryGetValue("products", out var productsObj) && productsObj is List<object> productList)
products = new HashSet<object>(productList);
if (dict.TryGetValue("transactions", out var transactionsObj) && transactionsObj is List<object> transactionList)
transactions = new HashSet<object>(transactionList);
}
}
var parameters = _dataSource?.PurchaseRevenueAdditionalParametersForProducts(products, transactions)
?? new Dictionary<string, object>();
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"[AppsFlyer] Exception in GetAdditionalParameters: {e}");
return "{}";
}
}
#endif
#if UNITY_IOS && !UNITY_EDITOR
[AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
public static string GetAdditionalParametersSK2(string productsJson, string transactionsJson)
{
try
{
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
if (!string.IsNullOrEmpty(productsJson))
{
var dict = AFMiniJSON.Json.Deserialize(productsJson) as Dictionary<string, object>;
if (dict != null && dict.TryGetValue("products", out var productsObj) && productsObj is List<object> productList)
products = new HashSet<object>(productList);
}
if (!string.IsNullOrEmpty(transactionsJson))
{
var dict = AFMiniJSON.Json.Deserialize(transactionsJson) as Dictionary<string, object>;
if (dict != null && dict.TryGetValue("transactions", out var transactionsObj) && transactionsObj is List<object> transactionList)
transactions = new HashSet<object>(transactionList);
}
var parameters = _dataSourceSK2?.PurchaseRevenueAdditionalParametersStoreKit2ForProducts(products, transactions)
?? new Dictionary<string, object>();
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"[AppsFlyer] Exception in GetAdditionalParametersSK2: {e}");
return "{}";
}
}
#endif
}
public class UnityPurchaseRevenueBridgeProxy : AndroidJavaProxy
{
public UnityPurchaseRevenueBridgeProxy() : base("com.appsflyer.unity.PurchaseRevenueBridge$UnityPurchaseRevenueBridge") { }
public string getAdditionalParameters(string productsJson, string transactionsJson)
{
try
{
// Create empty sets if JSON is null or empty
HashSet<object> products = new HashSet<object>();
HashSet<object> transactions = new HashSet<object>();
// Only try to parse if we have valid JSON
if (!string.IsNullOrEmpty(productsJson))
{
try
{
// First try to parse as a simple array
var parsedProducts = AFMiniJSON.Json.Deserialize(productsJson);
if (parsedProducts is List<object> productList)
{
products = new HashSet<object>(productList);
}
else if (parsedProducts is Dictionary<string, object> dict)
{
if (dict.ContainsKey("events") && dict["events"] is List<object> eventsList)
{
products = new HashSet<object>(eventsList);
}
else
{
// If it's a dictionary but doesn't have events, add the whole dict
products.Add(dict);
}
}
}
catch (Exception e)
{
Debug.LogError($"Error parsing products JSON: {e.Message}\nJSON: {productsJson}");
}
}
if (!string.IsNullOrEmpty(transactionsJson))
{
try
{
// First try to parse as a simple array
var parsedTransactions = AFMiniJSON.Json.Deserialize(transactionsJson);
if (parsedTransactions is List<object> transactionList)
{
transactions = new HashSet<object>(transactionList);
}
else if (parsedTransactions is Dictionary<string, object> dict)
{
if (dict.ContainsKey("events") && dict["events"] is List<object> eventsList)
{
transactions = new HashSet<object>(eventsList);
}
else
{
// If it's a dictionary but doesn't have events, add the whole dict
transactions.Add(dict);
}
}
}
catch (Exception e)
{
Debug.LogError($"Error parsing transactions JSON: {e.Message}\nJSON: {transactionsJson}");
}
}
var parameters = AppsFlyerPurchaseRevenueBridge.GetAdditionalParametersForAndroid(products, transactions);
return AFMiniJSON.Json.Serialize(parameters);
}
catch (Exception e)
{
Debug.LogError($"Error in getAdditionalParameters: {e.Message}\nProducts JSON: {productsJson}\nTransactions JSON: {transactionsJson}");
return "{}";
}
}
}
public class AppsFlyerPurchaseConnector : MonoBehaviour {
private static AppsFlyerPurchaseConnector instance;
private Dictionary<string, object> pendingParameters;
private Action<Dictionary<string, object>> pendingCallback;
public static AppsFlyerPurchaseConnector Instance
{
get
{
if (instance == null)
{
GameObject go = new GameObject("AppsFlyerPurchaseConnector");
instance = go.AddComponent<AppsFlyerPurchaseConnector>();
DontDestroyOnLoad(go);
}
return instance;
}
}
private void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
}
}
#if UNITY_ANDROID && !UNITY_EDITOR
private static AndroidJavaClass appsFlyerAndroidConnector = new AndroidJavaClass("com.appsflyer.unity.AppsFlyerAndroidWrapper");
#endif
public static void init(MonoBehaviour unityObject, Store s) {
#if UNITY_IOS && !UNITY_EDITOR
_initPurchaseConnector(unityObject.name);
#elif UNITY_ANDROID && !UNITY_EDITOR
int store = mapStoreToInt(s);
appsFlyerAndroidConnector.CallStatic("initPurchaseConnector", unityObject ? unityObject.name : null, store);
#endif
}
public static void build() {
#if UNITY_IOS && !UNITY_EDITOR
//not for iOS
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("build");
#else
#endif
}
public static void startObservingTransactions() {
#if UNITY_IOS && !UNITY_EDITOR
_startObservingTransactions();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("startObservingTransactions");
#else
#endif
}
public static void stopObservingTransactions() {
#if UNITY_IOS && !UNITY_EDITOR
_stopObservingTransactions();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("stopObservingTransactions");
#else
#endif
}
public static void setIsSandbox(bool isSandbox) {
#if UNITY_IOS && !UNITY_EDITOR
_setIsSandbox(isSandbox);
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("setIsSandbox", isSandbox);
#else
#endif
}
public static void setPurchaseRevenueValidationListeners(bool enableCallbacks) {
#if UNITY_IOS && !UNITY_EDITOR
_setPurchaseRevenueDelegate();
#elif UNITY_ANDROID && !UNITY_EDITOR
appsFlyerAndroidConnector.CallStatic("setPurchaseRevenueValidationListeners", enableCallbacks);
#else
#endif
}
public static void setAutoLogPurchaseRevenue(params AppsFlyerAutoLogPurchaseRevenueOptions[] autoLogPurchaseRevenueOptions) {
#if UNITY_IOS && !UNITY_EDITOR
int option = 0;
foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) {
option = option | (int)op;
}
_setAutoLogPurchaseRevenue(option);
#elif UNITY_ANDROID && !UNITY_EDITOR
if (autoLogPurchaseRevenueOptions.Length == 0) {
return;
}
foreach (AppsFlyerAutoLogPurchaseRevenueOptions op in autoLogPurchaseRevenueOptions) {
switch(op) {
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsDisabled:
break;
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions:
appsFlyerAndroidConnector.CallStatic("setAutoLogSubscriptions", true);
break;
case AppsFlyerAutoLogPurchaseRevenueOptions.AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases:
appsFlyerAndroidConnector.CallStatic("setAutoLogInApps", true);
break;
default:
break;
}
}
#else
#endif
}
public static void setPurchaseRevenueDataSource(IAppsFlyerPurchaseRevenueDataSource dataSource)
{
#if UNITY_IOS && !UNITY_EDITOR
if (dataSource != null)
{
_setPurchaseRevenueDataSource(dataSource.GetType().Name);
AppsFlyerPurchaseRevenueBridge.RegisterDataSource(dataSource);
}
#elif UNITY_ANDROID && !UNITY_EDITOR
if (dataSource != null)
{
AppsFlyerPurchaseRevenueBridge.RegisterDataSource(dataSource);
}
#endif
}
public static void setPurchaseRevenueDataSourceStoreKit2(IAppsFlyerPurchaseRevenueDataSourceStoreKit2 dataSourceSK2)
{
#if UNITY_IOS && !UNITY_EDITOR
if (dataSourceSK2 != null)
{
AppsFlyerPurchaseRevenueBridge.RegisterDataSourceStoreKit2(dataSourceSK2);
_setPurchaseRevenueDataSource("AppsFlyerObjectScript_StoreKit2");
}
#endif
}
private static int mapStoreToInt(Store s) {
switch(s) {
case(Store.GOOGLE):
return 0;
default:
return -1;
}
}
public static void setStoreKitVersion(StoreKitVersion storeKitVersion) {
#if UNITY_IOS && !UNITY_EDITOR
_setStoreKitVersion((int)storeKitVersion);
#elif UNITY_ANDROID && !UNITY_EDITOR
// Android doesn't use StoreKit
#else
#endif
}
public static void logConsumableTransaction(string transactionJson) {
#if UNITY_IOS && !UNITY_EDITOR
_logConsumableTransaction(transactionJson);
#elif UNITY_ANDROID && !UNITY_EDITOR
// Android doesn't use StoreKit
#else
#endif
}
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void _startObservingTransactions();
[DllImport("__Internal")]
private static extern void _stopObservingTransactions();
[DllImport("__Internal")]
private static extern void _setIsSandbox(bool isSandbox);
[DllImport("__Internal")]
private static extern void _setPurchaseRevenueDelegate();
[DllImport("__Internal")]
private static extern void _setPurchaseRevenueDataSource(string dataSourceName);
[DllImport("__Internal")]
private static extern void _setAutoLogPurchaseRevenue(int option);
[DllImport("__Internal")]
private static extern void _initPurchaseConnector(string objectName);
[DllImport("__Internal")]
private static extern void _setStoreKitVersion(int storeKitVersion);
[DllImport("__Internal")]
private static extern void _logConsumableTransaction(string transactionJson);
#endif
}
public enum Store {
GOOGLE = 0
}
public enum AppsFlyerAutoLogPurchaseRevenueOptions
{
AppsFlyerAutoLogPurchaseRevenueOptionsDisabled = 0,
AppsFlyerAutoLogPurchaseRevenueOptionsAutoRenewableSubscriptions = 1 << 0,
AppsFlyerAutoLogPurchaseRevenueOptionsInAppPurchases = 1 << 1
}
public enum StoreKitVersion {
SK1 = 0,
SK2 = 1
}
}
================================================
FILE: Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs.meta
================================================
fileFormatVersion: 2
guid: 0636ea07d370d437183f3762280c08ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Assets/AppsFlyer/AppsFlyeriOS.cs
================================================
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
using System.Reflection;
namespace AppsFlyerSDK
{
#if UNITY_IOS || UNITY_STANDALONE_OSX
public class AppsFlyeriOS: IAppsFlyerIOSBridge
{
public bool isInit { get; set; }
public AppsFlyeriOS() { }
public AppsFlyeriOS(string devKey, string appID, MonoBehaviour gameObject)
{
setAppsFlyerDevKey(devKey);
setAppleAppID(appID);
if (gameObject != null)
{
#if UNITY_IOS
getConversionData(gameObject.name);
#elif UNITY_STANDALONE_OSX
getConversionData(gameObject.GetType().ToString());
#endif
}
}
/// <summary>
/// Start Session.
/// This will record a session and then record all background forground sessions during the lifecycle of the app.
/// </summary>
public void startSDK(bool shouldCallback, string CallBackObjectName)
{
#if UNITY_STANDALONE_OSX && !UNITY_EDITOR
_startSDK(shouldCallback, CallBackObjectName, getCallback);
#elif UNITY_IOS && !UNITY_EDITOR
_startSDK(shouldCallback, CallBackObjectName);
#endif
}
/// <summary>
/// Send an In-App Event.
/// In-App Events provide insight on what is happening in your app.
/// </summary>
/// <param name="eventName">Name of event.</param>
/// <param name="eventValues">Contains dictionary of values for handling by backend.</param>
public void sendEvent(string eventName, Dictionary<string, string> eventValues)
{
sendEvent(eventName, eventValues, false, AppsFlyer.CallBackObjectName);
}
public void sendEvent(string eventName, Dictionary<string, string> eventValues, bool shouldCallback, string callBackObjectName)
{
#if !UNITY_EDITOR
_afSendEvent(eventName, AFMiniJSON.Json.Serialize(eventValues), shouldCallback, callBackObjectName);
#endif
}
/// <summary>
/// Get the conversion data.
/// Allows the developer to access the user attribution data in real-time for every new install, directly from the SDK level.
/// By doing this you can serve users with personalized content or send them to specific activities within the app,
/// which can greatly enhance their engagement with your app.
/// </summary>
public void getConversionData(string objectName)
{
#if !UNITY_EDITOR
_getConversionData(objectName);
#endif
}
/// <summary>
/// In case you use your own user ID in your app, you can set this property to that ID.
/// Enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and the other devices’ IDs.
/// </summary>
/// <param name="customerUserID">Customer ID for client.</param>
public void setCustomerUserId(string customerUserID)
{
#if !UNITY_EDITOR
_setCustomerUserID(customerUserID);
#endif
}
/// <summary>
/// In case you use custom data and you want to receive it in the raw reports.
/// see [Setting additional custom data] (https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#setting-additional-custom-data) for more information.
/// </summary>
/// <param name="customData">additional data Dictionary.</param>
public void setAdditionalData(Dictionary<string, string> customData)
{
#if !UNITY_EDITOR
_setAdditionalData(AFMiniJSON.Json.Serialize(customData));
#endif
}
/// <summary>
/// Use this method to set your AppsFlyer's dev key.
/// </summary>
/// <param name="appsFlyerDevKey">AppsFlyer's Dev-Key, which is accessible from your AppsFlyer account under 'App Settings' in the dashboard.</param>
public void setAppsFlyerDevKey(string appsFlyerDevKey)
{
#if !UNITY_EDITOR
_setAppsFlyerDevKey(appsFlyerDevKey);
#endif
}
/// <summary>
/// Use this method to set your app's Apple ID(taken from the app's page on iTunes Connect).
/// </summary>
/// <param name="appleAppID">your app's Apple ID.</param>
public void setAppleAppID(string appleAppID)
{
#if !UNITY_EDITOR
_setAppleAppID(appleAppID);
#endif
}
/// <summary>
/// Setting user local currency code for in-app purchases.
/// The currency code should be a 3 character ISO 4217 code. (default is USD).
/// You can set the currency code for all events by calling the following method.
/// </summary>
/// <param name="currencyCode">3 character ISO 4217 code.</param>
public void setCurrencyCode(string currencyCode)
{
#if !UNITY_EDITOR
_setCurrencyCode(currencyCode);
#endif
}
/// <summary>
/// AppsFlyer SDK collect Apple's `advertisingIdentifier` if the `AdSupport.framework` included in the SDK.
/// You can disable this behavior by setting the following property to true.
/// </summary>
/// <param name="disableCollectAppleAdSupport">boolean to disableCollectAppleAdSupport</param>
public void setDisableCollectAppleAdSupport(bool disableCollectAppleAdSupport)
{
#if !UNITY_EDITOR
_setDisableCollectAppleAdSupport(disableCollectAppleAdSupport);
#endif
}
/// <summary>
/// Enables Debug logs for the AppsFlyer SDK.
/// Should only be set to true in development / debug.
/// The default value is false.
/// </summary>
/// <param name="isDebug">shouldEnable boolean..</param>
public void setIsDebug(bool isDebug)
{
#if !UNITY_EDITOR
_setIsDebug(isDebug);
#endif
}
/// <summary>
/// Set this flag to true, to collect the current device name(e.g. "My iPhone"). Default value is false.
/// </summary>
/// <param name="shouldCollectDeviceName">boolean shouldCollectDeviceName.</param>
[System.Obsolete("This is deprecated")]
public void setShouldCollectDeviceName(bool shouldCollectDeviceName)
{
#if !UNITY_EDITOR
_setShouldCollectDeviceName(shouldCollectDeviceName);
#endif
}
/// <summary>
/// Set the OneLink ID that should be used for User-Invites.
/// The link that is generated for the user invite will use this OneLink as the base link.
/// </summary>
/// <param name="appInviteOneLinkID">OneLink ID obtained from the AppsFlyer Dashboard.</param>
public void setAppInviteOneLinkID(string appInviteOneLinkID)
{
#if !UNITY_EDITOR
_setAppInviteOneLinkID(appInviteOneLinkID);
#endif
}
/// <summary>
/// Set the deepLink timeout value that should be used for DDL.
/// </summary>
/// <param name="deepLinkTimeout">deepLink timeout in milliseconds.</param>
public void setDeepLinkTimeout(long deepLinkTimeout)
{
#if !UNITY_EDITOR
_setDeepLinkTimeout(deepLinkTimeout);
#endif
}
/// <summary>
/// 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.
/// </summary>
/// <param name = "shouldCollectTcfData" >should start TCF Data collection boolean.</param>
public void enableTCFDataCollection(bool shouldCollectTcfData)
{
#if !UNITY_EDITOR
_enableTCFDataCollection(shouldCollectTcfData);
#endif
}
/// <summary>
/// Sets or updates the user consent data related to GDPR and DMA regulations for advertising and data usage purposes within the application.
/// </summary>
/// <param name = "appsFlyerConsent" >instance of AppsFlyerConsent.</param>
public void setConsentData(AppsFlyerConsent appsFlyerConsent)
{
#if !UNITY_EDITOR
string isUserSubjectToGDPR = appsFlyerConsent.isUserSubjectToGDPR?.ToString().ToLower() ?? "null";
string hasConsentForDataUsage = appsFlyerConsent.hasConsentForDataUsage?.ToString().ToLower() ?? "null";
string hasConsentForAdsPersonalization = appsFlyerConsent.hasConsentForAdsPersonalization?.ToString().ToLower() ?? "null";
string hasConsentForAdStorage = appsFlyerConsent.hasConsentForAdStorage?.ToString().ToLower() ?? "null";
_setConsentData(isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization, hasConsentForAdStorage);
#endif
}
/// <summary>
/// Logs ad revenue data along with additional parameters if provided.
/// </summary>
/// <param name = "adRevenueData" >instance of AFAdRevenueData containing ad revenue information.</param>
/// <param name = "additionalParameters" >An optional map of additional parameters to be logged with ad revenue data. This can be null if there are no additional parameters.</param>
public void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<string, string> additionalParameters)
{
#if !UNITY_EDITOR
_logAdRevenue(adRevenueData.monetizationNetwork, adRevenueData.mediationNetwork, adRevenueData.currencyIso4217Code, adRevenueData.eventRevenue, AFMiniJSON.Json.Serialize(additionalParameters));
#endif
}
/// <summary>
/// Anonymize user Data.
/// Use this API during the SDK Initialization to explicitly anonymize a user's installs, events and sessions.
/// Default is false
/// </summary>
/// <param name="shouldAnonymizeUser">boolean shouldAnonymizeUser.</param>
public void anonymizeUser(bool shouldAnonymizeUser)
{
#if !UNITY_EDITOR
_anonymizeUser(shouldAnonymizeUser);
#endif
}
/// <summary>
/// Opt-out for Apple Search Ads attributions.
/// </summary>
/// <param name="disableCollectIAd">boolean disableCollectIAd.</param>
public void setDisableCollectIAd(bool disableCollectIAd)
{
#if !UNITY_EDITOR
_setDisableCollectIAd(disableCollectIAd);
#endif
}
/// <summary>
/// In app purchase receipt validation Apple environment(production or sandbox). The default value is false.
/// </summary>
/// <param name="useReceiptValidationSandbox">boolean useReceiptValidationSandbox.</param>
public void setUseReceiptValidationSandbox(bool useReceiptValidationSandbox)
{
#if !UNITY_EDITOR
_setUseReceiptValidationSandbox(useReceiptValidationSandbox);
#endif
}
/// <summary>
/// Set this flag to test uninstall on Apple environment(production or sandbox). The default value is false.
/// </summary>
/// <param name="useUninstallSandbox">boolean useUninstallSandbox.</param>
public void setUseUninstallSandbox(bool useUninstallSandbox)
{
#if !UNITY_EDITOR
_setUseUninstallSandbox(useUninstallSandbox);
#endif
}
/// <summary>
/// For advertisers who wrap OneLink within another Universal Link.
/// An advertiser will be able to deeplink from a OneLink wrapped within another Universal Link and also record this retargeting conversion.
/// </summary>
/// <param name="resolveDeepLinkURLs">Array of urls.</param>
public void setResolveDeepLinkURLs(params string[] resolveDeepLinkURLs)
{
#if !UNITY_EDITOR
_setResolveDeepLinkURLs(resolveDeepLinkURLs.Length,resolveDeepLinkURLs);
#endif
}
/// <summary>
/// For advertisers who use vanity OneLinks.
/// </summary>
/// <param name="oneLinkCustomDomains">Array of domains.</param>
public void setOneLinkCustomDomain(params string[] oneLinkCustomDomains)
{
#if !UNITY_EDITOR
_setOneLinkCustomDomains(oneLinkCustomDomains.Length, oneLinkCustomDomains);
#endif
}
/// <summary>
/// Set the user emails and encrypt them.
/// cryptMethod Encryption method:
/// EmailCryptType.EmailCryptTypeMD5
/// EmailCryptType.EmailCryptTypeSHA1
/// EmailCryptType.EmailCryptTypeSHA256
/// EmailCryptType.EmailCryptTypeNone
/// </summary>
/// <param name="cryptType">type Hash algoritm.</param>
/// <param name="length">length of userEmails array.</param>
/// <param name="userEmails">userEmails The list of strings that hold mails.</param>}
public void setUserEmails(EmailCryptType cryptType, params string[] userEmails)
{
#if !UNITY_EDITOR
_setUserEmails(cryptType, userEmails.Length, userEmails);
#endif
}
/// <summary>
/// Set the user phone number.
/// </summary>
/// <param name="phoneNumber">User phoneNumber.</param>
public void setPhoneNumber(string phoneNumber){
#if !UNITY_EDITOR
_setPhoneNumber(phoneNumber);
#endif
}
/// <summary>
/// [Deprecated] To send and validate in app purchases - please use V2 with AFSDKPurchaseDetailsIOS instead.
/// </summary>
/// <param name="productIdentifier">The product identifier.</param>
/// <param name="price">The product price.</param>
/// <param name="currency">The product currency.</param>
/// <param name="transactionId">The purchase transaction Id.</param>
/// <param name="additionalParameters">The additional param, which you want to receive it in the raw reports.</param>
[System.Obsolete("This method is deprecated. Use validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject) instead.")]
public void validateAndSendInAppPurchase(string productIdentifier, string price, string currency, string transactionId, Dictionary<string, string> additionalParameters, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
_validateAndSendInAppPurchase(productIdentifier, price, currency, transactionId, AFMiniJSON.Json.Serialize(additionalParameters), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// V2 - To send and validate in app purchases you can call this method from the processPurchase method.
/// </summary>
/// <param name="details">The AFSDKPurchaseDetailsIOS instance.</param>
/// <param name="purchaseAdditionalDetails">The additional params, which you want to receive it in the raw reports.</param>
public void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dictionary<string, string> purchaseAdditionalDetails, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
_validateAndSendInAppPurchaseV2(details.productId, details.transactionId, (int)details.purchaseType, AFMiniJSON.Json.Serialize(purchaseAdditionalDetails), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// To record location for geo-fencing. Does the same as code below.
/// </summary>
/// <param name="longitude">The location longitude.</param>
/// <param name="latitude">The location latitude.</param>
public void recordLocation(double longitude, double latitude)
{
#if !UNITY_EDITOR
_recordLocation(longitude, latitude);
#endif
}
/// <summary>
/// Get AppsFlyer's unique device ID, which is created for every new install of an app.
/// </summary>
public string getAppsFlyerId()
{
#if !UNITY_EDITOR
return _getAppsFlyerId();
#else
return "";
#endif
}
/// <summary>
/// Register uninstall - you should register for remote notification and provide AppsFlyer the push device token.
/// </summary>
/// <param name="deviceToken">deviceToken The `deviceToken` from `-application:didRegisterForRemoteNotificationsWithDeviceToken:`.</param>
public void registerUninstall(byte[] deviceToken)
{
#if !UNITY_EDITOR
_registerUninstall(deviceToken);
#endif
}
/// <summary>
/// Enable AppsFlyer to handle a push notification.
/// </summary>
/// <param name="pushPayload">pushPayload The `userInfo` from received remote notification. One of root keys should be @"af"..</param>
public void handlePushNotification(Dictionary<string, string> pushPayload)
{
#if !UNITY_EDITOR
_handlePushNotification(AFMiniJSON.Json.Serialize(pushPayload));
#endif
}
/// <summary>
/// Get SDK version.
/// </summary>
public string getSdkVersion()
{
#if !UNITY_EDITOR
return _getSDKVersion();
#else
return "";
#endif
}
/// <summary>
/// This property accepts a string value representing the host name for all endpoints.
/// Can be used to Zero rate your application’s data usage.Contact your CSM for more information.
/// </summary>
/// <param name="host">Host Name.</param>
/// <param name="host">Host prefix.</param>
public void setHost(string hostPrefix, string host)
{
#if !UNITY_EDITOR
_setHost(host, hostPrefix);
#endif
}
/// <summary>
/// This property is responsible for timeout between sessions in seconds.
/// Default value is 5 seconds.
/// </summary>
/// <param name="minTimeBetweenSessions">minimum time between 2 separate sessions in seconds.</param>
public void setMinTimeBetweenSessions(int minTimeBetweenSessions)
{
#if !UNITY_EDITOR
_setMinTimeBetweenSessions(minTimeBetweenSessions);
#endif
}
/// <summary>
/// Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.
/// In some extreme cases you might want to shut down all SDK activity due to legal and privacy compliance.
/// This can be achieved with the stopSDK API.
/// </summary>
/// <param name="isSDKStopped">boolean isSDKStopped.</param>
public void stopSDK(bool isSDKStopped)
{
#if !UNITY_EDITOR
_stopSDK(isSDKStopped);
#endif
}
// <summary>
/// Was the stopSDK(boolean) API set to true.
/// </summary>
/// <returns>boolean isSDKStopped.</returns>
public bool isSDKStopped()
{
#if !UNITY_EDITOR
return _isSDKStopped();
#else
return false;
#endif
}
/// <summary>
/// In case you want to track deep linking manually call handleOpenUrl.
/// The continueUserActivity and onOpenURL are implemented in the AppsFlyerAppController.mm class, so
/// only use this method if the other methods do not cover your apps deeplinking needs.
/// </summary>
/// <param name="url">The URL to be passed to your AppDelegate.</param>
/// <param name="sourceApplication">The sourceApplication to be passed to your AppDelegate.</param>
/// <param name="annotation">The annotation to be passed to your app delegate.</param>
public void handleOpenUrl(string url, string sourceApplication, string annotation)
{
#if !UNITY_EDITOR
_handleOpenUrl(url, sourceApplication, annotation);
#endif
}
/// <summary>
/// Used by advertisers to exclude all networks/integrated partners from getting data.
/// </summary>
public void setSharingFilterForAllPartners()
{
#if !UNITY_EDITOR
_setSharingFilterForAllPartners();
#endif
}
/// <summary>
/// Used by advertisers to set some (one or more) networks/integrated partners to exclude from getting data.
/// </summary>
/// <param name="partners">partners to exclude from getting data</param>
public void setSharingFilter(params string[] partners)
{
#if !UNITY_EDITOR
_setSharingFilter(partners.Length, partners);
#endif
}
/// <summary>
/// Lets you configure how which partners should the SDK exclude from data-sharing.
/// <param name="partners">partners to exclude from getting data</param>
public static void setSharingFilterForPartners(params string[] partners)
{
#if !UNITY_EDITOR
_setSharingFilterForPartners(partners.Length, partners);
#endif
}
/// <summary>
/// To record an impression use the following API call.
/// Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
/// </summary>
/// <param name="appID">promoted App ID.</param>
/// <param name="campaign">cross promotion campaign.</param>
/// <param name="parameters">parameters Dictionary.</param>
public void recordCrossPromoteImpression(string appID, string campaign, Dictionary<string, string> parameters)
{
#if !UNITY_EDITOR
_recordCrossPromoteImpression(appID, campaign, AFMiniJSON.Json.Serialize(parameters));
#endif
}
/// <summary>
/// Use the following API to attribute the click and launch the app store's app page.
/// </summary>
/// <param name="appID">promoted App ID</param>
/// <param name="campaign">cross promotion campaign</param>
/// <param name="parameters">additional user params</param>
public void attributeAndOpenStore(string appID, string campaign, Dictionary<string, string> parameters, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
_attributeAndOpenStore(appID, campaign, AFMiniJSON.Json.Serialize(parameters), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// The LinkGenerator class builds the invite URL according to various setter methods which allow passing on additional information on the click.
/// See - https://support.appsflyer.com/hc/en-us/articles/115004480866-User-invite-attribution-
/// </summary>
/// <param name="parameters">parameters Dictionary.</param>
public void generateUserInviteLink(Dictionary<string, string> parameters, MonoBehaviour gameObject)
{
#if !UNITY_EDITOR
_generateUserInviteLink(AFMiniJSON.Json.Serialize(parameters), gameObject ? gameObject.name : null);
#endif
}
/// <summary>
/// It is recommended to generate an in-app event after the invite is sent to record the invites from the senders' perspective.
/// This enables you to find the users that tend most to invite friends, and the media sources that get you these users.
/// </summary>
/// <param name="channel">channel string.</param>
/// <param name="parameters">parameters Dictionary..</param>
public void recordInvite(string channel, Dictionary<string, string> parameters)
{
#if !UNITY_EDITOR
_recordInvite(channel, AFMiniJSON.Json.Serialize(parameters));
#endif
}
/// <summary>
/// Waits for request user authorization to access app-related data
/// </summary>
/// <param name="timeoutInterval">time to wait until session starts</param>
public void waitForATTUserAuthorizationWithTimeoutInterval(int timeoutInterval)
{
#if !UNITY_EDITOR
_waitForATTUserAuthorizationWithTimeoutInterval(timeoutInterval);
#endif
}
/// <summary>
/// </summary>
/// <param name="isDisabled">bool should diable</param>
public void disableSKAdNetwork(bool isDisabled)
{
#if !UNITY_EDITOR
_disableSKAdNetwork(isDisabled);
#endif
}
/// <summary>
/// Use this method if you’re integrating your app with push providers
/// that don’t use the default push notification JSON schema the SDK expects.
/// See docs for more info.
/// </summary>
/// <param name="paths">array of nested json path</param>
public void addPushNotificationDeepLinkPath(params string[] paths)
{
#if !UNITY_EDITOR
_addPushNotificationDeepLinkPath(paths.Length, paths);
#endif
}
/// <summary>
/// subscribe to unified deep link callbacks
/// </summary>
public void subscribeForDeepLink(string objectName){
#if !UNITY_EDITOR
_subscribeForDeepLink(objectName);
#endif
}
/// <summary>
/// Set the language of the device.
/// </summary>
public void setCurrentDeviceLanguage(string language){
#if !UNITY_EDITOR
_setCurrentDeviceLanguage(language);
#endif
}
/// <summary>
/// Allows sending custom data for partner integration purposes.
/// </summary>
public void setPartnerData(string partnerId, Dictionary<string, string> partnerInfo){
#if !UNITY_EDITOR
_setPartnerData(partnerId, AFMiniJSON.Json.Serialize(partnerInfo));
#endif
}
/// <summary>
/// Use to disable app vendor identifier (IDFV) collection, 'true' to disable.
/// </summary>
public void disableIDFVCollection(bool isDisabled){
#if !UNITY_EDITOR
_disableIDFVCollection(isDisabled);
#endif
}
delegate void unityCallBack(string message);
[AOT.MonoPInvokeCallback(typeof(unityCallBack))]
public static void getCallback(string gameObjectName, string callbackName, string message)
{
GameObject go = GameObject.Find("AppsFlyerObject");
var afscript = go.GetComponent("AppsFlyerObjectScript") as AppsFlyerObjectScript;
Type type = typeof(AppsFlyerObjectScript);
MethodInfo info = type.GetMethod(callbackName);
info.Invoke(afscript, new[] { message });
}
/*
* AppsFlyer ios method mapping
*/
#if UNITY_IOS
[DllImport("__Internal")]
private static extern void _startSDK(bool shouldCallback, string objectName);
#elif UNITY_STANDALONE_OSX
[DllImport("AppsFlyerBundle")]
private static extern void _startSDK(bool shouldCallbac
gitextract_u2enc1o6/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── config.yml
│ └── workflows/
│ ├── Scripts/
│ │ ├── checkJira.sh
│ │ └── extractPackage.py
│ ├── activation.yml
│ ├── check_packages.yml
│ ├── close_inactive_issues.yml
│ ├── issues_workflow.yml
│ ├── main.yml
│ ├── readme_sync.yml
│ ├── release_QA_workflow.yml
│ ├── release_production_workflow.yml
│ ├── release_to_QA.yml
│ ├── release_to_production.yml
│ ├── responseToSupportIssue.yml
│ ├── responseToSupportIssueOnOpen.yml
│ ├── test-unity-auth.yml
│ └── update_links.yml
├── .gitignore
├── Assets/
│ ├── AppsFlyer/
│ │ ├── AFAdRevenueData.cs
│ │ ├── AFAdRevenueData.cs.meta
│ │ ├── AFInAppEvents.cs
│ │ ├── AFInAppEvents.cs.meta
│ │ ├── AFMiniJSON.cs
│ │ ├── AFMiniJSON.cs.meta
│ │ ├── AFPurchaseDetailsAndroid.cs
│ │ ├── AFPurchaseDetailsAndroid.cs.meta
│ │ ├── AFSDKPurchaseDetailsIOS.cs
│ │ ├── AFSDKPurchaseDetailsIOS.cs.meta
│ │ ├── AFSDKValidateAndLogResult.cs
│ │ ├── AFSDKValidateAndLogResult.cs.meta
│ │ ├── AppsFlyer.asmdef
│ │ ├── AppsFlyer.asmdef.meta
│ │ ├── AppsFlyer.cs
│ │ ├── AppsFlyer.cs.meta
│ │ ├── AppsFlyerAndroid.cs
│ │ ├── AppsFlyerAndroid.cs.meta
│ │ ├── AppsFlyerConsent.cs
│ │ ├── AppsFlyerConsent.cs.meta
│ │ ├── AppsFlyerEventArgs.cs
│ │ ├── AppsFlyerEventArgs.cs.meta
│ │ ├── AppsFlyerObject.prefab
│ │ ├── AppsFlyerObject.prefab.meta
│ │ ├── AppsFlyerObjectScript.cs
│ │ ├── AppsFlyerObjectScript.cs.meta
│ │ ├── AppsFlyerPurchaseConnector.cs
│ │ ├── AppsFlyerPurchaseConnector.cs.meta
│ │ ├── AppsFlyeriOS.cs
│ │ ├── AppsFlyeriOS.cs.meta
│ │ ├── Editor/
│ │ │ ├── AppsFlyer.Editor.asmdef
│ │ │ ├── AppsFlyer.Editor.asmdef.meta
│ │ │ ├── AppsFlyerDependencies.xml
│ │ │ ├── AppsFlyerDependencies.xml.meta
│ │ │ ├── AppsFlyerObjectEditor.cs
│ │ │ ├── AppsFlyerObjectEditor.cs.meta
│ │ │ └── appsflyer_logo.png.meta
│ │ ├── Editor.meta
│ │ ├── IAppsFlyerAndroidBridge.cs
│ │ ├── IAppsFlyerAndroidBridge.cs.meta
│ │ ├── IAppsFlyerConversionData.cs
│ │ ├── IAppsFlyerConversionData.cs.meta
│ │ ├── IAppsFlyerIOSBridge.cs
│ │ ├── IAppsFlyerIOSBridge.cs.meta
│ │ ├── IAppsFlyerNativeBridge.cs
│ │ ├── IAppsFlyerNativeBridge.cs.meta
│ │ ├── IAppsFlyerPurchaseValidation.cs
│ │ ├── IAppsFlyerPurchaseValidation.cs.meta
│ │ ├── IAppsFlyerUserInvite.cs
│ │ ├── IAppsFlyerUserInvite.cs.meta
│ │ ├── IAppsFlyerValidateAndLog.cs
│ │ ├── IAppsFlyerValidateAndLog.cs.meta
│ │ ├── IAppsFlyerValidateReceipt.cs
│ │ ├── IAppsFlyerValidateReceipt.cs.meta
│ │ ├── Mac/
│ │ │ ├── AppsFlyerBundle.bundle/
│ │ │ │ ├── Contents/
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Info.plist.meta
│ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ ├── AppsFlyerBundle
│ │ │ │ │ │ └── AppsFlyerBundle.meta
│ │ │ │ │ ├── MacOS.meta
│ │ │ │ │ ├── _CodeSignature/
│ │ │ │ │ │ ├── CodeResources
│ │ │ │ │ │ └── CodeResources.meta
│ │ │ │ │ └── _CodeSignature.meta
│ │ │ │ └── Contents.meta
│ │ │ └── AppsFlyerBundle.bundle.meta
│ │ ├── Mac.meta
│ │ ├── Plugins/
│ │ │ ├── iOS/
│ │ │ │ ├── AFUnityStoreKit2Bridge.swift
│ │ │ │ ├── AFUnityStoreKit2Bridge.swift.meta
│ │ │ │ ├── AFUnityUtils.h
│ │ │ │ ├── AFUnityUtils.h.meta
│ │ │ │ ├── AFUnityUtils.mm
│ │ │ │ ├── AFUnityUtils.mm.meta
│ │ │ │ ├── AppsFlyer+AppController.m
│ │ │ │ ├── AppsFlyer+AppController.m.meta
│ │ │ │ ├── AppsFlyerAppController.mm
│ │ │ │ ├── AppsFlyerAppController.mm.meta
│ │ │ │ ├── AppsFlyerAttribution.h
│ │ │ │ ├── AppsFlyerAttribution.h.meta
│ │ │ │ ├── AppsFlyerAttribution.m
│ │ │ │ ├── AppsFlyerAttribution.m.meta
│ │ │ │ ├── AppsFlyeriOSWrapper.h
│ │ │ │ ├── AppsFlyeriOSWrapper.h.meta
│ │ │ │ ├── AppsFlyeriOSWrapper.mm
│ │ │ │ └── AppsFlyeriOSWrapper.mm.meta
│ │ │ └── iOS.meta
│ │ ├── Plugins.meta
│ │ ├── ProductPurchase.cs
│ │ ├── ProductPurchase.cs.meta
│ │ ├── Tests/
│ │ │ ├── Castle.Core.dll.meta
│ │ │ ├── NSubstitute.dll.meta
│ │ │ ├── System.Runtime.CompilerServices.Unsafe.dll.meta
│ │ │ ├── System.Threading.Tasks.Extensions.dll.meta
│ │ │ ├── Tests.asmdef
│ │ │ ├── Tests.asmdef.meta
│ │ │ ├── Tests_Suite.cs
│ │ │ └── Tests_Suite.cs.meta
│ │ ├── Tests.meta
│ │ ├── Windows/
│ │ │ ├── AppsFlyerLib.pdb
│ │ │ ├── AppsFlyerLib.pdb.meta
│ │ │ ├── AppsFlyerLib.pri
│ │ │ ├── AppsFlyerLib.pri.meta
│ │ │ ├── AppsFlyerLib.winmd
│ │ │ ├── AppsFlyerLib.winmd.meta
│ │ │ ├── AppsFlyerWindows.cs
│ │ │ └── AppsFlyerWindows.cs.meta
│ │ ├── Windows.meta
│ │ ├── package.json
│ │ └── package.json.meta
│ └── AppsFlyer.meta
├── CHANGELOG.md
├── LICENSE
├── ProjectSettings/
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── MemorySettings.asset
│ ├── MultiplayerManager.asset
│ ├── NavMeshAreas.asset
│ ├── PackageManagerSettings.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ ├── VFXManager.asset
│ ├── VersionControlSettings.asset
│ └── XRSettings.asset
├── README.md
├── UserSettings/
│ ├── EditorUserSettings.asset
│ ├── Layouts/
│ │ ├── default-2021.dwlt
│ │ └── default-6000.dwlt
│ └── Search.settings
├── android-unity-wrapper/
│ ├── .gitignore
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── appsflyer/
│ │ │ └── unity/
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── drawable-v24/
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── values/
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── appsflyer/
│ │ └── unity/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── unitywrapper/
│ ├── .gitignore
│ ├── build.gradle
│ ├── consumer-rules.pro
│ ├── libs/
│ │ └── classes.jar
│ ├── proguard-rules.pro
│ ├── publish.gradle
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── com/
│ └── appsflyer/
│ └── unity/
│ ├── AppsFlyerAndroidWrapper.java
│ └── PurchaseRevenueBridge.java
├── appsflyer-unity-plugin-6.17.90.unitypackage
├── appsflyer-unity-plugin-6.17.91.unitypackage
├── deploy/
│ ├── build_unity_package.sh
│ ├── external-dependency-manager-1.2.183.unitypackage
│ └── strict_mode_build_package.sh
├── docs/
│ ├── API.md
│ ├── BasicIntegration.md
│ ├── DMAConsent.md
│ ├── DeepLinkIntegrate.md
│ ├── InAppEvents.md
│ ├── Installation.md
│ ├── Introduction.md
│ ├── MigrationGuide.md
│ ├── PushNotifications.md
│ ├── Testing.md
│ ├── Troubleshooting.md
│ ├── UnifiedDeepLink.md
│ ├── UninstallMeasurement.md
│ ├── UserInvite.md
│ ├── ad-revenue-unity.md
│ ├── conversion-data-unity.md
│ ├── purchase-connector.md
│ ├── purchase-validation-unity.md
│ └── validate-and-log-unity.md
├── obj/
│ └── Debug/
│ └── .NETFramework,Version=v4.7.1.AssemblyAttributes.cs
└── strict-mode-sdk/
├── appsflyer-unity-plugin-strict-mode-6.17.90.unitypackage
├── appsflyer-unity-plugin-strict-mode-6.17.91.unitypackage
└── strictMode.md
SYMBOL INDEX (640 symbols across 30 files)
FILE: .github/workflows/Scripts/extractPackage.py
class checkPackage (line 8) | class checkPackage:
method __init__ (line 10) | def __init__(self, pathToPackage):
method extractPackage (line 13) | def extractPackage(self, pathToOuptut):
function main (line 17) | def main():
function getHash (line 71) | def getHash(filePath):
function hasCommentedMethods (line 80) | def hasCommentedMethods(file):
function isSrictModeDependency (line 90) | def isSrictModeDependency(file):
FILE: Assets/AppsFlyer/AFAdRevenueData.cs
type MediationNetwork (line 6) | public enum MediationNetwork : ulong
class AdRevenueScheme (line 24) | public static class AdRevenueScheme
class AFAdRevenueData (line 55) | public class AFAdRevenueData
method AFAdRevenueData (line 62) | public AFAdRevenueData(string monetization, MediationNetwork mediation...
FILE: Assets/AppsFlyer/AFInAppEvents.cs
class AFInAppEvents (line 4) | public class AFInAppEvents {
FILE: Assets/AppsFlyer/AFMiniJSON.cs
class Json (line 76) | public static class Json {
method Deserialize (line 82) | public static object Deserialize(string json) {
class Parser (line 91) | sealed class Parser : IDisposable {
method IsWordBreak (line 94) | public static bool IsWordBreak(char c) {
type TOKEN (line 98) | enum TOKEN {
method Parser (line 115) | Parser(string jsonString) {
method Parse (line 119) | public static object Parse(string jsonString) {
method Dispose (line 125) | public void Dispose() {
method ParseObject (line 130) | Dictionary<string, object> ParseObject() {
method ParseArray (line 166) | List<object> ParseArray() {
method ParseValue (line 196) | object ParseValue() {
method ParseByToken (line 201) | object ParseByToken(TOKEN token) {
method ParseString (line 222) | string ParseString() {
method ParseNumber (line 290) | object ParseNumber() {
method EatWhitespace (line 304) | void EatWhitespace() {
method Serialize (line 401) | public static string Serialize(object obj) {
class Serializer (line 405) | sealed class Serializer {
method Serializer (line 408) | Serializer() {
method Serialize (line 412) | public static string Serialize(object obj) {
method SerializeValue (line 420) | void SerializeValue(object value) {
method SerializeObject (line 442) | void SerializeObject(IDictionary obj) {
method SerializeArray (line 463) | void SerializeArray(IList anArray) {
method SerializeString (line 481) | void SerializeString(string str) {
method SerializeOther (line 523) | void SerializeOther(object value) {
FILE: Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs
type AFPurchaseType (line 6) | public enum AFPurchaseType
class AFPurchaseDetailsAndroid (line 15) | public class AFPurchaseDetailsAndroid
method AFPurchaseDetailsAndroid (line 21) | public AFPurchaseDetailsAndroid(AFPurchaseType type, String purchaseTo...
FILE: Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs
type AFSDKPurchaseType (line 9) | public enum AFSDKPurchaseType
class AFSDKPurchaseDetailsIOS (line 18) | public class AFSDKPurchaseDetailsIOS
method AFSDKPurchaseDetailsIOS (line 24) | private AFSDKPurchaseDetailsIOS(string productId, string transactionId...
method Init (line 31) | public static AFSDKPurchaseDetailsIOS Init(string productId, string tr...
FILE: Assets/AppsFlyer/AFSDKValidateAndLogResult.cs
type AFSDKValidateAndLogStatus (line 6) | public enum AFSDKValidateAndLogStatus
class AFSDKValidateAndLogResult (line 17) | public class AFSDKValidateAndLogResult
method AFSDKValidateAndLogResult (line 24) | private AFSDKValidateAndLogResult(AFSDKValidateAndLogStatus status, Di...
method Init (line 32) | public static AFSDKValidateAndLogResult Init(AFSDKValidateAndLogStatus...
FILE: Assets/AppsFlyer/AppsFlyer.cs
class AppsFlyer (line 7) | public class AppsFlyer : MonoBehaviour
method initSDK (line 30) | public static void initSDK(string devKey, string appID)
method initSDK (line 48) | public static void initSDK(string devKey, string appID, MonoBehaviour ...
method startSDK (line 91) | public static void startSDK()
method sendEvent (line 115) | public static void sendEvent(string eventName, Dictionary<string, stri...
method stopSDK (line 132) | public static void stopSDK(bool isSDKStopped)
method isSDKStopped (line 144) | public static bool isSDKStopped()
method getSdkVersion (line 158) | public static string getSdkVersion()
method setIsDebug (line 174) | public static void setIsDebug(bool shouldEnable)
method setCustomerUserId (line 198) | public static void setCustomerUserId(string id)
method setAppInviteOneLinkID (line 215) | public static void setAppInviteOneLinkID(string oneLinkId)
method setDeepLinkTimeout (line 230) | public static void setDeepLinkTimeout(long deepLinkTimeout)
method setAdditionalData (line 245) | public static void setAdditionalData(Dictionary<string, string> custom...
method setResolveDeepLinkURLs (line 261) | public static void setResolveDeepLinkURLs(params string[] urls)
method setOneLinkCustomDomain (line 277) | public static void setOneLinkCustomDomain(params string[] domains)
method setCurrencyCode (line 305) | public static void setCurrencyCode(string currencyCode)
method setConsentData (line 327) | public static void setConsentData(AppsFlyerConsent appsFlyerConsent)
method logAdRevenue (line 340) | public static void logAdRevenue(AFAdRevenueData adRevenueData, Diction...
method recordLocation (line 353) | public static void recordLocation(double latitude, double longitude)
method anonymizeUser (line 370) | public static void anonymizeUser(bool shouldAnonymizeUser)
method enableTCFDataCollection (line 386) | public static void enableTCFDataCollection(bool shouldCollectTcfData)
method getAppsFlyerId (line 398) | public static string getAppsFlyerId()
method setMinTimeBetweenSessions (line 417) | public static void setMinTimeBetweenSessions(int seconds)
method setHost (line 433) | public static void setHost(string hostPrefixName, string hostName)
method setUserEmails (line 461) | public static void setUserEmails(EmailCryptType cryptType, params stri...
method updateServerUninstallToken (line 471) | public static void updateServerUninstallToken(string token)
method setPhoneNumber (line 484) | public static void setPhoneNumber(string phoneNumber)
method setImeiData (line 494) | public static void setImeiData(string aImei)
method setSharingFilterForAllPartners (line 506) | [Obsolete("Please use setSharingFilterForPartners api")]
method setAndroidIdData (line 518) | public static void setAndroidIdData(string aAndroidId)
method waitForCustomerUserId (line 527) | public static void waitForCustomerUserId(bool wait)
method setSharingFilter (line 540) | [Obsolete("Please use setSharingFilterForPartners api")]
method setCustomerIdAndStartSDK (line 552) | public static void setCustomerIdAndStartSDK(string id)
method setSharingFilterForPartners (line 565) | public static void setSharingFilterForPartners(params string[] partners)
method getOutOfStore (line 576) | public static string getOutOfStore()
method setOutOfStore (line 586) | public static void setOutOfStore(string sourceName)
method getConversionData (line 606) | public static void getConversionData(string objectName)
method setCollectAndroidID (line 619) | public static void setCollectAndroidID(bool isCollect)
method setIsUpdate (line 628) | public static void setIsUpdate(bool isUpdate)
method setCollectIMEI (line 637) | public static void setCollectIMEI(bool isCollect)
method setDisableCollectAppleAdSupport (line 646) | public static void setDisableCollectAppleAdSupport(bool disable)
method setShouldCollectDeviceName (line 655) | public static void setShouldCollectDeviceName(bool shouldCollectDevice...
method attributeAndOpenStore (line 679) | public static void attributeAndOpenStore(string appID, string campaign...
method setPreinstallAttribution (line 689) | public static void setPreinstallAttribution(string mediaSource, string...
method setDisableCollectIAd (line 698) | public static void setDisableCollectIAd(bool disableCollectIAd)
method isPreInstalledApp (line 707) | public static bool isPreInstalledApp()
method setUseReceiptValidationSandbox (line 717) | public static void setUseReceiptValidationSandbox(bool useReceiptValid...
method recordCrossPromoteImpression (line 733) | public static void recordCrossPromoteImpression(string appID, string c...
method setUseUninstallSandbox (line 743) | public static void setUseUninstallSandbox(bool useUninstallSandbox)
method getAttributionId (line 752) | public static string getAttributionId()
method handlePushNotifications (line 762) | public static void handlePushNotifications()
method validateAndSendInAppPurchase (line 775) | [System.Obsolete("This method is deprecated. Use validateAndSendInAppP...
method validateAndSendInAppPurchase (line 788) | public static void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIO...
method validateAndSendInAppPurchase (line 801) | [System.Obsolete("This method is deprecated. Use validateAndSendInAppP...
method validateAndSendInAppPurchase (line 814) | public static void validateAndSendInAppPurchase(AFPurchaseDetailsAndro...
method handleOpenUrl (line 823) | public static void handleOpenUrl(string url, string sourceApplication,...
method registerUninstall (line 832) | public static void registerUninstall(byte[] deviceToken)
method waitForATTUserAuthorizationWithTimeoutInterval (line 841) | public static void waitForATTUserAuthorizationWithTimeoutInterval(int ...
method setCurrentDeviceLanguage (line 850) | public static void setCurrentDeviceLanguage(string language)
method generateUserInviteLink (line 864) | public static void generateUserInviteLink(Dictionary<string, string> p...
method disableSKAdNetwork (line 874) | public static void disableSKAdNetwork(bool isDisabled)
method setCollectOaid (line 890) | public static void setCollectOaid(bool isCollect)
method addPushNotificationDeepLinkPath (line 906) | public static void addPushNotificationDeepLinkPath(params string[] paths)
method setDisableAdvertisingIdentifiers (line 916) | public static void setDisableAdvertisingIdentifiers(bool disable)
method subscribeForDeepLink (line 930) | public static void subscribeForDeepLink()
method setPartnerData (line 945) | public static void setPartnerData(string partnerId, Dictionary<string,...
method setDisableNetworkData (line 957) | public static void setDisableNetworkData(bool disable) {
method disableIDFVCollection (line 968) | public static void disableIDFVCollection(bool isDisabled)
method inAppResponseReceived (line 1031) | public void inAppResponseReceived(string response)
method requestResponseReceived (line 1042) | public void requestResponseReceived(string response)
method onDeepLinking (line 1053) | public void onDeepLinking(string response)
method parseRequestCallback (line 1064) | private static AppsFlyerRequestEventArgs parseRequestCallback(string r...
method CallbackStringToDictionary (line 1089) | public static Dictionary<string, object> CallbackStringToDictionary(st...
method AFLog (line 1099) | public static void AFLog(string methodName, string str)
type EmailCryptType (line 1105) | public enum EmailCryptType
FILE: Assets/AppsFlyer/AppsFlyerAndroid.cs
class AppsFlyerAndroid (line 9) | public class AppsFlyerAndroid : IAppsFlyerAndroidBridge
method AppsFlyerAndroid (line 15) | public AppsFlyerAndroid() { }
method initSDK (line 23) | public void initSDK(string devkey, MonoBehaviour gameObject)
method startSDK (line 35) | public void startSDK(bool onRequestResponse, string CallBackObjectName)
method stopSDK (line 48) | public void stopSDK(bool isSDKStopped)
method getSdkVersion (line 59) | public string getSdkVersion()
method updateServerUninstallToken (line 72) | public void updateServerUninstallToken(string token)
method setIsDebug (line 84) | public void setIsDebug(bool shouldEnable)
method setImeiData (line 97) | public void setImeiData(string aImei)
method setAndroidIdData (line 110) | public void setAndroidIdData(string aAndroidId)
method setCustomerUserId (line 122) | public void setCustomerUserId(string id)
method waitForCustomerUserId (line 135) | public void waitForCustomerUserId(bool wait)
method setCustomerIdAndStartSDK (line 146) | public void setCustomerIdAndStartSDK(string id)
method getOutOfStore (line 157) | public string getOutOfStore()
method setOutOfStore (line 170) | public void setOutOfStore(string sourceName)
method setAppInviteOneLinkID (line 182) | public void setAppInviteOneLinkID(string oneLinkId)
method setAdditionalData (line 193) | public void setAdditionalData(Dictionary<string, string> customData)
method setDeepLinkTimeout (line 204) | public void setDeepLinkTimeout(long deepLinkTimeout)
method setUserEmails (line 215) | public void setUserEmails(params string[] userEmails)
method setPhoneNumber (line 227) | public void setPhoneNumber(string phoneNumber){
method setUserEmails (line 243) | public void setUserEmails(EmailCryptType cryptMethod, params string[] ...
method setCollectAndroidID (line 256) | public void setCollectAndroidID(bool isCollect)
method setCollectIMEI (line 269) | public void setCollectIMEI(bool isCollect)
method setResolveDeepLinkURLs (line 281) | public void setResolveDeepLinkURLs(params string[] urls)
method setOneLinkCustomDomain (line 293) | public void setOneLinkCustomDomain(params string[] domains)
method setIsUpdate (line 304) | public void setIsUpdate(bool isUpdate)
method setCurrencyCode (line 317) | public void setCurrencyCode(string currencyCode)
method recordLocation (line 329) | public void recordLocation(double latitude, double longitude)
method sendEvent (line 342) | public void sendEvent(string eventName, Dictionary<string, string> eve...
method sendEvent (line 347) | public void sendEvent(string eventName, Dictionary<string, string> eve...
method anonymizeUser (line 360) | public void anonymizeUser(bool isDisabled)
method enableTCFDataCollection (line 372) | public void enableTCFDataCollection(bool shouldCollectTcfData)
method enableFacebookDeferredApplinks (line 385) | public void enableFacebookDeferredApplinks(bool isEnabled)
method setConsentData (line 398) | public void setConsentData(AppsFlyerConsent appsFlyerConsent)
method logAdRevenue (line 414) | public void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<str...
method setConsumeAFDeepLinks (line 427) | public void setConsumeAFDeepLinks(bool doConsume)
method setPreinstallAttribution (line 440) | public void setPreinstallAttribution(string mediaSource, string campai...
method isPreInstalledApp (line 451) | public bool isPreInstalledApp()
method getAttributionId (line 464) | public string getAttributionId()
method getAppsFlyerId (line 477) | public string getAppsFlyerId()
method validateAndSendInAppPurchase (line 496) | [System.Obsolete("This method is deprecated. Use validateAndSendInAppP...
method validateAndSendInAppPurchase (line 510) | public void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid deta...
method isSDKStopped (line 521) | public bool isSDKStopped()
method setMinTimeBetweenSessions (line 535) | public void setMinTimeBetweenSessions(int seconds)
method setHost (line 547) | public void setHost(string hostPrefixName, string hostName)
method getHostName (line 559) | public string getHostName()
method getHostPrefix (line 572) | public string getHostPrefix()
method setSharingFilterForAllPartners (line 584) | public void setSharingFilterForAllPartners()
method setSharingFilter (line 595) | public void setSharingFilter(params string[] partners)
method setSharingFilterForPartners (line 606) | public static void setSharingFilterForPartners(params string[] partners)
method getConversionData (line 619) | public void getConversionData(string objectName)
method initInAppPurchaseValidatorListener (line 629) | public void initInAppPurchaseValidatorListener(MonoBehaviour gameObject)
method setCollectOaid (line 641) | public void setCollectOaid(bool isCollect)
method attributeAndOpenStore (line 654) | public void attributeAndOpenStore(string promoted_app_id, string campa...
method recordCrossPromoteImpression (line 668) | public void recordCrossPromoteImpression(string appID, string campaign...
method generateUserInviteLink (line 680) | public void generateUserInviteLink(Dictionary<string, string> paramete...
method handlePushNotifications (line 690) | public void handlePushNotifications(){
method addPushNotificationDeepLinkPath (line 702) | public void addPushNotificationDeepLinkPath(params string[] paths)
method subscribeForDeepLink (line 712) | public void subscribeForDeepLink(string objectName){
method setDisableAdvertisingIdentifiers (line 722) | public void setDisableAdvertisingIdentifiers(bool disable)
method setPartnerData (line 732) | public void setPartnerData(string partnerId, Dictionary<string, string...
method setDisableNetworkData (line 742) | public void setDisableNetworkData(bool disable) {
method getEmailType (line 751) | private static AndroidJavaObject getEmailType(EmailCryptType cryptType)
method getMediationNetwork (line 772) | private static AndroidJavaObject getMediationNetwork(MediationNetwork ...
method convertDictionaryToJavaMap (line 831) | private static AndroidJavaObject convertDictionaryToJavaMap(Dictionary...
FILE: Assets/AppsFlyer/AppsFlyerConsent.cs
class AppsFlyerConsent (line 36) | public class AppsFlyerConsent
method AppsFlyerConsent (line 43) | public AppsFlyerConsent( bool? isUserSubjectToGDPR = null, bool? hasCo...
method AppsFlyerConsent (line 51) | [Obsolete("Use the new constructor with optional booleans instead.")]
method ForGDPRUser (line 59) | [Obsolete("Use new AppsFlyerConsent(...) instead.")]
method ForNonGDPRUser (line 65) | [Obsolete("Use new AppsFlyerConsent(...) instead.")]
FILE: Assets/AppsFlyer/AppsFlyerEventArgs.cs
class AppsFlyerRequestEventArgs (line 24) | public class AppsFlyerRequestEventArgs : EventArgs
method AppsFlyerRequestEventArgs (line 26) | public AppsFlyerRequestEventArgs(int code, string description)
class DeepLinkEventsArgs (line 40) | public class DeepLinkEventsArgs : EventArgs
method getMatchType (line 58) | public string getMatchType()
method getDeepLinkValue (line 63) | public string getDeepLinkValue()
method getClickHttpReferrer (line 68) | public string getClickHttpReferrer()
method getMediaSource (line 73) | public string getMediaSource()
method getCampaign (line 78) | public string getCampaign()
method getCampaignId (line 83) | public string getCampaignId()
method getAfSub1 (line 88) | public string getAfSub1()
method getAfSub2 (line 93) | public string getAfSub2()
method getAfSub3 (line 98) | public string getAfSub3()
method getAfSub4 (line 103) | public string getAfSub4()
method getAfSub5 (line 108) | public string getAfSub5()
method isDeferred (line 113) | public bool isDeferred()
method getDeepLinkDictionary (line 129) | public Dictionary<string, object> getDeepLinkDictionary()
method DeepLinkEventsArgs (line 134) | public DeepLinkEventsArgs(string str)
method getDeepLinkParameter (line 199) | private string getDeepLinkParameter(string name)
type DeepLinkStatus (line 211) | public enum DeepLinkStatus {
type DeepLinkError (line 215) | public enum DeepLinkError {
FILE: Assets/AppsFlyer/AppsFlyerObjectScript.cs
class AppsFlyerObjectScript (line 8) | public class AppsFlyerObjectScript : MonoBehaviour , IAppsFlyerConversio...
method Start (line 22) | void Start()
method Update (line 40) | void Update()
method onConversionDataSuccess (line 46) | public void onConversionDataSuccess(string conversionData)
method onConversionDataFail (line 53) | public void onConversionDataFail(string error)
method onAppOpenAttribution (line 58) | public void onAppOpenAttribution(string attributionData)
method onAppOpenAttributionFailure (line 65) | public void onAppOpenAttributionFailure(string error)
FILE: Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs
type IAppsFlyerPurchaseRevenueDataSource (line 9) | public interface IAppsFlyerPurchaseRevenueDataSource
method PurchaseRevenueAdditionalParametersForProducts (line 11) | Dictionary<string, object> PurchaseRevenueAdditionalParametersForProdu...
type IAppsFlyerPurchaseRevenueDataSourceStoreKit2 (line 14) | public interface IAppsFlyerPurchaseRevenueDataSourceStoreKit2
method PurchaseRevenueAdditionalParametersStoreKit2ForProducts (line 16) | Dictionary<string, object> PurchaseRevenueAdditionalParametersStoreKit...
class AppsFlyerPurchaseRevenueBridge (line 19) | public class AppsFlyerPurchaseRevenueBridge : MonoBehaviour
method RegisterUnityPurchaseRevenueParamsCallback (line 22) | [DllImport("__Internal")]
method RegisterUnityPurchaseRevenueParamsCallbackSK2 (line 25) | [DllImport("__Internal")]
method RegisterDataSource (line 32) | public static void RegisterDataSource(IAppsFlyerPurchaseRevenueDataSou...
method RegisterDataSourceStoreKit2 (line 45) | public static void RegisterDataSourceStoreKit2(IAppsFlyerPurchaseReven...
method GetAdditionalParametersForAndroid (line 53) | public static Dictionary<string, object> GetAdditionalParametersForAnd...
method GetAdditionalParameters (line 60) | [AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
method GetAdditionalParametersSK2 (line 94) | [AOT.MonoPInvokeCallback(typeof(Func<string, string, string>))]
class UnityPurchaseRevenueBridgeProxy (line 128) | public class UnityPurchaseRevenueBridgeProxy : AndroidJavaProxy
method UnityPurchaseRevenueBridgeProxy (line 130) | public UnityPurchaseRevenueBridgeProxy() : base("com.appsflyer.unity.P...
method getAdditionalParameters (line 132) | public string getAdditionalParameters(string productsJson, string tran...
class AppsFlyerPurchaseConnector (line 211) | public class AppsFlyerPurchaseConnector : MonoBehaviour {
method Awake (line 231) | private void Awake()
method init (line 248) | public static void init(MonoBehaviour unityObject, Store s) {
method build (line 257) | public static void build() {
method startObservingTransactions (line 267) | public static void startObservingTransactions() {
method stopObservingTransactions (line 276) | public static void stopObservingTransactions() {
method setIsSandbox (line 285) | public static void setIsSandbox(bool isSandbox) {
method setPurchaseRevenueValidationListeners (line 294) | public static void setPurchaseRevenueValidationListeners(bool enableCa...
method setAutoLogPurchaseRevenue (line 303) | public static void setAutoLogPurchaseRevenue(params AppsFlyerAutoLogPu...
method setPurchaseRevenueDataSource (line 332) | public static void setPurchaseRevenueDataSource(IAppsFlyerPurchaseReve...
method setPurchaseRevenueDataSourceStoreKit2 (line 350) | public static void setPurchaseRevenueDataSourceStoreKit2(IAppsFlyerPur...
method mapStoreToInt (line 362) | private static int mapStoreToInt(Store s) {
method setStoreKitVersion (line 371) | public static void setStoreKitVersion(StoreKitVersion storeKitVersion) {
method logConsumableTransaction (line 380) | public static void logConsumableTransaction(string transactionJson) {
method _startObservingTransactions (line 391) | [DllImport("__Internal")]
method _stopObservingTransactions (line 393) | [DllImport("__Internal")]
method _setIsSandbox (line 395) | [DllImport("__Internal")]
method _setPurchaseRevenueDelegate (line 397) | [DllImport("__Internal")]
method _setPurchaseRevenueDataSource (line 399) | [DllImport("__Internal")]
method _setAutoLogPurchaseRevenue (line 401) | [DllImport("__Internal")]
method _initPurchaseConnector (line 403) | [DllImport("__Internal")]
method _setStoreKitVersion (line 405) | [DllImport("__Internal")]
method _logConsumableTransaction (line 407) | [DllImport("__Internal")]
type Store (line 412) | public enum Store {
type AppsFlyerAutoLogPurchaseRevenueOptions (line 415) | public enum AppsFlyerAutoLogPurchaseRevenueOptions
type StoreKitVersion (line 422) | public enum StoreKitVersion {
FILE: Assets/AppsFlyer/AppsFlyeriOS.cs
class AppsFlyeriOS (line 14) | public class AppsFlyeriOS: IAppsFlyerIOSBridge
method AppsFlyeriOS (line 18) | public AppsFlyeriOS() { }
method AppsFlyeriOS (line 20) | public AppsFlyeriOS(string devKey, string appID, MonoBehaviour gameObj...
method startSDK (line 40) | public void startSDK(bool shouldCallback, string CallBackObjectName)
method sendEvent (line 55) | public void sendEvent(string eventName, Dictionary<string, string> ev...
method sendEvent (line 60) | public void sendEvent(string eventName, Dictionary<string, string> eve...
method getConversionData (line 73) | public void getConversionData(string objectName)
method setCustomerUserId (line 85) | public void setCustomerUserId(string customerUserID)
method setAdditionalData (line 97) | public void setAdditionalData(Dictionary<string, string> customData)
method setAppsFlyerDevKey (line 108) | public void setAppsFlyerDevKey(string appsFlyerDevKey)
method setAppleAppID (line 119) | public void setAppleAppID(string appleAppID)
method setCurrencyCode (line 132) | public void setCurrencyCode(string currencyCode)
method setDisableCollectAppleAdSupport (line 144) | public void setDisableCollectAppleAdSupport(bool disableCollectAppleAd...
method setIsDebug (line 157) | public void setIsDebug(bool isDebug)
method setShouldCollectDeviceName (line 168) | [System.Obsolete("This is deprecated")]
method setAppInviteOneLinkID (line 181) | public void setAppInviteOneLinkID(string appInviteOneLinkID)
method setDeepLinkTimeout (line 192) | public void setDeepLinkTimeout(long deepLinkTimeout)
method enableTCFDataCollection (line 204) | public void enableTCFDataCollection(bool shouldCollectTcfData)
method setConsentData (line 215) | public void setConsentData(AppsFlyerConsent appsFlyerConsent)
method logAdRevenue (line 232) | public void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<str...
method anonymizeUser (line 245) | public void anonymizeUser(bool shouldAnonymizeUser)
method setDisableCollectIAd (line 256) | public void setDisableCollectIAd(bool disableCollectIAd)
method setUseReceiptValidationSandbox (line 267) | public void setUseReceiptValidationSandbox(bool useReceiptValidationSa...
method setUseUninstallSandbox (line 278) | public void setUseUninstallSandbox(bool useUninstallSandbox)
method setResolveDeepLinkURLs (line 290) | public void setResolveDeepLinkURLs(params string[] resolveDeepLinkURLs)
method setOneLinkCustomDomain (line 301) | public void setOneLinkCustomDomain(params string[] oneLinkCustomDomains)
method setUserEmails (line 320) | public void setUserEmails(EmailCryptType cryptType, params string[] us...
method setPhoneNumber (line 331) | public void setPhoneNumber(string phoneNumber){
method validateAndSendInAppPurchase (line 345) | [System.Obsolete("This method is deprecated. Use validateAndSendInAppP...
method validateAndSendInAppPurchase (line 358) | public void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS detai...
method recordLocation (line 370) | public void recordLocation(double longitude, double latitude)
method getAppsFlyerId (line 380) | public string getAppsFlyerId()
method registerUninstall (line 393) | public void registerUninstall(byte[] deviceToken)
method handlePushNotification (line 404) | public void handlePushNotification(Dictionary<string, string> pushPayl...
method getSdkVersion (line 414) | public string getSdkVersion()
method setHost (line 429) | public void setHost(string hostPrefix, string host)
method setMinTimeBetweenSessions (line 441) | public void setMinTimeBetweenSessions(int minTimeBetweenSessions)
method stopSDK (line 454) | public void stopSDK(bool isSDKStopped)
method isSDKStopped (line 465) | public bool isSDKStopped()
method handleOpenUrl (line 482) | public void handleOpenUrl(string url, string sourceApplication, string...
method setSharingFilterForAllPartners (line 492) | public void setSharingFilterForAllPartners()
method setSharingFilter (line 503) | public void setSharingFilter(params string[] partners)
method setSharingFilterForPartners (line 514) | public static void setSharingFilterForPartners(params string[] partners)
method recordCrossPromoteImpression (line 528) | public void recordCrossPromoteImpression(string appID, string campaign...
method attributeAndOpenStore (line 541) | public void attributeAndOpenStore(string appID, string campaign, Dicti...
method generateUserInviteLink (line 553) | public void generateUserInviteLink(Dictionary<string, string> paramete...
method recordInvite (line 566) | public void recordInvite(string channel, Dictionary<string, string> pa...
method waitForATTUserAuthorizationWithTimeoutInterval (line 577) | public void waitForATTUserAuthorizationWithTimeoutInterval(int timeout...
method disableSKAdNetwork (line 587) | public void disableSKAdNetwork(bool isDisabled)
method addPushNotificationDeepLinkPath (line 600) | public void addPushNotificationDeepLinkPath(params string[] paths)
method subscribeForDeepLink (line 610) | public void subscribeForDeepLink(string objectName){
method setCurrentDeviceLanguage (line 619) | public void setCurrentDeviceLanguage(string language){
method setPartnerData (line 628) | public void setPartnerData(string partnerId, Dictionary<string, string...
method disableIDFVCollection (line 637) | public void disableIDFVCollection(bool isDisabled){
method getCallback (line 645) | [AOT.MonoPInvokeCallback(typeof(unityCallBack))]
method _startSDK (line 663) | [DllImport("__Internal")]
method _startSDK (line 666) | [DllImport("AppsFlyerBundle")]
method _getConversionData (line 671) | #if UNITY_IOS
method _setCustomerUserID (line 679) | #if UNITY_IOS
method _setAdditionalData (line 686) | #if UNITY_IOS
method _setAppsFlyerDevKey (line 693) | #if UNITY_IOS
method _setAppleAppID (line 700) | #if UNITY_IOS
method _setCurrencyCode (line 707) | #if UNITY_IOS
method _setDisableCollectAppleAdSupport (line 714) | #if UNITY_IOS
method _setIsDebug (line 721) | #if UNITY_IOS
method _setShouldCollectDeviceName (line 728) | #if UNITY_IOS
method _setAppInviteOneLinkID (line 735) | #if UNITY_IOS
method _setDeepLinkTimeout (line 742) | #if UNITY_IOS
method _anonymizeUser (line 749) | #if UNITY_IOS
method _enableTCFDataCollection (line 756) | #if UNITY_IOS
method _setConsentData (line 763) | #if UNITY_IOS
method _logAdRevenue (line 770) | #if UNITY_IOS
method _setDisableCollectIAd (line 777) | #if UNITY_IOS
method _setUseReceiptValidationSandbox (line 784) | #if UNITY_IOS
method _setUseUninstallSandbox (line 791) | #if UNITY_IOS
method _setResolveDeepLinkURLs (line 798) | #if UNITY_IOS
method _setOneLinkCustomDomains (line 805) | #if UNITY_IOS
method _setUserEmails (line 812) | #if UNITY_IOS
method _setPhoneNumber (line 819) | #if UNITY_IOS
method _afSendEvent (line 826) | #if UNITY_IOS
method _validateAndSendInAppPurchase (line 833) | #if UNITY_IOS
method _validateAndSendInAppPurchaseV2 (line 841) | #if UNITY_IOS
method _recordLocation (line 848) | #if UNITY_IOS
method _getAppsFlyerId (line 855) | #if UNITY_IOS
method _registerUninstall (line 862) | #if UNITY_IOS
method _handlePushNotification (line 869) | #if UNITY_IOS
method _getSDKVersion (line 876) | #if UNITY_IOS
method _setHost (line 883) | #if UNITY_IOS
method _setMinTimeBetweenSessions (line 890) | #if UNITY_IOS
method _stopSDK (line 897) | #if UNITY_IOS
method _isSDKStopped (line 904) | #if UNITY_IOS
method _handleOpenUrl (line 911) | #if UNITY_IOS
method _setSharingFilterForAllPartners (line 918) | #if UNITY_IOS
method _setSharingFilter (line 925) | #if UNITY_IOS
method _setSharingFilterForPartners (line 932) | #if UNITY_IOS
method _recordCrossPromoteImpression (line 939) | #if UNITY_IOS
method _attributeAndOpenStore (line 946) | #if UNITY_IOS
method _generateUserInviteLink (line 953) | #if UNITY_IOS
method _recordInvite (line 960) | #if UNITY_IOS
method _waitForATTUserAuthorizationWithTimeoutInterval (line 967) | #if UNITY_IOS
method _disableSKAdNetwork (line 974) | #if UNITY_IOS
method _addPushNotificationDeepLinkPath (line 981) | #if UNITY_IOS
method _subscribeForDeepLink (line 988) | #if UNITY_IOS
method _setCurrentDeviceLanguage (line 995) | #if UNITY_IOS
method _setPartnerData (line 1002) | #if UNITY_IOS
method _disableIDFVCollection (line 1009) | #if UNITY_IOS
FILE: Assets/AppsFlyer/Editor/AppsFlyerObjectEditor.cs
class AppsFlyerObjectEditor (line 5) | [CustomEditor(typeof(AppsFlyerObjectScript))]
method OnEnable (line 18) | void OnEnable()
method OnInspectorGUI (line 30) | public override void OnInspectorGUI()
method DrawLogo (line 83) | private void DrawLogo()
FILE: Assets/AppsFlyer/IAppsFlyerAndroidBridge.cs
type IAppsFlyerAndroidBridge (line 8) | public interface IAppsFlyerAndroidBridge : IAppsFlyerNativeBridge
method updateServerUninstallToken (line 10) | void updateServerUninstallToken(string token);
method setImeiData (line 11) | void setImeiData(string imei);
method setAndroidIdData (line 12) | void setAndroidIdData(string androidId);
method waitForCustomerUserId (line 13) | void waitForCustomerUserId(bool wait);
method setCustomerIdAndStartSDK (line 14) | void setCustomerIdAndStartSDK(string id);
method getOutOfStore (line 15) | string getOutOfStore();
method setOutOfStore (line 16) | void setOutOfStore(string sourceName);
method setCollectAndroidID (line 17) | void setCollectAndroidID(bool isCollect);
method setCollectIMEI (line 18) | void setCollectIMEI(bool isCollect);
method setIsUpdate (line 19) | void setIsUpdate(bool isUpdate);
method setPreinstallAttribution (line 20) | void setPreinstallAttribution(string mediaSource, string campaign, str...
method isPreInstalledApp (line 21) | bool isPreInstalledApp();
method getAttributionId (line 22) | string getAttributionId();
method handlePushNotifications (line 23) | void handlePushNotifications();
method validateAndSendInAppPurchase (line 24) | void validateAndSendInAppPurchase(string publicKey, string signature, ...
method validateAndSendInAppPurchase (line 25) | void validateAndSendInAppPurchase(AFPurchaseDetailsAndroid details, Di...
method setCollectOaid (line 26) | void setCollectOaid(bool isCollect);
method setDisableAdvertisingIdentifiers (line 27) | void setDisableAdvertisingIdentifiers(bool disable);
method setDisableNetworkData (line 28) | void setDisableNetworkData(bool disable);
FILE: Assets/AppsFlyer/IAppsFlyerConversionData.cs
type IAppsFlyerConversionData (line 3) | public interface IAppsFlyerConversionData
method onConversionDataSuccess (line 10) | void onConversionDataSuccess(string conversionData);
method onConversionDataFail (line 16) | void onConversionDataFail(string error);
method onAppOpenAttribution (line 23) | void onAppOpenAttribution(string attributionData);
method onAppOpenAttributionFailure (line 29) | void onAppOpenAttributionFailure(string error);
FILE: Assets/AppsFlyer/IAppsFlyerIOSBridge.cs
type IAppsFlyerIOSBridge (line 9) | public interface IAppsFlyerIOSBridge : IAppsFlyerNativeBridge
method setDisableCollectAppleAdSupport (line 11) | void setDisableCollectAppleAdSupport(bool disable);
method setShouldCollectDeviceName (line 12) | void setShouldCollectDeviceName(bool shouldCollectDeviceName);
method setDisableCollectIAd (line 13) | void setDisableCollectIAd(bool disableCollectIAd);
method setUseReceiptValidationSandbox (line 14) | void setUseReceiptValidationSandbox(bool useReceiptValidationSandbox);
method setUseUninstallSandbox (line 15) | void setUseUninstallSandbox(bool useUninstallSandbox);
method validateAndSendInAppPurchase (line 16) | void validateAndSendInAppPurchase(string productIdentifier, string pri...
method validateAndSendInAppPurchase (line 17) | void validateAndSendInAppPurchase(AFSDKPurchaseDetailsIOS details, Dic...
method registerUninstall (line 18) | void registerUninstall(byte[] deviceToken);
method handleOpenUrl (line 19) | void handleOpenUrl(string url, string sourceApplication, string annota...
method waitForATTUserAuthorizationWithTimeoutInterval (line 20) | void waitForATTUserAuthorizationWithTimeoutInterval(int timeoutInterval);
method setCurrentDeviceLanguage (line 21) | void setCurrentDeviceLanguage(string language);
method disableSKAdNetwork (line 22) | void disableSKAdNetwork(bool isDisabled);
method disableIDFVCollection (line 23) | void disableIDFVCollection(bool isDisabled);
FILE: Assets/AppsFlyer/IAppsFlyerNativeBridge.cs
type IAppsFlyerNativeBridge (line 8) | public interface IAppsFlyerNativeBridge
method startSDK (line 12) | void startSDK(bool onRequestResponse, string CallBackObjectName);
method sendEvent (line 14) | void sendEvent(string eventName, Dictionary<string, string> eventValue...
method stopSDK (line 16) | void stopSDK(bool isSDKStopped);
method isSDKStopped (line 18) | bool isSDKStopped();
method getSdkVersion (line 20) | string getSdkVersion();
method setCustomerUserId (line 22) | void setCustomerUserId(string id);
method setAppInviteOneLinkID (line 24) | void setAppInviteOneLinkID(string oneLinkId);
method setAdditionalData (line 26) | void setAdditionalData(Dictionary<string, string> customData);
method setDeepLinkTimeout (line 28) | void setDeepLinkTimeout(long deepLinkTimeout);
method setResolveDeepLinkURLs (line 30) | void setResolveDeepLinkURLs(params string[] urls);
method setOneLinkCustomDomain (line 32) | void setOneLinkCustomDomain(params string[] domains);
method setCurrencyCode (line 34) | void setCurrencyCode(string currencyCode);
method recordLocation (line 36) | void recordLocation(double latitude, double longitude);
method anonymizeUser (line 38) | void anonymizeUser(bool shouldAnonymizeUser);
method getAppsFlyerId (line 40) | string getAppsFlyerId();
method enableTCFDataCollection (line 42) | void enableTCFDataCollection(bool shouldCollectTcfData);
method setConsentData (line 44) | void setConsentData(AppsFlyerConsent appsFlyerConsent);
method logAdRevenue (line 46) | void logAdRevenue(AFAdRevenueData adRevenueData, Dictionary<string, st...
method setMinTimeBetweenSessions (line 48) | void setMinTimeBetweenSessions(int seconds);
method setHost (line 50) | void setHost(string hostPrefixName, string hostName);
method setPhoneNumber (line 52) | void setPhoneNumber(string phoneNumber);
method setSharingFilterForAllPartners (line 54) | void setSharingFilterForAllPartners();
method setSharingFilter (line 56) | void setSharingFilter(params string[] partners);
method getConversionData (line 58) | void getConversionData(string objectName);
method attributeAndOpenStore (line 60) | void attributeAndOpenStore(string appID, string campaign, Dictionary<s...
method recordCrossPromoteImpression (line 62) | void recordCrossPromoteImpression(string appID, string campaign, Dicti...
method generateUserInviteLink (line 64) | void generateUserInviteLink(Dictionary<string, string> parameters, Mon...
method addPushNotificationDeepLinkPath (line 66) | void addPushNotificationDeepLinkPath(params string[] paths);
method setUserEmails (line 68) | void setUserEmails(EmailCryptType cryptType, params string[] userEmails);
method subscribeForDeepLink (line 70) | void subscribeForDeepLink(string objectName);
method setIsDebug (line 72) | void setIsDebug(bool shouldEnable);
method setPartnerData (line 74) | void setPartnerData(string partnerId, Dictionary<string, string> partn...
FILE: Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs
type IAppsFlyerPurchaseValidation (line 3) | public interface IAppsFlyerPurchaseValidation
method didReceivePurchaseRevenueValidationInfo (line 5) | void didReceivePurchaseRevenueValidationInfo(string validationInfo);
method didReceivePurchaseRevenueError (line 6) | void didReceivePurchaseRevenueError(string error);
FILE: Assets/AppsFlyer/IAppsFlyerUserInvite.cs
type IAppsFlyerUserInvite (line 3) | public interface IAppsFlyerUserInvite
method onInviteLinkGenerated (line 9) | void onInviteLinkGenerated(string link);
method onInviteLinkGeneratedFailure (line 15) | void onInviteLinkGeneratedFailure(string error);
method onOpenStoreLinkGenerated (line 23) | void onOpenStoreLinkGenerated(string link);
FILE: Assets/AppsFlyer/IAppsFlyerValidateAndLog.cs
type IAppsFlyerValidateAndLog (line 3) | public interface IAppsFlyerValidateAndLog
method onValidateAndLogComplete (line 11) | void onValidateAndLogComplete(string result);
method onValidateAndLogFailure (line 17) | void onValidateAndLogFailure(string error);
FILE: Assets/AppsFlyer/IAppsFlyerValidateReceipt.cs
type IAppsFlyerValidateReceipt (line 3) | public interface IAppsFlyerValidateReceipt
method didFinishValidateReceipt (line 11) | void didFinishValidateReceipt(string result);
method didFinishValidateReceiptWithError (line 17) | void didFinishValidateReceiptWithError(string error);
FILE: Assets/AppsFlyer/ProductPurchase.cs
class InAppPurchaseValidationResult (line 8) | [System.Serializable]
class ProductPurchase (line 17) | [System.Serializable]
class ValidationFailureData (line 36) | [System.Serializable]
class SubscriptionValidationResult (line 43) | [System.Serializable]
class SubscriptionPurchase (line 52) | [System.Serializable]
class CanceledStateContext (line 70) | [System.Serializable]
class ExternalAccountIdentifiers (line 80) | [System.Serializable]
class SubscriptionPurchaseLineItem (line 88) | [System.Serializable]
class PausedStateContext (line 99) | [System.Serializable]
class SubscribeWithGoogleInfo (line 105) | [System.Serializable]
class TestPurchase (line 115) | [System.Serializable]
class DeveloperInitiatedCancellation (line 118) | [System.Serializable]
class ReplacementCancellation (line 121) | [System.Serializable]
class SystemInitiatedCancellation (line 124) | [System.Serializable]
class UserInitiatedCancellation (line 127) | [System.Serializable]
class AutoRenewingPlan (line 134) | [System.Serializable]
class DeferredItemReplacement (line 141) | [System.Serializable]
class OfferDetails (line 147) | [System.Serializable]
class PrepaidPlan (line 155) | [System.Serializable]
class CancelSurveyResult (line 161) | [System.Serializable]
class SubscriptionItemPriceChangeDetails (line 168) | [System.Serializable]
class Money (line 177) | [System.Serializable]
FILE: Assets/AppsFlyer/Tests/Tests_Suite.cs
class AppsFlyerSDKTests (line 8) | public class AppsFlyerSDKTests
method SetUp (line 12) | [SetUp]
method StartSDK_ShouldCallBridge (line 20) | [Test]
method StopSDK_True_ShouldCallBridge (line 27) | [Test]
method StopSDK_False_ShouldCallBridge (line 34) | [Test]
method IsSDKStopped_ShouldCallBridge (line 41) | [Test]
method SendEvent_WithParams_ShouldCallBridge (line 50) | [Test]
method SendEvent_NullParams_ShouldCallBridge (line 58) | [Test]
method SetCustomerUserId_ShouldCallBridge (line 67) | [Test]
method SetAppInviteOneLinkID_ShouldCallBridge (line 74) | [Test]
method SetAdditionalData_ShouldCallBridge (line 81) | [Test]
method SetResolveDeepLinkURLs_ShouldCallBridge (line 89) | [Test]
method SetCurrencyCode_ShouldCallBridge (line 96) | [Test]
method SetMinTimeBetweenSessions_ShouldCallBridge (line 103) | [Test]
method SetHost_ShouldCallBridge (line 110) | [Test]
method SetPhoneNumber_ShouldCallBridge (line 118) | [Test]
method SetSharingFilterForAllPartners_ShouldCallBridge (line 126) | [Test]
method SetSharingFilter_ShouldCallBridge (line 134) | [Test]
method SetConsentData_ShouldCallBridge_WhenInstanceIsNotNull (line 143) | [Test]
method SetConsentData_ShouldNotThrow_WhenInstanceIsNull (line 152) | [Test]
method RecordLocation_ShouldCallBridge (line 163) | [Test]
method AnonymizeUser_True_ShouldCallBridge (line 170) | [Test]
method AnonymizeUser_False_ShouldCallBridge (line 177) | [Test]
method GetAppsFlyerId_ShouldCallBridge (line 186) | [Test]
method GetConversionData_ShouldCallBridge (line 193) | [Test]
method GenerateUserInviteLink_ShouldCallBridge (line 200) | [Test]
method AttributeAndOpenStore_WithParams_ShouldCallBridge (line 209) | [Test]
method AttributeAndOpenStore_NullParams_ShouldCallBridge (line 219) | [Test]
method RecordCrossPromoteImpression_WithParams_ShouldCallBridge (line 226) | [Test]
method RecordCrossPromoteImpression_WithoutParams_ShouldCallBridge (line 238) | [Test]
method AddPushNotificationDeepLinkPath_ShouldCallBridge (line 245) | [Test]
class AppsFlyerAndroidTests (line 254) | public class AppsFlyerAndroidTests
method SetUp (line 258) | [SetUp]
method UpdateServerUninstallToken_ShouldCallBridge (line 265) | [Test] public void UpdateServerUninstallToken_ShouldCallBridge() => ...
method SetImeiData_ShouldCallBridge (line 266) | [Test] public void SetImeiData_ShouldCallBridge() => AppsFlyer.setIm...
method SetAndroidIdData_ShouldCallBridge (line 267) | [Test] public void SetAndroidIdData_ShouldCallBridge() => AppsFlyer....
method WaitForCustomerUserId_ShouldCallBridge (line 268) | [Test] public void WaitForCustomerUserId_ShouldCallBridge() => AppsF...
method SetCustomerIdAndStartSDK_ShouldCallBridge (line 269) | [Test] public void SetCustomerIdAndStartSDK_ShouldCallBridge() => Ap...
method GetOutOfStore_ShouldCallBridge (line 270) | [Test] public void GetOutOfStore_ShouldCallBridge() => AppsFlyer.get...
method SetOutOfStore_ShouldCallBridge (line 271) | [Test] public void SetOutOfStore_ShouldCallBridge() => AppsFlyer.set...
method SetCollectAndroidID_ShouldCallBridge (line 272) | [Test] public void SetCollectAndroidID_ShouldCallBridge() => AppsFly...
method SetCollectIMEI_ShouldCallBridge (line 273) | [Test] public void SetCollectIMEI_ShouldCallBridge() => AppsFlyer.se...
method SetIsUpdate_ShouldCallBridge (line 274) | [Test] public void SetIsUpdate_ShouldCallBridge() => AppsFlyer.setIs...
method SetPreinstallAttribution_ShouldCallBridge (line 275) | [Test] public void SetPreinstallAttribution_ShouldCallBridge() => Ap...
method IsPreInstalledApp_ShouldCallBridge (line 276) | [Test] public void IsPreInstalledApp_ShouldCallBridge() => AppsFlyer...
method GetAttributionId_ShouldCallBridge (line 277) | [Test] public void GetAttributionId_ShouldCallBridge() => AppsFlyer....
method HandlePushNotifications_ShouldCallBridge (line 278) | [Test] public void HandlePushNotifications_ShouldCallBridge() => App...
method ValidateAndSendInAppPurchase_ShouldCallBridge (line 279) | [Test] public void ValidateAndSendInAppPurchase_ShouldCallBridge() =...
method SetCollectOaid_ShouldCallBridge (line 280) | [Test] public void SetCollectOaid_ShouldCallBridge() => AppsFlyer.se...
method SetDisableAdvertisingIdentifiers_ShouldCallBridge (line 281) | [Test] public void SetDisableAdvertisingIdentifiers_ShouldCallBridge...
method SetDisableNetworkData_ShouldCallBridge (line 282) | [Test] public void SetDisableNetworkData_ShouldCallBridge() => AppsF...
class AppsFlyeriOSTests (line 287) | public class AppsFlyeriOSTests
method SetUp (line 291) | [SetUp]
method DisableCollectAppleAdSupport_True_ShouldCallBridge (line 298) | [Test] public void DisableCollectAppleAdSupport_True_ShouldCallBridg...
method DisableCollectAppleAdSupport_False_ShouldCallBridge (line 299) | [Test] public void DisableCollectAppleAdSupport_False_ShouldCallBrid...
method ShouldCollectDeviceName_True_ShouldCallBridge (line 300) | [Test, System.Obsolete] public void ShouldCollectDeviceName_True_Sho...
method ShouldCollectDeviceName_False_ShouldCallBridge (line 301) | [Test, System.Obsolete] public void ShouldCollectDeviceName_False_Sh...
method DisableCollectIAd_True_ShouldCallBridge (line 302) | [Test] public void DisableCollectIAd_True_ShouldCallBridge() => Apps...
method DisableCollectIAd_False_ShouldCallBridge (line 303) | [Test] public void DisableCollectIAd_False_ShouldCallBridge() => App...
method UseReceiptValidationSandbox_True_ShouldCallBridge (line 304) | [Test] public void UseReceiptValidationSandbox_True_ShouldCallBridge...
method UseReceiptValidationSandbox_False_ShouldCallBridge (line 305) | [Test] public void UseReceiptValidationSandbox_False_ShouldCallBridg...
method UseUninstallSandbox_True_ShouldCallBridge (line 306) | [Test] public void UseUninstallSandbox_True_ShouldCallBridge() => Ap...
method UseUninstallSandbox_False_ShouldCallBridge (line 307) | [Test] public void UseUninstallSandbox_False_ShouldCallBridge() => A...
method ValidateAndSendInAppPurchase_ShouldCallBridge (line 308) | [Test] public void ValidateAndSendInAppPurchase_ShouldCallBridge() =...
method RegisterUninstall_ShouldCallBridge (line 309) | [Test] public void RegisterUninstall_ShouldCallBridge()
method HandleOpenUrl_ShouldCallBridge (line 315) | [Test] public void HandleOpenUrl_ShouldCallBridge() => AppsFlyer.han...
method WaitForATTUserAuthorizationWithTimeoutInterval_ShouldCallBridge (line 316) | [Test] public void WaitForATTUserAuthorizationWithTimeoutInterval_Sh...
method SetCurrentDeviceLanguage_ShouldCallBridge (line 317) | [Test] public void SetCurrentDeviceLanguage_ShouldCallBridge() => Ap...
method DisableSKAdNetwork_True_ShouldCallBridge (line 318) | [Test] public void DisableSKAdNetwork_True_ShouldCallBridge() => App...
method DisableSKAdNetwork_False_ShouldCallBridge (line 319) | [Test] public void DisableSKAdNetwork_False_ShouldCallBridge() => Ap...
FILE: Assets/AppsFlyer/Windows/AppsFlyerWindows.cs
class AppsFlyerWindows (line 20) | public class AppsFlyerWindows
method InitSDK (line 26) | public static void InitSDK(string devKey, string appId, MonoBehaviour ...
method GetAppsFlyerId (line 43) | public static string GetAppsFlyerId()
method SetCustomerUserId (line 53) | public static void SetCustomerUserId(string customerUserId)
method Start (line 66) | public static void Start()
method Callback (line 75) | public static void Callback(AppsFlyerLib.ServerStatusCode code)
method LogEvent (line 89) | public static void LogEvent(string eventName, Dictionary<string, strin...
method GetConversionData (line 111) | public static void GetConversionData(string _reserved)
method Log (line 133) | private static void Log(string format, params string[] args)
FILE: android-unity-wrapper/app/src/androidTest/java/com/appsflyer/unity/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 18) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 20) | @Test
FILE: android-unity-wrapper/app/src/test/java/com/appsflyer/unity/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
FILE: android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java
class AppsFlyerAndroidWrapper (line 48) | public class AppsFlyerAndroidWrapper {
method initSDK (line 77) | public static void initSDK(String devKey, String objectName) {
method startTracking (line 87) | public static void startTracking(final boolean shouldCallback, final S...
method startTracking (line 112) | public static void startTracking() {
method stopTracking (line 116) | public static void stopTracking(boolean isTrackingStopped) {
method getSdkVersion (line 120) | public static String getSdkVersion() {
method updateServerUninstallToken (line 124) | public static void updateServerUninstallToken(String token) {
method setIsDebug (line 128) | public static void setIsDebug(boolean shouldEnable) {
method setImeiData (line 132) | public static void setImeiData(String aImei) {
method setAndroidIdData (line 137) | public static void setAndroidIdData(String aAndroidId) {
method setCustomerUserId (line 141) | public static void setCustomerUserId(String id) {
method waitForCustomerUserId (line 145) | public static void waitForCustomerUserId(boolean wait) {
method setCustomerIdAndTrack (line 149) | public static void setCustomerIdAndTrack(String id) {
method enableTCFDataCollection (line 153) | public static void enableTCFDataCollection(boolean shouldCollectTcfDat...
method setConsentData (line 157) | public static void setConsentData(String isUserSubjectToGDPR, String h...
method logAdRevenue (line 167) | public static void logAdRevenue(String monetizationNetwork, MediationN...
method getOutOfStore (line 172) | public static String getOutOfStore() {
method setOutOfStore (line 176) | public static void setOutOfStore(String sourceName) {
method setAppInviteOneLinkID (line 180) | public static void setAppInviteOneLinkID(String oneLinkId) {
method setAdditionalData (line 184) | public static void setAdditionalData(HashMap<String, Object> customDat...
method setUserEmails (line 188) | public static void setUserEmails(String... emails) {
method setUserEmails (line 192) | public static void setUserEmails(AppsFlyerProperties.EmailsCryptType c...
method setCollectAndroidID (line 196) | public static void setCollectAndroidID(boolean isCollect) {
method setCollectIMEI (line 200) | public static void setCollectIMEI(boolean isCollect) {
method setResolveDeepLinkURLs (line 204) | public static void setResolveDeepLinkURLs(String... urls) {
method setOneLinkCustomDomain (line 208) | public static void setOneLinkCustomDomain(String... domains) {
method setIsUpdate (line 212) | public static void setIsUpdate(boolean isUpdate) {
method setCurrencyCode (line 216) | public static void setCurrencyCode(String currencyCode) {
method trackLocation (line 220) | public static void trackLocation(double latitude, double longitude) {
method trackEvent (line 224) | public static void trackEvent(String eventName, HashMap<String, Object...
method trackEvent (line 249) | public static void trackEvent(String eventName, HashMap<String, Object...
method setDeviceTrackingDisabled (line 253) | public static void setDeviceTrackingDisabled(boolean isDisabled) {
method enableFacebookDeferredApplinks (line 257) | public static void enableFacebookDeferredApplinks(boolean isEnabled) {
method setConsumeAFDeepLinks (line 261) | public static void setConsumeAFDeepLinks(boolean doConsume) {
method setPreinstallAttribution (line 265) | public static void setPreinstallAttribution(String mediaSource, String...
method isPreInstalledApp (line 269) | public static boolean isPreInstalledApp() {
method getAttributionId (line 273) | public static String getAttributionId() {
method getAppsFlyerId (line 277) | public static String getAppsFlyerId() {
method validateAndTrackInAppPurchase (line 281) | public static void validateAndTrackInAppPurchase(String publicKey, Str...
method validateAndTrackInAppPurchaseV2 (line 288) | public static void validateAndTrackInAppPurchaseV2(int purchaseType, S...
method isTrackingStopped (line 298) | public static boolean isTrackingStopped() {
method setMinTimeBetweenSessions (line 302) | public static void setMinTimeBetweenSessions(int seconds) {
method setLogLevel (line 306) | public static void setLogLevel(AFLogger.LogLevel logLevel) {
method setHost (line 310) | public static void setHost(String hostPrefixName, String hostName) {
method getHostName (line 314) | public static String getHostName() {
method getHostPrefix (line 318) | public static String getHostPrefix() {
method setCollectOaid (line 322) | public static void setCollectOaid(boolean isCollect) {
method setSharingFilterForAllPartners (line 326) | public static void setSharingFilterForAllPartners() {
method setSharingFilter (line 330) | public static void setSharingFilter(String ... partners) {
method getConversionData (line 334) | public static void getConversionData(final String objectName){
method getConversionListener (line 342) | private static AppsFlyerConversionListener getConversionListener(final...
method parseNullableBoolean (line 377) | private static Boolean parseNullableBoolean(String value) {
method initInAppPurchaseValidatorListener (line 384) | public static void initInAppPurchaseValidatorListener(final String obj...
method initInAppPurchaseValidatorV2Listener (line 402) | public static AppsFlyerInAppPurchaseValidationCallback initInAppPurcha...
method handlePushNotifications (line 422) | public static void handlePushNotifications(){
method setPhoneNumber (line 426) | public static void setPhoneNumber(String phoneNumber){
method attributeAndOpenStore (line 430) | public static void attributeAndOpenStore(String promoted_app_id, Strin...
method recordCrossPromoteImpression (line 434) | public static void recordCrossPromoteImpression(String appID, String c...
method createOneLinkInviteListener (line 438) | public static void createOneLinkInviteListener(Map<String,String> para...
method subscribeForDeepLink (line 478) | public static void subscribeForDeepLink(final String objectName){
method addPushNotificationDeepLinkPath (line 501) | public static void addPushNotificationDeepLinkPath(String ... path){
method setDisableAdvertisingIdentifiers (line 505) | public static void setDisableAdvertisingIdentifiers(boolean disable){
method setSharingFilterForPartners (line 509) | public static void setSharingFilterForPartners(java.lang.String... par...
method setDisableNetworkData (line 513) | public static void setDisableNetworkData(boolean disable){
method setPluginInfo (line 517) | public static void setPluginInfo() {
method setDeepLinkTimeout (line 522) | public static void setDeepLinkTimeout(long deepLinkTimeout) {
method initPurchaseConnector (line 528) | public static void initPurchaseConnector(String objectName, int store) {
method build (line 539) | public static void build() {
method setIsSandbox (line 548) | public static void setIsSandbox(boolean isSandbox) {
method setAutoLogSubscriptions (line 554) | public static void setAutoLogSubscriptions(boolean logSubscriptions) {
method setAutoLogInApps (line 560) | public static void setAutoLogInApps(boolean autoLogInApps) {
method setPurchaseRevenueValidationListeners (line 566) | public static void setPurchaseRevenueValidationListeners(boolean enabl...
method startObservingTransactions (line 845) | public static void startObservingTransactions() {
method stopObservingTransactions (line 853) | public static void stopObservingTransactions() {
method mappingEnum (line 861) | private static Store mappingEnum(int storeEnum) {
FILE: android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/PurchaseRevenueBridge.java
class PurchaseRevenueBridge (line 23) | public class PurchaseRevenueBridge {
type UnityPurchaseRevenueBridge (line 26) | public interface UnityPurchaseRevenueBridge {
method getAdditionalParameters (line 27) | String getAdditionalParameters(String productsJson, String transacti...
method setUnityBridge (line 32) | public static void setUnityBridge(UnityPurchaseRevenueBridge bridge) {
method configurePurchaseClient (line 36) | public static PurchaseClient.Builder configurePurchaseClient(PurchaseC...
Condensed preview — 212 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (746K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 346,
"preview": "blank_issues_enabled: false\n\ncontact_links:\n - name: AppsFlyer Support (Customer Assistant Chatbot)\n url: https://su"
},
{
"path": ".github/workflows/Scripts/checkJira.sh",
"chars": 979,
"preview": "JIRA_TOKEN=$1\nJIRA_FIXED_VERSION=$2\n\nfixed_version_found=false\ncurl -X GET https://appsflyer.atlassian.net/rest/api/3/pr"
},
{
"path": ".github/workflows/Scripts/extractPackage.py",
"chars": 4254,
"preview": "from importlib.resources import path\nimport re\nimport hashlib\nimport os\nimport sys\nfrom unitypackage_extractor.extractor"
},
{
"path": ".github/workflows/activation.yml",
"chars": 642,
"preview": "name: Acquire activation file for Unity\non:\n push:\n branches:\n - dev/RD-81493/unit-tests\njobs:\n activation:\n "
},
{
"path": ".github/workflows/check_packages.yml",
"chars": 4506,
"preview": "name: check packages and release to upm\n\non:\n workflow_call:\n inputs:\n plugin_version:\n required: true\n "
},
{
"path": ".github/workflows/close_inactive_issues.yml",
"chars": 335,
"preview": "# This workflow triggers the org-wide reusable workflow to close inactive issues on a schedule\non:\n schedule:\n - cro"
},
{
"path": ".github/workflows/issues_workflow.yml",
"chars": 704,
"preview": "name: Close inactive issues\non:\n schedule:\n - cron: \"30 9 * * 0\"\n\njobs:\n close-issues:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/main.yml",
"chars": 1946,
"preview": "name: Test runner unity-appsflyer-plugin\n\non:\n workflow_call:\n\njobs:\n run-unity-tests:\n name: Run ${{ matrix.testMo"
},
{
"path": ".github/workflows/readme_sync.yml",
"chars": 672,
"preview": "name: Sync `docs` directory to ReadMe\n\n# Run workflow for every push to the `main` branch\non:\n push:\n branches:\n "
},
{
"path": ".github/workflows/release_QA_workflow.yml",
"chars": 360,
"preview": "name: plugin release to QA\n\non:\n push:\n branches:\n - releases/[0-9]+.x.x/[0-9]+.[0-9]+.x/[0-9]+.[0-9]+.[0-9]+-r"
},
{
"path": ".github/workflows/release_production_workflow.yml",
"chars": 2619,
"preview": "name: plugin release to Production workflow\n\non:\n pull_request:\n types:\n - closed\n branches:\n - 'master"
},
{
"path": ".github/workflows/release_to_QA.yml",
"chars": 2750,
"preview": "name: Release to QA\n\non:\n workflow_call:\n\njobs:\n Release-To-QA:\n runs-on: ubuntu-latest\n environment: Staging\n "
},
{
"path": ".github/workflows/release_to_production.yml",
"chars": 2640,
"preview": "name: plugin release to Production\n\non:\n workflow_call:\n inputs:\n plugin_version:\n required: true\n "
},
{
"path": ".github/workflows/responseToSupportIssue.yml",
"chars": 312,
"preview": "# This workflow triggers the org-wide reusable workflow to respond to issues labeled as 'support'\non:\n issues:\n type"
},
{
"path": ".github/workflows/responseToSupportIssueOnOpen.yml",
"chars": 309,
"preview": "# This workflow triggers the org-wide reusable workflow to respond to newly opened issues\non:\n issues:\n types:\n "
},
{
"path": ".github/workflows/test-unity-auth.yml",
"chars": 522,
"preview": "name: Test Unity Authentication\n\non:\n workflow_dispatch:\n\njobs:\n test-auth:\n name: Test Unity License Activation\n "
},
{
"path": ".github/workflows/update_links.yml",
"chars": 3284,
"preview": "name: update sdk links\n\non:\n workflow_call:\n\njobs:\n update-links:\n runs-on: ubuntu-latest\n steps:\n - na"
},
{
"path": ".gitignore",
"chars": 328,
"preview": ".DS_Store\n*.log\nLogs/\nPackages/\nTemp/\nLibrary/\n/*/outputs/\n\n\n#android studio\nbuild\ngen\n.gradle\n.idea\n.hgcheck\ninfer-out\n"
},
{
"path": "Assets/AppsFlyer/AFAdRevenueData.cs",
"chars": 2032,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n public enum MediationNetwork : ulong\n {"
},
{
"path": "Assets/AppsFlyer/AFAdRevenueData.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 49e1906ae949e4bfea400bd1da9f7e39\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AFInAppEvents.cs",
"chars": 3330,
"preview": "using UnityEngine;\nusing System.Collections;\n\npublic class AFInAppEvents {\n\t/**\n\t * Event Type\n\t * */\n\tpublic const str"
},
{
"path": "Assets/AppsFlyer/AFInAppEvents.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 4075c6cf6f3d94b9a9f37f826e6a0e6f\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AFMiniJSON.cs",
"chars": 18163,
"preview": "/*\n * Copyright (c) 2013 Calvin Rien\n *\n * Based on the JSON parser by Patrick van Bergen\n * http://techblog.procurios.n"
},
{
"path": "Assets/AppsFlyer/AFMiniJSON.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: bc3d1c806d507463e9b560eb09d8eb0e\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs",
"chars": 761,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n public enum AFPurchaseType\n {\n S"
},
{
"path": "Assets/AppsFlyer/AFPurchaseDetailsAndroid.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: d71b3864006f94ac08938b2ebdc940bc\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs",
"chars": 1106,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n /// <summary>\n /// Purchase type enum m"
},
{
"path": "Assets/AppsFlyer/AFSDKPurchaseDetailsIOS.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 44bb6c4472701416080eb050732075ea\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AFSDKValidateAndLogResult.cs",
"chars": 1223,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n public enum AFSDKValidateAndLogStatus\n "
},
{
"path": "Assets/AppsFlyer/AFSDKValidateAndLogResult.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 2df1c6f1eab2e4849bf2762a8d78933f\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyer.asmdef",
"chars": 317,
"preview": "{\n \"name\": \"AppsFlyer\",\n \"references\": [],\n \"includePlatforms\": [],\n \"excludePlatforms\": [],\n \"allowUnsaf"
},
{
"path": "Assets/AppsFlyer/AppsFlyer.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 2a37df438292d4903b4e5159c5de3bf9\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Assets/AppsFlyer/AppsFlyer.cs",
"chars": 40268,
"preview": "using System;\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace AppsFlyerSDK\n{\n public class AppsFlyer "
},
{
"path": "Assets/AppsFlyer/AppsFlyer.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 45161025a517d427381d3d06153a5ad3\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyerAndroid.cs",
"chars": 35813,
"preview": "using System;\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace AppsFlyerSDK\n{\n\n#if UNITY_ANDROID \n pub"
},
{
"path": "Assets/AppsFlyer/AppsFlyerAndroid.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 172d18dd98e7e4ed3b30110568b0fae4\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyerConsent.cs",
"chars": 3299,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n /// <summary>\n // Data class representi"
},
{
"path": "Assets/AppsFlyer/AppsFlyerConsent.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: a97c986fe4ee0461badf7042e08db3f3\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyerEventArgs.cs",
"chars": 6317,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace AppsFlyerSDK\n{\n \n /// <summary>\n /// Event args for "
},
{
"path": "Assets/AppsFlyer/AppsFlyerEventArgs.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: a0fc241ad5a9b43a7b461a6147dbc74c\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyerObject.prefab",
"chars": 1352,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!1 &7315102894599890749\nGameObject:\n m_ObjectHideFlags: 0\n m_Correspond"
},
{
"path": "Assets/AppsFlyer/AppsFlyerObject.prefab.meta",
"chars": 154,
"preview": "fileFormatVersion: 2\nguid: 0bfe3b149145747cc92dc53bb4df4e9b\nPrefabImporter:\n externalObjects: {}\n userData: \n assetBu"
},
{
"path": "Assets/AppsFlyer/AppsFlyerObjectScript.cs",
"chars": 2074,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing AppsFlyerSDK;\n\n// This class is int"
},
{
"path": "Assets/AppsFlyer/AppsFlyerObjectScript.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 2a2ec6ba1ee8b48749524f015ed572a6\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs",
"chars": 19816,
"preview": "using System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing UnityEngine;\nusing System;\n\nnamespace Apps"
},
{
"path": "Assets/AppsFlyer/AppsFlyerPurchaseConnector.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 0636ea07d370d437183f3762280c08ce\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/AppsFlyeriOS.cs",
"chars": 37039,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing UnityEngine;\nusing System.Re"
},
{
"path": "Assets/AppsFlyer/AppsFlyeriOS.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: b34371b3cc09641ebb007ffc4e9500f0\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyer.Editor.asmdef",
"chars": 371,
"preview": "{\n \"name\": \"AppsFlyer.Editor\",\n \"references\": [\n \"AppsFlyer\"\n ],\n \"includePlatforms\": [\n \"Edit"
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyer.Editor.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: d008146f00dea44d38752b4289e5f65b\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml",
"chars": 648,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<dependencies>\n\n <androidPackages>\n <androidPackage spec=\"com.appsflyer:af-a"
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: a03558dbbfeac45db9afe9e9c2df5a85\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyerObjectEditor.cs",
"chars": 4249,
"preview": "using UnityEditor;\nusing UnityEngine;\n\n\n[CustomEditor(typeof(AppsFlyerObjectScript))]\n[CanEditMultipleObjects]\npublic cl"
},
{
"path": "Assets/AppsFlyer/Editor/AppsFlyerObjectEditor.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: d248a134cf494486fb1d6a2e95a05d87\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Editor/appsflyer_logo.png.meta",
"chars": 2053,
"preview": "fileFormatVersion: 2\nguid: bc7fa5a6b64b944a4b2900fd877acb8b\nTextureImporter:\n internalIDToNameTable: []\n externalObjec"
},
{
"path": "Assets/AppsFlyer/Editor.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 9f84c02aa78da4ac9b444d98d97f7cc4\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerAndroidBridge.cs",
"chars": 1365,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace AppsFlyerSDK\n{\n\n public in"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerAndroidBridge.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: cdf9d1bc41a8244b3bc2d249fb6cd7aa\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerConversionData.cs",
"chars": 1363,
"preview": "namespace AppsFlyerSDK\n{\n public interface IAppsFlyerConversionData\n {\n /// <summary>\n /// `convers"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerConversionData.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: d2f1d4dadb7cb44628f25f1ffd8fc104\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerIOSBridge.cs",
"chars": 1170,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\n\nnamespace AppsFlyerSDK\n{\n\n\tpublic inte"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerIOSBridge.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 6847fb337898040288c165e3667101a3\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerNativeBridge.cs",
"chars": 2322,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace AppsFlyerSDK\n{\n\n public in"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerNativeBridge.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 409b8302434664a3785ce55d075e7f58\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs",
"chars": 224,
"preview": "namespace AppsFlyerSDK\n{\n public interface IAppsFlyerPurchaseValidation\n {\n void didReceivePurchaseRevenueV"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerPurchaseValidation.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 7c60f499ae0d048b1be8ffd6878a184c\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerUserInvite.cs",
"chars": 1042,
"preview": "namespace AppsFlyerSDK\n{\n public interface IAppsFlyerUserInvite\n {\n /// <summary>\n /// The success c"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerUserInvite.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 5a4cdfa023cb8497b94bb39720052fef\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerValidateAndLog.cs",
"chars": 690,
"preview": "namespace AppsFlyerSDK\n{\n public interface IAppsFlyerValidateAndLog\n {\n /// <summary>\n /// The succe"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerValidateAndLog.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 1a5adb7eab3284dd39a76ec56c06457c\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/IAppsFlyerValidateReceipt.cs",
"chars": 708,
"preview": "namespace AppsFlyerSDK\n{\n public interface IAppsFlyerValidateReceipt\n {\n /// <summary>\n /// The succ"
},
{
"path": "Assets/AppsFlyer/IAppsFlyerValidateReceipt.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 6385b1d184efa400a98515735e1f17bc\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/Info.plist",
"chars": 1375,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/Info.plist.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: 58a86b0b376564c06bf8ce29e1dbfb04\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/MacOS/AppsFlyerBundle.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: 0889edee891d84a8eb0b7cc87071b91e\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/MacOS.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 218a2e7ff5a4c461981bc41f7d7bfeba\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/_CodeSignature/CodeResources",
"chars": 2200,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/_CodeSignature/CodeResources.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: 724b52b308e9a4a6d889d7bf3945a2ca\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents/_CodeSignature.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 16068f30788004029bd487756623799b\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle/Contents.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 28175da64865f4e398b3b9ddfbe97b24\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Mac/AppsFlyerBundle.bundle.meta",
"chars": 633,
"preview": "fileFormatVersion: 2\nguid: 682114f7790724ab3b9410e89bbc076c\nfolderAsset: yes\nPluginImporter:\n externalObjects: {}\n ser"
},
{
"path": "Assets/AppsFlyer/Mac.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 96a328019e42349aabc478b546b8605e\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityStoreKit2Bridge.swift",
"chars": 2877,
"preview": "import Foundation\nimport StoreKit\n\n#if canImport(PurchaseConnector)\nimport PurchaseConnector\n\n@available(iOS 15.0, *)\n@o"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityStoreKit2Bridge.swift.meta",
"chars": 59,
"preview": "fileFormatVersion: 2\nguid: 5652805602a6b4273a6e527b00aea272"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityUtils.h",
"chars": 1024,
"preview": "//\n// AFUnityUtils.h\n//\n// Created by Andrii H. and Dmitry O. on 16 Oct 2023\n//\n\n#if __has_include(<AppsFlyerLib/AppsF"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityUtils.h.meta",
"chars": 526,
"preview": "fileFormatVersion: 2\nguid: 4b0609ff467554f2088aee1c52bf54a2\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityUtils.mm",
"chars": 7144,
"preview": "//\n// AFUnityUtils.mm\n// Unity-iPhone\n//\n// Created by Jonathan Wesfield on 24/07/2019.\n//\n\n#import \"AFUnityUtils.h\"\n"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AFUnityUtils.mm.meta",
"chars": 679,
"preview": "fileFormatVersion: 2\nguid: 18a03931864e84d86bedcc99c440e060\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyer+AppController.m",
"chars": 6733,
"preview": "//\n// AppsFlyer+AppController.m\n// Unity-iPhone\n//\n// Created by Jonathan Wesfield on 24/07/2019.\n//\n\n#import <objc/r"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyer+AppController.m.meta",
"chars": 679,
"preview": "fileFormatVersion: 2\nguid: 6ae9e1f7daef2427588fab2fbf8d35d5\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAppController.mm",
"chars": 3571,
"preview": "//\n// AppsFlyerAppController.mm\n// Unity-iPhone\n//\n// Created by Jonathan Wesfield on 30/07/2019.\n//\n\n#import <Founda"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAppController.mm.meta",
"chars": 679,
"preview": "fileFormatVersion: 2\nguid: 2d1497a1493b24fecaa58bd3a7b707f9\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAttribution.h",
"chars": 1172,
"preview": "//\n// AppsFlyerAttribution.h\n// UnityFramework\n//\n// Created by Margot Guetta on 11/04/2021.\n//\n\n#ifndef AppsFlyerAtt"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAttribution.h.meta",
"chars": 526,
"preview": "fileFormatVersion: 2\nguid: 8544dc3b3c7bb40d397b2de568df1058\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAttribution.m",
"chars": 3001,
"preview": "//\n// NSObject+AppsFlyerAttribution.m\n// UnityFramework\n//\n// Created by Margot Guetta on 11/04/2021.\n//\n\n#import <Fo"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyerAttribution.m.meta",
"chars": 679,
"preview": "fileFormatVersion: 2\nguid: 1060e47d7b9e2453ba575f0b455b2bf8\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h",
"chars": 2668,
"preview": "//\n// AppsFlyeriOSWarpper.h\n// Unity-iPhone\n//\n// Created by Jonathan Wesfield on 24/07/2019.\n//\n\n#import \"AFUnityUti"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.h.meta",
"chars": 526,
"preview": "fileFormatVersion: 2\nguid: 147104b04b5794eaa92b4195cc328e13\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm",
"chars": 25705,
"preview": "//\n// AppsFlyeriOSWarpper.mm\n// Unity-iPhone\n//\n// Created by Jonathan Wesfield on 24/07/2019.\n//\n\n#import \"AppsFlyer"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm.meta",
"chars": 679,
"preview": "fileFormatVersion: 2\nguid: 2bff3788f3d8747fe9679bd3818e1d76\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Plugins/iOS.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: d8325c12a80ff4323b82e2833a8fc287\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Plugins.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 66297743248ab4e47abdc371a59f1111\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/ProductPurchase.cs",
"chars": 4362,
"preview": "#nullable enable\n\nusing System.Collections;\nusing System.Collections.Generic;\nusing System;\nusing UnityEngine;\n\n[System."
},
{
"path": "Assets/AppsFlyer/ProductPurchase.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 9a1435104a69d4c8ebcc6f237cc29a54\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Tests/Castle.Core.dll.meta",
"chars": 645,
"preview": "fileFormatVersion: 2\nguid: 7b5b4579db85b4cfd8395bfb19aa309e\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Tests/NSubstitute.dll.meta",
"chars": 645,
"preview": "fileFormatVersion: 2\nguid: 642cf65ed2573419bab7e7d44fc73181\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Tests/System.Runtime.CompilerServices.Unsafe.dll.meta",
"chars": 645,
"preview": "fileFormatVersion: 2\nguid: 3a5ccbd864ba94a9a9ba47895ff14922\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Tests/System.Threading.Tasks.Extensions.dll.meta",
"chars": 645,
"preview": "fileFormatVersion: 2\nguid: ee45ae2608f3c44d08fc6e21a94d133f\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Tests/Tests.asmdef",
"chars": 579,
"preview": "{\n \"name\": \"Tests\",\n \"references\": [\n \"UnityEngine.TestRunner\",\n \"UnityEditor.TestRunner\",\n \""
},
{
"path": "Assets/AppsFlyer/Tests/Tests.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 1f155a0e4c9ab48eeb4b54b2dc0aeba7\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Assets/AppsFlyer/Tests/Tests_Suite.cs",
"chars": 12723,
"preview": "using System.Collections.Generic;\nusing NUnit.Framework;\nusing UnityEngine;\nusing NSubstitute;\n\nnamespace AppsFlyerSDK."
},
{
"path": "Assets/AppsFlyer/Tests/Tests_Suite.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 1b1a24aa01166451d804d7c03c14a3db\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Tests.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 1f19f272c71674582bed1d93925da003\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/Windows/AppsFlyerLib.pdb.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: d0748deab2f031f42b801afab0837a59\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "Assets/AppsFlyer/Windows/AppsFlyerLib.pri.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: c621896ec81267f478e98555031271ef\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "Assets/AppsFlyer/Windows/AppsFlyerLib.winmd.meta",
"chars": 727,
"preview": "fileFormatVersion: 2\nguid: 5186898c6f4665f438e46763d4cff3ae\nPluginImporter:\n externalObjects: {}\n serializedVersion: 2"
},
{
"path": "Assets/AppsFlyer/Windows/AppsFlyerWindows.cs",
"chars": 4863,
"preview": "//#define AFSDK_WIN_DEBUG\r\n//#define UNITY_WSA_10_0\r\n//#define ENABLE_WINMD_SUPPORT\r\n\r\n#if UNITY_WSA_10_0\r\nusing System;"
},
{
"path": "Assets/AppsFlyer/Windows/AppsFlyerWindows.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 034d11e52b599954181d7f08c0d89ca8\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Assets/AppsFlyer/Windows.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 1fbfcb6aeaa7f40e69a0daff450a2450\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Assets/AppsFlyer/package.json",
"chars": 173,
"preview": "{\n\t\"name\": \"appsflyer-unity-plugin\",\n\t\"displayName\": \"AppsFlyer\",\n\t\"description\": \"AppsFlyer Unity plugin\",\n\t\"version\": "
},
{
"path": "Assets/AppsFlyer/package.json.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: a2b3ab5da7dda473b8791503604647b4\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Assets/AppsFlyer.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 7863556d88b814e09ba9cfc75a91d655\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "CHANGELOG.md",
"chars": 8169,
"preview": "# Versions\n\n## v6.17.91\n* Update Android unity-wrapper to Billing Library 8 (billing:8.0.0)\n\n## v6.17.90\n* Update Androi"
},
{
"path": "LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2019 AppsFlyerSDK\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "ProjectSettings/AudioManager.asset",
"chars": 443,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!11 &1\nAudioManager:\n m_ObjectHideFlags: 0\n serializedVersion: 2\n m_Vo"
},
{
"path": "ProjectSettings/ClusterInputManager.asset",
"chars": 114,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!236 &1\nClusterInputManager:\n m_ObjectHideFlags: 0\n m_Inputs: []\n"
},
{
"path": "ProjectSettings/DynamicsManager.asset",
"chars": 1254,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!55 &1\nPhysicsManager:\n m_ObjectHideFlags: 0\n serializedVersion: 13\n m"
},
{
"path": "ProjectSettings/EditorBuildSettings.asset",
"chars": 160,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!1045 &1\nEditorBuildSettings:\n m_ObjectHideFlags: 0\n serializedVersion:"
},
{
"path": "ProjectSettings/EditorSettings.asset",
"chars": 1107,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!159 &1\nEditorSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 9\n m"
},
{
"path": "ProjectSettings/GraphicsSettings.asset",
"chars": 2506,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!30 &1\nGraphicsSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 13\n "
},
{
"path": "ProjectSettings/InputManager.asset",
"chars": 5793,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!13 &1\nInputManager:\n m_ObjectHideFlags: 0\n serializedVersion: 2\n m_Ax"
},
{
"path": "ProjectSettings/MemorySettings.asset",
"chars": 1192,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!387306366 &1\nMemorySettings:\n m_ObjectHideFlags: 0\n m_EditorMemorySett"
},
{
"path": "ProjectSettings/MultiplayerManager.asset",
"chars": 157,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!655991488 &1\nMultiplayerManager:\n m_ObjectHideFlags: 0\n m_EnableMultip"
},
{
"path": "ProjectSettings/NavMeshAreas.asset",
"chars": 1308,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!126 &1\nNavMeshProjectSettings:\n m_ObjectHideFlags: 0\n serializedVersio"
},
{
"path": "ProjectSettings/PackageManagerSettings.asset",
"chars": 863,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &1\nMonoBehaviour:\n m_ObjectHideFlags: 61\n m_CorrespondingSourceObj"
},
{
"path": "ProjectSettings/Physics2DSettings.asset",
"chars": 2028,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!19 &1\nPhysics2DSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 4\n "
},
{
"path": "ProjectSettings/PresetManager.asset",
"chars": 146,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!1386491679 &1\nPresetManager:\n m_ObjectHideFlags: 0\n serializedVersion:"
},
{
"path": "ProjectSettings/ProjectSettings.asset",
"chars": 21954,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!129 &1\nPlayerSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 23\n "
},
{
"path": "ProjectSettings/ProjectVersion.txt",
"chars": 85,
"preview": "m_EditorVersion: 2020.3.41f1\nm_EditorVersionWithRevision: 2020.3.41f1 (7c19dc9acfda)\n"
},
{
"path": "ProjectSettings/QualitySettings.asset",
"chars": 6723,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!47 &1\nQualitySettings:\n m_ObjectHideFlags: 0\n serializedVersion: 5\n m"
},
{
"path": "ProjectSettings/TagManager.asset",
"chars": 378,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!78 &1\nTagManager:\n serializedVersion: 2\n tags: []\n layers:\n - Defaul"
},
{
"path": "ProjectSettings/TimeManager.asset",
"chars": 202,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!5 &1\nTimeManager:\n m_ObjectHideFlags: 0\n Fixed Timestep: 0.02\n Maximu"
},
{
"path": "ProjectSettings/UnityConnectSettings.asset",
"chars": 853,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!310 &1\nUnityConnectSettings:\n m_ObjectHideFlags: 0\n serializedVersion:"
},
{
"path": "ProjectSettings/VFXManager.asset",
"chars": 308,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!937362698 &1\nVFXManager:\n m_ObjectHideFlags: 0\n m_IndirectShader: {fil"
},
{
"path": "ProjectSettings/VersionControlSettings.asset",
"chars": 188,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!890905787 &1\nVersionControlSettings:\n m_ObjectHideFlags: 0\n m_Mode: Vi"
},
{
"path": "ProjectSettings/XRSettings.asset",
"chars": 158,
"preview": "{\n \"m_SettingKeys\": [\n \"VR Device Disabled\",\n \"VR Device User Alert\"\n ],\n \"m_SettingValues\": [\n "
},
{
"path": "README.md",
"chars": 7673,
"preview": "<img src=\"https://massets.appsflyer.com/wp-content/uploads/2018/06/20092440/static-ziv_1TP.png\" width=\"400\" >\n\n# appsfl"
},
{
"path": "UserSettings/EditorUserSettings.asset",
"chars": 623,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!162 &1\nEditorUserSettings:\n m_ObjectHideFlags: 0\n serializedVersion: 4"
},
{
"path": "UserSettings/Layouts/default-2021.dwlt",
"chars": 24670,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &1\nMonoBehaviour:\n m_ObjectHideFlags: 52\n m_CorrespondingSourceObj"
},
{
"path": "UserSettings/Layouts/default-6000.dwlt",
"chars": 38748,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &1\nMonoBehaviour:\n m_ObjectHideFlags: 52\n m_CorrespondingSourceObj"
},
{
"path": "UserSettings/Search.settings",
"chars": 2,
"preview": "{}"
},
{
"path": "android-unity-wrapper/.gitignore",
"chars": 317,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
},
{
"path": "android-unity-wrapper/app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "android-unity-wrapper/app/build.gradle",
"chars": 882,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n namespace 'com.appsflyer.unitywrapper'\n compileSdkVersion 34\n\n"
},
{
"path": "android-unity-wrapper/app/proguard-rules.pro",
"chars": 751,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "android-unity-wrapper/app/src/androidTest/java/com/appsflyer/unity/ExampleInstrumentedTest.java",
"chars": 761,
"preview": "package com.appsflyer.unity;\n\nimport android.content.Context;\n\nimport androidx.test.platform.app.InstrumentationRegistry"
},
{
"path": "android-unity-wrapper/app/src/main/AndroidManifest.xml",
"chars": 351,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <application\n android:allowBackup=\"tru"
},
{
"path": "android-unity-wrapper/app/src/main/res/drawable/ic_launcher_background.xml",
"chars": 5606,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:wi"
},
{
"path": "android-unity-wrapper/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
"chars": 1702,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:aapt=\"http://schemas.android.com/aapt\"\n "
},
{
"path": "android-unity-wrapper/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 272,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "android-unity-wrapper/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 272,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "android-unity-wrapper/app/src/main/res/values/colors.xml",
"chars": 208,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#6200EE</color>\n <color name=\"color"
},
{
"path": "android-unity-wrapper/app/src/main/res/values/strings.xml",
"chars": 84,
"preview": "<resources>\n <string name=\"app_name\">android-unity-wrapper</string>\n</resources>\n"
},
{
"path": "android-unity-wrapper/app/src/main/res/values/styles.xml",
"chars": 383,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "android-unity-wrapper/app/src/test/java/com/appsflyer/unity/ExampleUnitTest.java",
"chars": 380,
"preview": "package com.appsflyer.unity;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test,"
},
{
"path": "android-unity-wrapper/build.gradle",
"chars": 1599,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n \n"
},
{
"path": "android-unity-wrapper/gradle/wrapper/gradle-wrapper.properties",
"chars": 233,
"preview": "#Tue Jan 21 12:53:02 IST 2025\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://"
},
{
"path": "android-unity-wrapper/gradlew",
"chars": 5296,
"preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n## Gradle start up"
},
{
"path": "android-unity-wrapper/gradlew.bat",
"chars": 2260,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "android-unity-wrapper/settings.gradle",
"chars": 80,
"preview": "rootProject.name='android-unity-wrapper'\ninclude ':app'\ninclude ':unitywrapper'\n"
},
{
"path": "android-unity-wrapper/unitywrapper/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "android-unity-wrapper/unitywrapper/build.gradle",
"chars": 886,
"preview": "apply plugin: 'com.android.library'\n\nandroid {\n namespace \"com.appsflyer.unitywrapper\"\n compileSdkVersion 34\n\n "
},
{
"path": "android-unity-wrapper/unitywrapper/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "android-unity-wrapper/unitywrapper/proguard-rules.pro",
"chars": 751,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "android-unity-wrapper/unitywrapper/publish.gradle",
"chars": 3569,
"preview": "apply plugin: 'maven-publish'\napply plugin: 'signing'\n\ndef isReleaseBuild() {\n return !VERSION_NAME.contains(\"-SNAPSH"
},
{
"path": "android-unity-wrapper/unitywrapper/src/main/AndroidManifest.xml",
"chars": 71,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"/>\n"
},
{
"path": "android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/AppsFlyerAndroidWrapper.java",
"chars": 45240,
"preview": "package com.appsflyer.unity;\n\nimport android.annotation.SuppressLint;\nimport android.os.Build;\nimport android.util.Log;\n"
},
{
"path": "android-unity-wrapper/unitywrapper/src/main/java/com/appsflyer/unity/PurchaseRevenueBridge.java",
"chars": 3257,
"preview": "package com.appsflyer.unity;\n\nimport android.util.Log;\nimport com.appsflyer.api.InAppPurchaseEvent;\nimport com.appsflyer"
},
{
"path": "deploy/build_unity_package.sh",
"chars": 2116,
"preview": "#!/bin/bash\n\necho \"Start Build for appsflyer-unity-plugin.unitypackage\"\n\nDEPLOY_PATH=outputs\nUNITY_PATH=\"/Applications/U"
},
{
"path": "deploy/strict_mode_build_package.sh",
"chars": 4047,
"preview": "#!/bin/bash\n\necho \"Start Build for appsflyer-unity-plugin.unitypackage. Strict Mode.\"\n\n\n DEPLOY_PATH=outputs\n UNITY_PATH"
},
{
"path": "docs/API.md",
"chars": 57086,
"preview": "---\r\ntitle: API reference\r\ncategory: 5f9705393c689a065c409b23\r\nparentDoc: 6370c9e2441a4504d6bca3bd\r\norder: 12\r\nhidden: f"
},
{
"path": "docs/BasicIntegration.md",
"chars": 9840,
"preview": "---\ntitle: Integration\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 1\nhidden: false\n---"
},
{
"path": "docs/DMAConsent.md",
"chars": 5918,
"preview": "---\ntitle: Sending Consent Data for DMA Compliance\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3b"
},
{
"path": "docs/DeepLinkIntegrate.md",
"chars": 1877,
"preview": "---\ntitle: Deep Linking - Installation\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 6\nh"
},
{
"path": "docs/InAppEvents.md",
"chars": 10924,
"preview": "---\ntitle: In-App Events\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 3\nhidden: false\n-"
},
{
"path": "docs/Installation.md",
"chars": 4535,
"preview": "---\ntitle: Installation\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 0\nhnameden: false\n"
},
{
"path": "docs/Introduction.md",
"chars": 8158,
"preview": "---\ntitle: Introduction\nslug: \"introduction-unity\"\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3b"
},
{
"path": "docs/MigrationGuide.md",
"chars": 10567,
"preview": "---\r\ntitle: Migration guide from v4\r\ncategory: 5f9705393c689a065c409b23\r\nparentDoc: 6370c9e2441a4504d6bca3bd\r\norder: 11\r"
},
{
"path": "docs/PushNotifications.md",
"chars": 9083,
"preview": "---\ntitle: Push Notifications\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 9\nhidden: fa"
},
{
"path": "docs/Testing.md",
"chars": 1268,
"preview": "---\ntitle: Test Integration\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 2\nhidden: fals"
},
{
"path": "docs/Troubleshooting.md",
"chars": 5050,
"preview": "---\ntitle: Troubleshooting\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 10\nhidden: fals"
},
{
"path": "docs/UnifiedDeepLink.md",
"chars": 3755,
"preview": "---\ntitle: Unified Deep Linking (UDL)\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 7\nhi"
},
{
"path": "docs/UninstallMeasurement.md",
"chars": 3047,
"preview": "---\ntitle: Uninstall Measurement\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 5\nhidden:"
},
{
"path": "docs/UserInvite.md",
"chars": 1972,
"preview": "---\ntitle: User Invite\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 8\nhidden: false\n---"
},
{
"path": "docs/ad-revenue-unity.md",
"chars": 6673,
"preview": "---\ntitle: \"Ad revenue\"\nslug: \"ad-revenue-unity\"\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\n"
},
{
"path": "docs/conversion-data-unity.md",
"chars": 1872,
"preview": "---\ntitle: Conversion data\ncategory: 5f9705393c689a065c409b23\nparentDoc: 6370c9e2441a4504d6bca3bd\norder: 4\nhidden: false"
},
{
"path": "docs/purchase-connector.md",
"chars": 26116,
"preview": "---\ntitle: \"Purchase connector\"\nslug: \"purchase-connector-unity\"\ncategory: 5f9705393c689a065c409b23\nparentDoc: 694bc4503"
},
{
"path": "docs/purchase-validation-unity.md",
"chars": 2779,
"preview": "---\ntitle: \"Purchase and subscription validation\"\nslug: \"purchase-subscription-validation-unity\"\ncategory: 5f9705393c689"
},
{
"path": "docs/validate-and-log-unity.md",
"chars": 6020,
"preview": "---\ntitle: \"Validate and log purchase\"\nslug: \"validate-and-log-unity\"\ncategory: 5f9705393c689a065c409b23\nparentDoc: 694b"
},
{
"path": "obj/Debug/.NETFramework,Version=v4.7.1.AssemblyAttributes.cs",
"chars": 210,
"preview": "// <autogenerated />\nusing System;\nusing System.Reflection;\n[assembly: global::System.Runtime.Versioning.TargetFramework"
}
]
// ... and 12 more files (download for full content)
About this extraction
This page contains the full source code of the AppsFlyerSDK/appsflyer-unity-plugin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 212 files (686.6 KB), approximately 182.4k tokens, and a symbol index with 640 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.