init commit

dev
胡宇飞 2023-12-26 11:52:53 +08:00
commit 7d3907665f
171 changed files with 14679 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Mac auto-generated system files
*.DS_Store*

3
Adjust.meta Normal file
View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f6eb314a40e64090be99b81e9bbdd00d
timeCreated: 1701911403

9
Adjust/3rd Party.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 48d72eaa514ffd0449362a759c8e9a86
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9c780c17852614618be5ffd9cc43a75f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

3
Adjust/Adjust.asmdef Normal file
View File

@ -0,0 +1,3 @@
{
"name": "Adjust"
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 052c31a56689f4aeea54d292c3e95e89
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Android.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 64b3fa260fe5b3c4e9215ec9b42c90da
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1b21499aaf10a42e8b6377af71a35ba5
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<!-- Permissions needed by the Adjust SDK. -->
<!-- For more information, check: https://github.com/adjust/unity_sdk#post-build-android -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
<queries>
<package android:name="com.facebook.katana" />
</queries>
<queries>
<package android:name="com.instagram.android" />
</queries>
<application
android:theme="@style/UnityThemeSelector"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:debuggable="true">
<!-- Adjust broadcast receiver used to capture referrer content from INSTALL_REFERRER intent. -->
<receiver
android:name="com.adjust.sdk.AdjustReferrerReceiver"
android:permission="android.permission.INSTALL_PACKAGES"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<activity
android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
</manifest>

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: a13ef442648c346a79f9ff24875c037a
TextScriptImporter:
userData:

Binary file not shown.

View File

@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: de7cd4cf0359345f487233fc82a1d892
timeCreated: 1526341612
licenseType: Pro
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
'': data
second:
enabled: 0
settings: {}
data:
first:
Android: Android
second:
enabled: 1
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Editor.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: af6a4d5087d014e96817909f48d7faac
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
{
"name": "Adjust.Editor",
"rootNamespace": "com.adjust.sdk",
"references": [
"Adjust"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e539acf4e82c476e9c5c849a7e699085
timeCreated: 1701844361

View File

@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor.SceneManagement;
using UnityEditor;
namespace com.adjust.sdk
{
[CustomEditor(typeof(Adjust))]
public class AdjustCustomEditor : Editor
{
private Editor settingsEditor;
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
var adjust = target as Adjust;
GUIStyle darkerCyanTextFieldStyles = new GUIStyle(EditorStyles.boldLabel);
darkerCyanTextFieldStyles.normal.textColor = new Color(0f/255f, 190f/255f, 190f/255f);
// Not gonna ask: http://answers.unity.com/answers/1244650/view.html
EditorGUILayout.Space();
var origFontStyle = EditorStyles.label.fontStyle;
EditorStyles.label.fontStyle = FontStyle.Bold;
adjust.startManually = EditorGUILayout.Toggle("START SDK MANUALLY", adjust.startManually, EditorStyles.toggle);
EditorStyles.label.fontStyle = origFontStyle;
using (new EditorGUI.DisabledScope(adjust.startManually))
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("MULTIPLATFORM SETTINGS:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
adjust.appToken = EditorGUILayout.TextField("App Token", adjust.appToken);
adjust.environment = (AdjustEnvironment)EditorGUILayout.EnumPopup("Environment", adjust.environment);
adjust.logLevel = (AdjustLogLevel)EditorGUILayout.EnumPopup("Log Level", adjust.logLevel);
adjust.urlStrategy = (AdjustUrlStrategy)EditorGUILayout.EnumPopup("URL Strategy", adjust.urlStrategy);
adjust.eventBuffering = EditorGUILayout.Toggle("Event Buffering", adjust.eventBuffering);
adjust.sendInBackground = EditorGUILayout.Toggle("Send In Background", adjust.sendInBackground);
adjust.launchDeferredDeeplink = EditorGUILayout.Toggle("Launch Deferred Deep Link", adjust.launchDeferredDeeplink);
adjust.needsCost = EditorGUILayout.Toggle("Cost Data In Attribution Callback", adjust.needsCost);
adjust.coppaCompliant = EditorGUILayout.Toggle("COPPA Compliant", adjust.coppaCompliant);
adjust.linkMe = EditorGUILayout.Toggle("LinkMe", adjust.linkMe);
adjust.defaultTracker = EditorGUILayout.TextField("Default Tracker", adjust.defaultTracker);
adjust.startDelay = EditorGUILayout.DoubleField("Start Delay", adjust.startDelay);
EditorGUILayout.LabelField("App Secret:", EditorStyles.label);
EditorGUI.indentLevel += 1;
adjust.secretId = EditorGUILayout.LongField("Secret ID", adjust.secretId);
adjust.info1 = EditorGUILayout.LongField("Info 1", adjust.info1);
adjust.info2 = EditorGUILayout.LongField("Info 2", adjust.info2);
adjust.info3 = EditorGUILayout.LongField("Info 3", adjust.info3);
adjust.info4 = EditorGUILayout.LongField("Info 4", adjust.info4);
EditorGUI.indentLevel -= 2;
EditorGUILayout.Space();
EditorGUILayout.LabelField("ANDROID SETTINGS:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
adjust.preinstallTracking = EditorGUILayout.Toggle("Preinstall Tracking", adjust.preinstallTracking);
adjust.preinstallFilePath = EditorGUILayout.TextField("Preinstall File Path", adjust.preinstallFilePath);
adjust.playStoreKidsApp = EditorGUILayout.Toggle("Play Store Kids App", adjust.playStoreKidsApp);
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
EditorGUILayout.LabelField("IOS SETTINGS:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
adjust.adServicesInfoReading = EditorGUILayout.Toggle("AdServices Info Reading", adjust.adServicesInfoReading);
adjust.idfaInfoReading = EditorGUILayout.Toggle("IDFA Info Reading", adjust.idfaInfoReading);
adjust.skAdNetworkHandling = EditorGUILayout.Toggle("SKAdNetwork Handling", adjust.skAdNetworkHandling);
EditorGUI.indentLevel -= 1;
}
if (settingsEditor == null)
{
settingsEditor = CreateEditor(AdjustSettings.Instance);
}
settingsEditor.OnInspectorGUI();
if (GUI.changed)
{
EditorUtility.SetDirty(adjust);
EditorSceneManager.MarkSceneDirty(adjust.gameObject.scene);
}
}
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 1772b9461c24c4df0ad55f51f81c7345
timeCreated: 1617868100
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,342 @@
using System;
using System.IO;
using System.Linq;
using System.Xml;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
public class AdjustEditor : AssetPostprocessor
{
[MenuItem("Assets/Adjust/Export Unity Package")]
public static void ExportAdjustUnityPackage()
{
string exportedFileName = "Adjust.unitypackage";
string assetsPath = "Assets/Adjust";
List<string> assetsToExport = new List<string>();
// Adjust Assets.
assetsToExport.Add(assetsPath + "/3rd Party/SimpleJSON.cs");
assetsToExport.Add(assetsPath + "/Android/adjust-android.jar");
assetsToExport.Add(assetsPath + "/Android/AdjustAndroid.cs");
assetsToExport.Add(assetsPath + "/Android/AdjustAndroidManifest.xml");
assetsToExport.Add(assetsPath + "/Editor/AdjustEditor.cs");
assetsToExport.Add(assetsPath + "/Editor/AdjustSettings.cs");
assetsToExport.Add(assetsPath + "/Editor/AdjustSettingsEditor.cs");
assetsToExport.Add(assetsPath + "/Editor/AdjustCustomEditor.cs");
assetsToExport.Add(assetsPath + "/Editor/AdjustEditorPreprocessor.cs");
assetsToExport.Add(assetsPath + "/ExampleGUI/ExampleGUI.cs");
assetsToExport.Add(assetsPath + "/ExampleGUI/ExampleGUI.prefab");
assetsToExport.Add(assetsPath + "/ExampleGUI/ExampleGUI.unity");
assetsToExport.Add(assetsPath + "/iOS/ADJAttribution.h");
assetsToExport.Add(assetsPath + "/iOS/ADJConfig.h");
assetsToExport.Add(assetsPath + "/iOS/ADJEvent.h");
assetsToExport.Add(assetsPath + "/iOS/ADJEventFailure.h");
assetsToExport.Add(assetsPath + "/iOS/ADJEventSuccess.h");
assetsToExport.Add(assetsPath + "/iOS/ADJLogger.h");
assetsToExport.Add(assetsPath + "/iOS/ADJSessionFailure.h");
assetsToExport.Add(assetsPath + "/iOS/ADJSessionSuccess.h");
assetsToExport.Add(assetsPath + "/iOS/ADJSubscription.h");
assetsToExport.Add(assetsPath + "/iOS/Adjust.h");
assetsToExport.Add(assetsPath + "/iOS/AdjustiOS.cs");
assetsToExport.Add(assetsPath + "/iOS/AdjustSdk.a");
assetsToExport.Add(assetsPath + "/iOS/AdjustUnity.h");
assetsToExport.Add(assetsPath + "/iOS/AdjustUnity.mm");
assetsToExport.Add(assetsPath + "/iOS/AdjustUnityDelegate.h");
assetsToExport.Add(assetsPath + "/iOS/AdjustUnityDelegate.mm");
assetsToExport.Add(assetsPath + "/Prefab/Adjust.prefab");
assetsToExport.Add(assetsPath + "/Unity/Adjust.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustAppStoreSubscription.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustAttribution.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustConfig.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustEnvironment.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustEvent.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustEventFailure.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustEventSuccess.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustLogLevel.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustPlayStoreSubscription.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustSessionFailure.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustSessionSuccess.cs");
assetsToExport.Add(assetsPath + "/Unity/AdjustUtils.cs");
assetsToExport.Add(assetsPath + "/Windows/AdjustWindows.cs");
assetsToExport.Add(assetsPath + "/Windows/WindowsPcl.dll");
assetsToExport.Add(assetsPath + "/Windows/WindowsUap.dll");
assetsToExport.Add(assetsPath + "/Windows/Stubs/Win10Interface.dll");
assetsToExport.Add(assetsPath + "/Windows/Stubs/Win81Interface.dll");
assetsToExport.Add(assetsPath + "/Windows/Stubs/WinWsInterface.dll");
assetsToExport.Add(assetsPath + "/Windows/W81/AdjustWP81.dll");
assetsToExport.Add(assetsPath + "/Windows/W81/Win81Interface.dll");
assetsToExport.Add(assetsPath + "/Windows/WS/AdjustWS.dll");
assetsToExport.Add(assetsPath + "/Windows/WS/WinWsInterface.dll");
assetsToExport.Add(assetsPath + "/Windows/WU10/AdjustUAP10.dll");
assetsToExport.Add(assetsPath + "/Windows/WU10/Win10Interface.dll");
assetsToExport.Add(assetsPath + "/Windows/Newtonsoft.Json.dll");
AssetDatabase.ExportPackage(
assetsToExport.ToArray(),
exportedFileName,
ExportPackageOptions.IncludeDependencies | ExportPackageOptions.Interactive);
}
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string projectPath)
{
RunPostBuildScript(target: target, projectPath: projectPath);
}
private static void RunPostBuildScript(BuildTarget target, string projectPath = "")
{
if (target == BuildTarget.iOS)
{
#if UNITY_IOS
Debug.Log("[Adjust]: Starting to perform post build tasks for iOS platform.");
string xcodeProjectPath = projectPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject xcodeProject = new PBXProject();
xcodeProject.ReadFromFile(xcodeProjectPath);
#if UNITY_2019_3_OR_NEWER
string xcodeTarget = xcodeProject.GetUnityMainTargetGuid();
#else
string xcodeTarget = xcodeProject.TargetGuidByName("Unity-iPhone");
#endif
HandlePlistIosChanges(projectPath);
if (AdjustSettings.iOSUniversalLinksDomains.Length > 0)
{
AddUniversalLinkDomains(xcodeProject, xcodeProjectPath, xcodeTarget);
}
// If enabled by the user, Adjust SDK will try to add following frameworks to your project:
// - AdSupport.framework (needed for access to IDFA value)
// - AdServices.framework (needed in case you are running ASA campaigns)
// - StoreKit.framework (needed for communication with SKAdNetwork framework)
// - AppTrackingTransparency.framework (needed for information about user's consent to be tracked)
// In case you don't need any of these, feel free to remove them from your app.
if (AdjustSettings.iOSFrameworkAdSupport)
{
Debug.Log("[Adjust]: Adding AdSupport.framework to Xcode project.");
xcodeProject.AddFrameworkToProject(xcodeTarget, "AdSupport.framework", true);
Debug.Log("[Adjust]: AdSupport.framework added successfully.");
}
else
{
Debug.Log("[Adjust]: Skipping AdSupport.framework linking.");
}
if (AdjustSettings.iOSFrameworkAdServices)
{
Debug.Log("[Adjust]: Adding AdServices.framework to Xcode project.");
xcodeProject.AddFrameworkToProject(xcodeTarget, "AdServices.framework", true);
Debug.Log("[Adjust]: AdServices.framework added successfully.");
}
else
{
Debug.Log("[Adjust]: Skipping AdServices.framework linking.");
}
if (AdjustSettings.iOSFrameworkStoreKit)
{
Debug.Log("[Adjust]: Adding StoreKit.framework to Xcode project.");
xcodeProject.AddFrameworkToProject(xcodeTarget, "StoreKit.framework", true);
Debug.Log("[Adjust]: StoreKit.framework added successfully.");
}
else
{
Debug.Log("[Adjust]: Skipping StoreKit.framework linking.");
}
if (AdjustSettings.iOSFrameworkAppTrackingTransparency)
{
Debug.Log("[Adjust]: Adding AppTrackingTransparency.framework to Xcode project.");
xcodeProject.AddFrameworkToProject(xcodeTarget, "AppTrackingTransparency.framework", true);
Debug.Log("[Adjust]: AppTrackingTransparency.framework added successfully.");
}
else
{
Debug.Log("[Adjust]: Skipping AppTrackingTransparency.framework linking.");
}
// The Adjust SDK needs to have -ObjC flag set in other linker flags section because of it's categories.
// OTHER_LDFLAGS -ObjC
//
// Seems that in newer Unity IDE versions adding -ObjC flag to Unity-iPhone target doesn't do the trick.
// Adding -ObjC to UnityFramework target however does make things work nicely again.
// This happens because Unity is linking SDK's static library into UnityFramework target.
// Check for presence of UnityFramework target and if there, include -ObjC flag inside of it.
Debug.Log("[Adjust]: Adding -ObjC flag to other linker flags (OTHER_LDFLAGS) of Unity-iPhone target.");
xcodeProject.AddBuildProperty(xcodeTarget, "OTHER_LDFLAGS", "-ObjC");
Debug.Log("[Adjust]: -ObjC successfully added to other linker flags.");
string xcodeTargetUnityFramework = xcodeProject.TargetGuidByName("UnityFramework");
if (!string.IsNullOrEmpty(xcodeTargetUnityFramework))
{
Debug.Log("[Adjust]: Adding -ObjC flag to other linker flags (OTHER_LDFLAGS) of UnityFramework target.");
xcodeProject.AddBuildProperty(xcodeTargetUnityFramework, "OTHER_LDFLAGS", "-ObjC");
Debug.Log("[Adjust]: -ObjC successfully added to other linker flags.");
}
// The Adjust SDK needs to have Obj-C exceptions enabled.
// GCC_ENABLE_OBJC_EXCEPTIONS=YES
Debug.Log("[Adjust]: Enabling Obj-C exceptions by setting GCC_ENABLE_OBJC_EXCEPTIONS value to YES.");
xcodeProject.AddBuildProperty(xcodeTarget, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
Debug.Log("[Adjust]: Obj-C exceptions enabled successfully.");
if (!string.IsNullOrEmpty(xcodeTargetUnityFramework))
{
Debug.Log("[Adjust]: Enabling Obj-C exceptions by setting GCC_ENABLE_OBJC_EXCEPTIONS value to YES.");
xcodeProject.AddBuildProperty(xcodeTargetUnityFramework, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
Debug.Log("[Adjust]: Obj-C exceptions enabled successfully.");
}
if (xcodeProject.ContainsFileByProjectPath("Libraries/Adjust/iOS/AdjustSigSdk.a"))
{
if (!string.IsNullOrEmpty(xcodeTargetUnityFramework))
{
xcodeProject.AddBuildProperty(xcodeTargetUnityFramework, "OTHER_LDFLAGS", "-force_load $(PROJECT_DIR)/Libraries/Adjust/iOS/AdjustSigSdk.a");
}
else
{
xcodeProject.AddBuildProperty(xcodeTarget, "OTHER_LDFLAGS", "-force_load $(PROJECT_DIR)/Libraries/Adjust/iOS/AdjustSigSdk.a");
}
}
// Save the changes to Xcode project file.
xcodeProject.WriteToFile(xcodeProjectPath);
#endif
}
}
#if UNITY_IOS
private static void HandlePlistIosChanges(string projectPath)
{
const string UserTrackingUsageDescriptionKey = "NSUserTrackingUsageDescription";
// Check if needs to do any info plist change.
bool hasUserTrackingDescription =
!string.IsNullOrEmpty(AdjustSettings.iOSUserTrackingUsageDescription);
bool hasUrlSchemesDeepLinksEnabled = AdjustSettings.iOSUrlSchemes.Length > 0;
if (!hasUserTrackingDescription && !hasUrlSchemesDeepLinksEnabled)
{
return;
}
// Get and read info plist.
var plistPath = Path.Combine(projectPath, "Info.plist");
var plist = new PlistDocument();
plist.ReadFromFile(plistPath);
var plistRoot = plist.root;
// Do the info plist changes.
if (hasUserTrackingDescription)
{
if (plistRoot[UserTrackingUsageDescriptionKey] != null)
{
Debug.Log("[Adjust]: Overwritting User Tracking Usage Description.");
}
plistRoot.SetString(UserTrackingUsageDescriptionKey,
AdjustSettings.iOSUserTrackingUsageDescription);
}
if (hasUrlSchemesDeepLinksEnabled)
{
AddUrlSchemesIOS(plistRoot, AdjustSettings.iOSUrlIdentifier, AdjustSettings.iOSUrlSchemes);
}
// Write any info plist change.
File.WriteAllText(plistPath, plist.WriteToString());
}
private static void AddUrlSchemesIOS(PlistElementDict plistRoot, string urlIdentifier, string[] urlSchemes)
{
// Set Array for futher deeplink values.
var urlTypesArray = CreatePlistElementArray(plistRoot, "CFBundleURLTypes");
// Array will contain just one deeplink dictionary
var urlSchemesItems = CreatePlistElementDict(urlTypesArray);
urlSchemesItems.SetString("CFBundleURLName", urlIdentifier);
var urlSchemesArray = CreatePlistElementArray(urlSchemesItems, "CFBundleURLSchemes");
// Delete old deferred deeplinks URIs
Debug.Log("[Adjust]: Removing deeplinks that already exist in the array to avoid duplicates.");
foreach (var link in urlSchemes)
{
urlSchemesArray.values.RemoveAll(
element => element != null && element.AsString().Equals(link));
}
Debug.Log("[Adjust]: Adding new deep links.");
foreach (var link in urlSchemes.Distinct())
{
urlSchemesArray.AddString(link);
}
}
private static PlistElementArray CreatePlistElementArray(PlistElementDict root, string key)
{
if (!root.values.ContainsKey(key))
{
Debug.Log(string.Format("[Adjust]: {0} not found in Info.plist. Creating a new one.", key));
return root.CreateArray(key);
}
var result = root.values[key].AsArray();
return result != null ? result : root.CreateArray(key);
}
private static PlistElementDict CreatePlistElementDict(PlistElementArray rootArray)
{
if (rootArray.values.Count == 0)
{
Debug.Log("[Adjust]: Deeplinks array doesn't contain dictionary for deeplinks. Creating a new one.");
return rootArray.AddDict();
}
var urlSchemesItems = rootArray.values[0].AsDict();
Debug.Log("[Adjust]: Reading deeplinks array");
if (urlSchemesItems == null)
{
Debug.Log("[Adjust]: Deeplinks array doesn't contain dictionary for deeplinks. Creating a new one.");
urlSchemesItems = rootArray.AddDict();
}
return urlSchemesItems;
}
private static void AddUniversalLinkDomains(PBXProject project, string xCodeProjectPath, string xCodeTarget)
{
string entitlementsFileName = "Unity-iPhone.entitlements";
Debug.Log("[Adjust]: Adding associated domains to entitlements file.");
#if UNITY_2019_3_OR_NEWER
var projectCapabilityManager = new ProjectCapabilityManager(xCodeProjectPath, entitlementsFileName, null, project.GetUnityMainTargetGuid());
#else
var projectCapabilityManager = new ProjectCapabilityManager(xCodeProjectPath, entitlementsFileName, PBXProject.GetUnityTargetName());
#endif
var uniqueDomains = AdjustSettings.iOSUniversalLinksDomains.Distinct().ToArray();
const string applinksPrefix = "applinks:";
for (int i = 0; i < uniqueDomains.Length; i++)
{
if (!uniqueDomains[i].StartsWith(applinksPrefix))
{
uniqueDomains[i] = applinksPrefix + uniqueDomains[i];
}
}
projectCapabilityManager.AddAssociatedDomains(uniqueDomains);
projectCapabilityManager.WriteToFile();
Debug.Log("[Adjust]: Enabling Associated Domains capability with created entitlements file.");
project.AddCapability(xCodeTarget, PBXCapabilityType.AssociatedDomains, entitlementsFileName);
}
#endif
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fc5962e0096e9495bbad76934c842619
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,365 @@
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor.Build;
using UnityEditor;
using System.Xml;
using System;
using System.Text.RegularExpressions;
using System.Linq;
#if UNITY_2018_1_OR_NEWER
public class AdjustEditorPreprocessor : IPreprocessBuildWithReport
#else
public class AdjustEditorPreprocessor : IPreprocessBuild
#endif
{
public int callbackOrder
{
get
{
return 0;
}
}
#if UNITY_2018_1_OR_NEWER
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
{
OnPreprocessBuild(report.summary.platform, string.Empty);
}
#endif
public void OnPreprocessBuild(BuildTarget target, string path)
{
if (target == BuildTarget.Android)
{
#if UNITY_ANDROID
RunPostProcessTasksAndroid();
#endif
}
}
#if UNITY_ANDROID
private static void RunPostProcessTasksAndroid()
{
var isAdjustManifestUsed = false;
var androidPluginsPath = Path.Combine(Application.dataPath, "Plugins/Android");
var adjustManifestPath = Path.Combine(Application.dataPath, "Adjust/Android/AdjustAndroidManifest.xml");
var appManifestPath = Path.Combine(Application.dataPath, "Plugins/Android/AndroidManifest.xml");
// Check if user has already created AndroidManifest.xml file in its location.
// If not, use already predefined AdjustAndroidManifest.xml as default one.
if (!File.Exists(appManifestPath))
{
if (!Directory.Exists(androidPluginsPath))
{
Directory.CreateDirectory(androidPluginsPath);
}
isAdjustManifestUsed = true;
File.Copy(adjustManifestPath, appManifestPath);
Debug.Log("[Adjust]: User defined AndroidManifest.xml file not found in Plugins/Android folder.");
Debug.Log("[Adjust]: Creating default app's AndroidManifest.xml from AdjustAndroidManifest.xml file.");
}
else
{
Debug.Log("[Adjust]: User defined AndroidManifest.xml file located in Plugins/Android folder.");
}
// Let's open the app's AndroidManifest.xml file.
var manifestFile = new XmlDocument();
manifestFile.Load(appManifestPath);
var manifestHasChanged = false;
// If Adjust manifest is used, we have already set up everything in it so that
// our native Android SDK can be used properly.
if (!isAdjustManifestUsed)
{
// However, if you already had your own AndroidManifest.xml, we'll now run
// some checks on it and tweak it a bit if needed to add some stuff which
// our native Android SDK needs so that it can run properly.
// Add needed permissions if they are missing.
manifestHasChanged |= AddPermissions(manifestFile);
// Add intent filter to main activity if it is missing.
manifestHasChanged |= AddBroadcastReceiver(manifestFile);
}
// Add intent filter to URL schemes for deeplinking
manifestHasChanged |= AddURISchemes(manifestFile);
if (manifestHasChanged)
{
// Save the changes.
manifestFile.Save(appManifestPath);
Debug.Log("[Adjust]: App's AndroidManifest.xml file check and potential modification completed.");
Debug.Log("[Adjust]: Please check if any error message was displayed during this process "
+ "and make sure to fix all issues in order to properly use the Adjust SDK in your app.");
}
else
{
Debug.Log("[Adjust]: App's AndroidManifest.xml file check completed.");
Debug.Log("[Adjust]: No modifications performed due to app's AndroidManifest.xml file compatibility.");
}
}
private static bool AddURISchemes(XmlDocument manifest)
{
if (AdjustSettings.AndroidUriSchemes.Length == 0)
{
return false;
}
Debug.Log("[Adjust]: Start addition of URI schemes");
var intentRoot = manifest.DocumentElement.SelectSingleNode("/manifest/application/activity[@android:name='com.unity3d.player.UnityPlayerActivity']", GetNamespaceManager(manifest));
var usedIntentFiltersChanged = false;
var usedIntentFilters = GetIntentFilter(manifest);
foreach (var uriScheme in AdjustSettings.AndroidUriSchemes)
{
Uri uri;
try
{
// The first element is android:scheme and the second one is android:host.
uri = new Uri(uriScheme);
// Uri class converts implicit file paths to explicit file paths with the file:// scheme.
if (!uriScheme.StartsWith(uri.Scheme))
{
throw new UriFormatException();
}
}
catch (UriFormatException)
{
Debug.LogError(string.Format("[Adjust]: Android deeplink URI scheme \"{0}\" is invalid and will be ignored.", uriScheme));
Debug.LogWarning(string.Format("[Adjust]: Make sure that your URI scheme entry ends with ://"));
continue;
}
if (!IsIntentFilterAlreadyExist(manifest, uri))
{
Debug.Log("[Adjust]: Adding new URI with scheme: " + uri.Scheme + ", and host: " + uri.Host);
var androidSchemeNode = manifest.CreateElement("data");
AddAndroidNamespaceAttribute(manifest, "scheme", uri.Scheme, androidSchemeNode);
AddAndroidNamespaceAttribute(manifest, "host", uri.Host, androidSchemeNode);
usedIntentFilters.AppendChild(androidSchemeNode);
usedIntentFiltersChanged = true;
Debug.Log(string.Format("[Adjust]: Android deeplink URI scheme \"{0}\" successfully added to your app's AndroidManifest.xml file.", uriScheme));
}
}
if (usedIntentFiltersChanged && usedIntentFilters.ParentNode == null)
{
intentRoot.AppendChild(usedIntentFilters);
}
return usedIntentFiltersChanged;
}
private static XmlElement GetIntentFilter(XmlDocument manifest)
{
var xpath = "/manifest/application/activity/intent-filter[data/@android:scheme and data/@android:host]";
var intentFilter = manifest.DocumentElement.SelectSingleNode(xpath, GetNamespaceManager(manifest)) as XmlElement;
if (intentFilter == null)
{
const string androidName = "name";
const string category = "category";
intentFilter = manifest.CreateElement("intent-filter");
var actionElement = manifest.CreateElement("action");
AddAndroidNamespaceAttribute(manifest, androidName, "android.intent.action.VIEW", actionElement);
intentFilter.AppendChild(actionElement);
var defaultCategory = manifest.CreateElement(category);
AddAndroidNamespaceAttribute(manifest, androidName, "android.intent.category.DEFAULT", defaultCategory);
intentFilter.AppendChild(defaultCategory);
var browsableCategory = manifest.CreateElement(category);
AddAndroidNamespaceAttribute(manifest, androidName, "android.intent.category.BROWSABLE", browsableCategory);
intentFilter.AppendChild(browsableCategory);
}
return intentFilter;
}
private static bool IsIntentFilterAlreadyExist(XmlDocument manifest, Uri link)
{
var xpath = string.Format("/manifest/application/activity/intent-filter/data[@android:scheme='{0}' and @android:host='{1}']", link.Scheme, link.Host);
return manifest.DocumentElement.SelectSingleNode(xpath, GetNamespaceManager(manifest)) != null;
}
private static bool AddPermissions(XmlDocument manifest)
{
// The Adjust SDK needs two permissions to be added to you app's manifest file:
// <uses-permission android:name="android.permission.INTERNET" />
// <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
// <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
// <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Debug.Log("[Adjust]: Checking if all permissions needed for the Adjust SDK are present in the app's AndroidManifest.xml file.");
var manifestHasChanged = false;
// If enabled by the user && android.permission.INTERNET permission is missing, add it.
if (AdjustSettings.androidPermissionInternet == true)
{
manifestHasChanged |= AddPermission(manifest, "android.permission.INTERNET");
}
// If enabled by the user && com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE permission is missing, add it.
if (AdjustSettings.androidPermissionInstallReferrerService == true)
{
manifestHasChanged |= AddPermission(manifest, "com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE");
}
// If enabled by the user && com.google.android.gms.permission.AD_ID permission is missing, add it.
if (AdjustSettings.androidPermissionAdId == true)
{
manifestHasChanged |= AddPermission(manifest, "com.google.android.gms.permission.AD_ID");
}
// If enabled by the user && android.permission.ACCESS_NETWORK_STATE permission is missing, add it.
if (AdjustSettings.androidPermissionAccessNetworkState == true)
{
manifestHasChanged |= AddPermission(manifest, "android.permission.ACCESS_NETWORK_STATE");
}
return manifestHasChanged;
}
private static bool AddPermission(XmlDocument manifest, string permissionValue)
{
if (DoesPermissionExist(manifest, permissionValue))
{
Debug.Log(string.Format("[Adjust]: Your app's AndroidManifest.xml file already contains {0} permission.", permissionValue));
return false;
}
var element = manifest.CreateElement("uses-permission");
AddAndroidNamespaceAttribute(manifest, "name", permissionValue, element);
manifest.DocumentElement.AppendChild(element);
Debug.Log(string.Format("[Adjust]: {0} permission successfully added to your app's AndroidManifest.xml file.", permissionValue));
return true;
}
private static bool DoesPermissionExist(XmlDocument manifest, string permissionValue)
{
var xpath = string.Format("/manifest/uses-permission[@android:name='{0}']", permissionValue);
return manifest.DocumentElement.SelectSingleNode(xpath, GetNamespaceManager(manifest)) != null;
}
private static bool AddBroadcastReceiver(XmlDocument manifest)
{
// We're looking for existence of broadcast receiver in the AndroidManifest.xml
// Check out the example below how that usually looks like:
// <manifest
// <!-- ... -->>
//
// <supports-screens
// <!-- ... -->/>
//
// <application
// <!-- ... -->>
// <receiver
// android:name="com.adjust.sdk.AdjustReferrerReceiver"
// android:permission="android.permission.INSTALL_PACKAGES"
// android:exported="true" >
//
// <intent-filter>
// <action android:name="com.android.vending.INSTALL_REFERRER" />
// </intent-filter>
// </receiver>
//
// <activity android:name="com.unity3d.player.UnityPlayerActivity"
// <!-- ... -->
// </activity>
// </application>
//
// <!-- ... -->>
//
// </manifest>
Debug.Log("[Adjust]: Checking if app's AndroidManifest.xml file contains receiver for INSTALL_REFERRER intent.");
// Find the application node
var applicationNodeXpath = "/manifest/application";
var applicationNode = manifest.DocumentElement.SelectSingleNode(applicationNodeXpath);
// If there's no application node, something is really wrong with your AndroidManifest.xml.
if (applicationNode == null)
{
Debug.LogError("[Adjust]: Your app's AndroidManifest.xml file does not contain \"<application>\" node.");
Debug.LogError("[Adjust]: Unable to add the Adjust broadcast receiver to AndroidManifest.xml.");
return false;
}
// Okay, there's an application node in the AndroidManifest.xml file.
// Let's now check if user has already defined a receiver which is listening to INSTALL_REFERRER intent.
// If that is already defined, don't force the Adjust broadcast receiver to the manifest file.
// If not, add the Adjust broadcast receiver to the manifest file.
var customBroadcastReceiversNodes = GetCustomRecieverNodes(manifest);
if (customBroadcastReceiversNodes.Count > 0)
{
if (DoesAdjustBroadcastReceiverExist(manifest))
{
Debug.Log("[Adjust]: It seems like you are already using Adjust broadcast receiver. Yay.");
}
else
{
Debug.Log("[Adjust]: It seems like you are using your own broadcast receiver.");
Debug.Log("[Adjust]: Please, add the calls to the Adjust broadcast receiver like described in here: https://github.com/adjust/android_sdk/blob/master/doc/english/referrer.md");
}
return false;
}
// Generate Adjust broadcast receiver entry and add it to the application node.
var receiverElement = manifest.CreateElement("receiver");
AddAndroidNamespaceAttribute(manifest, "name", "com.adjust.sdk.AdjustReferrerReceiver", receiverElement);
AddAndroidNamespaceAttribute(manifest, "permission", "android.permission.INSTALL_PACKAGES", receiverElement);
AddAndroidNamespaceAttribute(manifest, "exported", "true", receiverElement);
var intentFilterElement = manifest.CreateElement("intent-filter");
var actionElement = manifest.CreateElement("action");
AddAndroidNamespaceAttribute(manifest, "name", "com.android.vending.INSTALL_REFERRER", actionElement);
intentFilterElement.AppendChild(actionElement);
receiverElement.AppendChild(intentFilterElement);
applicationNode.AppendChild(receiverElement);
Debug.Log("[Adjust]: Adjust broadcast receiver successfully added to your app's AndroidManifest.xml file.");
return true;
}
private static bool DoesAdjustBroadcastReceiverExist(XmlDocument manifest)
{
var xpath = "/manifest/application/receiver[@android:name='com.adjust.sdk.AdjustReferrerReceiver']";
return manifest.SelectSingleNode(xpath, GetNamespaceManager(manifest)) != null;
}
private static List<XmlNode> GetCustomRecieverNodes(XmlDocument manifest)
{
var xpath = "/manifest/application/receiver[intent-filter/action[@android:name='com.android.vending.INSTALL_REFERRER']]";
return new List<XmlNode>(manifest.DocumentElement.SelectNodes(xpath, GetNamespaceManager(manifest)).OfType<XmlNode>());
}
private static void AddAndroidNamespaceAttribute(XmlDocument manifest, string key, string value, XmlElement node)
{
var androidSchemeAttribute = manifest.CreateAttribute("android", key, "http://schemas.android.com/apk/res/android");
androidSchemeAttribute.InnerText = value;
node.SetAttributeNode(androidSchemeAttribute);
}
private static XmlNamespaceManager GetNamespaceManager(XmlDocument manifest)
{
var namespaceManager = new XmlNamespaceManager(manifest.NameTable);
namespaceManager.AddNamespace("android", "http://schemas.android.com/apk/res/android");
return namespaceManager;
}
#endif
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: c88a79442bb9342b6956c7d59705f982
timeCreated: 1621599616
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,161 @@
// Inspired by: https://github.com/facebook/facebook-sdk-for-unity/blob/master/Facebook.Unity.Settings/FacebookSettings.cs
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class AdjustSettings : ScriptableObject
{
private static AdjustSettings instance;
[SerializeField]
private bool _iOSFrameworkAdSupport = true;
[SerializeField]
private bool _iOSFrameworkAdServices = false;
[SerializeField]
private bool _iOSFrameworkAppTrackingTransparency = false;
[SerializeField]
private bool _iOSFrameworkStoreKit = false;
[SerializeField]
private bool _androidPermissionInternet = true;
[SerializeField]
private bool _androidPermissionInstallReferrerService = true;
[SerializeField]
private bool _androidPermissionAdId = true;
[SerializeField]
private bool _androidPermissionAccessNetworkState = false;
[SerializeField]
private string _iOSUserTrackingUsageDescription;
[SerializeField]
private string _iOSUrlIdentifier;
[SerializeField]
private string[] _iOSUrlSchemes = new string[0];
[SerializeField]
private string[] _iOSUniversalLinksDomains = new string[0];
[SerializeField]
private string[] androidUriSchemes = new string[0];
public static AdjustSettings Instance
{
get
{
instance = NullableInstance;
if (instance == null)
{
// Create AdjustSettings.asset inside the folder in which AdjustSettings.cs reside.
instance = ScriptableObject.CreateInstance<AdjustSettings>();
var guids = AssetDatabase.FindAssets(string.Format("{0} t:script", "AdjustSettings"));
if (guids == null || guids.Length <= 0)
{
return instance;
}
// var assetPath = AssetDatabase.GUIDToAssetPath(guids[0]).Replace("AdjustSettings.cs", "AdjustSettings.asset");
// ************ Auto fixed by Guru Adjust ************
if(!System.IO.Directory.Exists("Assets/Guru/Editor")) System.IO.Directory.CreateDirectory("Assets/Guru/Editor");
var assetPath = "Assets/Guru/Editor/AdjustSettings.asset";
// ************ Auto fixed by Guru Adjust ************
AssetDatabase.CreateAsset(instance, assetPath);
}
return instance;
}
}
public static AdjustSettings NullableInstance
{
get
{
if (instance == null)
{
var guids = AssetDatabase.FindAssets(string.Format("{0} t:ScriptableObject", "AdjustSettings"));
if (guids == null || guids.Length <= 0)
{
return instance;
}
var assetPath = AssetDatabase.GUIDToAssetPath(guids[0]);
instance = (AdjustSettings)AssetDatabase.LoadAssetAtPath(assetPath, typeof(AdjustSettings));
}
return instance;
}
}
public static bool iOSFrameworkAdSupport
{
get { return Instance._iOSFrameworkAdSupport; }
set { Instance._iOSFrameworkAdSupport = value; }
}
public static bool iOSFrameworkAdServices
{
get { return Instance._iOSFrameworkAdServices; }
set { Instance._iOSFrameworkAdServices = value; }
}
public static bool iOSFrameworkAppTrackingTransparency
{
get { return Instance._iOSFrameworkAppTrackingTransparency; }
set { Instance._iOSFrameworkAppTrackingTransparency = value; }
}
public static bool iOSFrameworkStoreKit
{
get { return Instance._iOSFrameworkStoreKit; }
set { Instance._iOSFrameworkStoreKit = value; }
}
public static bool androidPermissionInternet
{
get { return Instance._androidPermissionInternet; }
set { Instance._androidPermissionInternet = value; }
}
public static bool androidPermissionInstallReferrerService
{
get { return Instance._androidPermissionInstallReferrerService; }
set { Instance._androidPermissionInstallReferrerService = value; }
}
public static bool androidPermissionAdId
{
get { return Instance._androidPermissionAdId; }
set { Instance._androidPermissionAdId = value; }
}
public static bool androidPermissionAccessNetworkState
{
get { return Instance._androidPermissionAccessNetworkState; }
set { Instance._androidPermissionAccessNetworkState = value; }
}
public static string iOSUserTrackingUsageDescription
{
get { return Instance._iOSUserTrackingUsageDescription; }
set { Instance._iOSUserTrackingUsageDescription = value; }
}
public static string iOSUrlIdentifier
{
get { return Instance._iOSUrlIdentifier; }
set { Instance._iOSUrlIdentifier = value; }
}
public static string[] iOSUrlSchemes
{
get { return Instance._iOSUrlSchemes; }
set { Instance._iOSUrlSchemes = value; }
}
public static string[] iOSUniversalLinksDomains
{
get { return Instance._iOSUniversalLinksDomains; }
set { Instance._iOSUniversalLinksDomains = value; }
}
public static string[] AndroidUriSchemes
{
get { return Instance.androidUriSchemes; }
set { Instance.androidUriSchemes = value; }
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: ea4d495dc6d5ba64b90db7afda6a48a4
timeCreated: 1601333126
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,126 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace com.adjust.sdk
{
[CustomEditor(typeof(AdjustSettings))]
public class AdjustSettingsEditor : Editor
{
SerializedProperty iOSFrameworkAdSupport;
SerializedProperty iOSFrameworkAdServices;
SerializedProperty iOSFrameworkAppTrackingTransparency;
SerializedProperty iOSFrameworkStoreKit;
SerializedProperty androidPermissionInternet;
SerializedProperty androidPermissionInstallReferrerService;
SerializedProperty androidPermissionAdId;
SerializedProperty androidPermissionAccessNetworkState;
SerializedProperty iOSUserTrackingUsageDescription;
SerializedProperty iOSUrlIdentifier;
SerializedProperty iOSUrlSchemes;
SerializedProperty iOSUniversalLinksDomains;
SerializedProperty androidUriSchemes;
void OnEnable()
{
iOSFrameworkAdSupport = serializedObject.FindProperty("_iOSFrameworkAdSupport");
iOSFrameworkAdServices = serializedObject.FindProperty("_iOSFrameworkAdServices");
iOSFrameworkAppTrackingTransparency = serializedObject.FindProperty("_iOSFrameworkAppTrackingTransparency");
iOSFrameworkStoreKit = serializedObject.FindProperty("_iOSFrameworkStoreKit");
androidPermissionInternet = serializedObject.FindProperty("_androidPermissionInternet");
androidPermissionInstallReferrerService = serializedObject.FindProperty("_androidPermissionInstallReferrerService");
androidPermissionAdId = serializedObject.FindProperty("_androidPermissionAdId");
androidPermissionAccessNetworkState = serializedObject.FindProperty("_androidPermissionAccessNetworkState");
iOSUserTrackingUsageDescription = serializedObject.FindProperty("_iOSUserTrackingUsageDescription");
iOSUrlIdentifier = serializedObject.FindProperty("_iOSUrlIdentifier");
iOSUrlSchemes = serializedObject.FindProperty("_iOSUrlSchemes");
iOSUniversalLinksDomains = serializedObject.FindProperty("_iOSUniversalLinksDomains");
androidUriSchemes = serializedObject.FindProperty("androidUriSchemes");
}
public override void OnInspectorGUI()
{
GUIStyle darkerCyanTextFieldStyles = new GUIStyle(EditorStyles.boldLabel);
darkerCyanTextFieldStyles.normal.textColor = new Color(0f/255f, 190f/255f, 190f/255f);
EditorGUILayout.Space();
EditorGUILayout.LabelField("LINK IOS FRAMEWORKS:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
EditorGUILayout.PropertyField(iOSFrameworkAdSupport,
new GUIContent("AdSupport.framework",
"iOS framework needed to access IDFA value"),
true);
EditorGUILayout.PropertyField(iOSFrameworkAdServices,
new GUIContent("AdServices.framework",
"iOS framework needed to support AdServices based Apple Search Ads attribution"),
true);
EditorGUILayout.PropertyField(iOSFrameworkAppTrackingTransparency,
new GUIContent("AppTrackingTransparency.framework",
"iOS framework needed to display tracking consent dialog"),
true);
EditorGUILayout.PropertyField(iOSFrameworkStoreKit,
new GUIContent("StoreKit.framework",
"iOS framework needed to use SKAdNetwork capabilities"),
true);
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
EditorGUILayout.LabelField("ADD ANDROID PERMISSIONS:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
EditorGUILayout.PropertyField(androidPermissionInternet,
new GUIContent("android.permission.INTERNET",
"Android permission needed to send data to Adjust backend"),
true);
EditorGUILayout.PropertyField(androidPermissionInstallReferrerService,
new GUIContent("com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE",
"Android permission needed to read install referrer"),
true);
EditorGUILayout.PropertyField(androidPermissionAdId,
new GUIContent("com.google.android.gms.permission.AD_ID",
"Android permission needed to read Google Advertising ID if you target API 33 or later"),
true);
EditorGUILayout.PropertyField(androidPermissionAccessNetworkState,
new GUIContent("android.permission.ACCESS_NETWORK_STATE",
"Android permission needed to determine type of network device is connected to"),
true);
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
EditorGUILayout.LabelField("IOS PRIVACY:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
EditorGUILayout.PropertyField(iOSUserTrackingUsageDescription,
new GUIContent("User Tracking Description",
"String you would like to display to your users describing the reason " +
"behind asking for tracking permission."),
true);
EditorGUI.indentLevel -= 1;
EditorGUILayout.Space();
EditorGUILayout.LabelField("DEEP LINKING:", darkerCyanTextFieldStyles);
EditorGUI.indentLevel += 1;
EditorGUILayout.PropertyField(iOSUrlIdentifier,
new GUIContent("iOS URL Identifier",
"Value of CFBundleURLName property of the root CFBundleURLTypes element. " +
"If not needed otherwise, value should be your bundle ID."),
true);
EditorGUILayout.PropertyField(iOSUrlSchemes,
new GUIContent("iOS URL Schemes",
"URL schemes handled by your app. " +
"Make sure to enter just the scheme name without :// part at the end."),
true);
EditorGUILayout.PropertyField(iOSUniversalLinksDomains,
new GUIContent("iOS Universal Links Domains",
"Associated domains handled by your app. State just the domain part without applinks: part in front."),
true);
EditorGUILayout.PropertyField(androidUriSchemes,
new GUIContent("Android URI Schemes",
"URI schemes handled by your app. " +
"Make sure to enter just the scheme name with :// part at the end."),
true);
EditorGUILayout.HelpBox(
"Please note that Adjust SDK doesn't remove existing URI Schemes, " +
"so if you need to clean previously added entries, " +
"you need to do it manually from \"Assets/Plugins/Android/AndroidManifest.xml\"",
MessageType.Info,
true);
EditorGUI.indentLevel -= 1;
serializedObject.ApplyModifiedProperties();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e957ffb3938e94bcaab247e46bd9804c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/ExampleGUI.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c173c46523b75714d945d694e8b89742
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,290 @@
using System;
using System.Text;
using System.Collections;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.UI;
using com.adjust.sdk;
public class ExampleGUI : MonoBehaviour
{
private int numberOfButtons = 8;
private bool isEnabled;
private bool showPopUp = false;
private string txtSetEnabled = "Disable SDK";
private string txtManualLaunch = "Manual Launch";
private string txtSetOfflineMode = "Turn Offline Mode ON";
void OnGUI()
{
if (showPopUp)
{
GUI.Window(0, new Rect((Screen.width / 2) - 150, (Screen.height / 2) - 65, 300, 130), ShowGUI, "Is SDK enabled?");
}
if (GUI.Button(new Rect(0, Screen.height * 0 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), txtManualLaunch))
{
if (!string.Equals(txtManualLaunch, "SDK Launched", StringComparison.OrdinalIgnoreCase))
{
AdjustConfig adjustConfig = new AdjustConfig("2fm9gkqubvpc", AdjustEnvironment.Sandbox);
adjustConfig.setLogLevel(AdjustLogLevel.Verbose);
adjustConfig.setLogDelegate(msg => Debug.Log(msg));
adjustConfig.setEventSuccessDelegate(EventSuccessCallback);
adjustConfig.setEventFailureDelegate(EventFailureCallback);
adjustConfig.setSessionSuccessDelegate(SessionSuccessCallback);
adjustConfig.setSessionFailureDelegate(SessionFailureCallback);
adjustConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback);
adjustConfig.setAttributionChangedDelegate(AttributionChangedCallback);
Adjust.start(adjustConfig);
isEnabled = true;
txtManualLaunch = "SDK Launched";
}
}
if (GUI.Button(new Rect(0, Screen.height * 1 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Simple Event"))
{
AdjustEvent adjustEvent = new AdjustEvent("g3mfiw");
Adjust.trackEvent(adjustEvent);
}
if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Revenue Event"))
{
AdjustEvent adjustEvent = new AdjustEvent("a4fd35");
adjustEvent.setRevenue(0.25, "EUR");
Adjust.trackEvent(adjustEvent);
}
if (GUI.Button(new Rect(0, Screen.height * 3 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Callback Event"))
{
AdjustEvent adjustEvent = new AdjustEvent("34vgg9");
adjustEvent.addCallbackParameter("key", "value");
adjustEvent.addCallbackParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);
}
if (GUI.Button(new Rect(0, Screen.height * 4 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Partner Event"))
{
AdjustEvent adjustEvent = new AdjustEvent("w788qs");
adjustEvent.addPartnerParameter("key", "value");
adjustEvent.addPartnerParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);
}
if (GUI.Button(new Rect(0, Screen.height * 5 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), txtSetOfflineMode))
{
if (string.Equals(txtSetOfflineMode, "Turn Offline Mode ON", StringComparison.OrdinalIgnoreCase))
{
Adjust.setOfflineMode(true);
txtSetOfflineMode = "Turn Offline Mode OFF";
}
else
{
Adjust.setOfflineMode(false);
txtSetOfflineMode = "Turn Offline Mode ON";
}
}
if (GUI.Button(new Rect(0, Screen.height * 6 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), txtSetEnabled))
{
if (string.Equals(txtSetEnabled, "Disable SDK", StringComparison.OrdinalIgnoreCase))
{
Adjust.setEnabled(false);
txtSetEnabled = "Enable SDK";
}
else
{
Adjust.setEnabled(true);
txtSetEnabled = "Disable SDK";
}
}
if (GUI.Button(new Rect(0, Screen.height * 7 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Is SDK Enabled?"))
{
isEnabled = Adjust.isEnabled();
showPopUp = true;
}
}
void ShowGUI(int windowID)
{
if (isEnabled)
{
GUI.Label(new Rect(65, 40, 200, 30), "Adjust SDK is ENABLED!");
}
else
{
GUI.Label(new Rect(65, 40, 200, 30), "Adjust SDK is DISABLED!");
}
if (GUI.Button(new Rect(90, 75, 120, 40), "OK"))
{
showPopUp = false;
}
}
public void HandleGooglePlayId(String adId)
{
Debug.Log("Google Play Ad ID = " + adId);
}
public void AttributionChangedCallback(AdjustAttribution attributionData)
{
Debug.Log("Attribution changed!");
if (attributionData.trackerName != null)
{
Debug.Log("Tracker name: " + attributionData.trackerName);
}
if (attributionData.trackerToken != null)
{
Debug.Log("Tracker token: " + attributionData.trackerToken);
}
if (attributionData.network != null)
{
Debug.Log("Network: " + attributionData.network);
}
if (attributionData.campaign != null)
{
Debug.Log("Campaign: " + attributionData.campaign);
}
if (attributionData.adgroup != null)
{
Debug.Log("Adgroup: " + attributionData.adgroup);
}
if (attributionData.creative != null)
{
Debug.Log("Creative: " + attributionData.creative);
}
if (attributionData.clickLabel != null)
{
Debug.Log("Click label: " + attributionData.clickLabel);
}
if (attributionData.adid != null)
{
Debug.Log("ADID: " + attributionData.adid);
}
}
public void EventSuccessCallback(AdjustEventSuccess eventSuccessData)
{
Debug.Log("Event tracked successfully!");
if (eventSuccessData.Message != null)
{
Debug.Log("Message: " + eventSuccessData.Message);
}
if (eventSuccessData.Timestamp != null)
{
Debug.Log("Timestamp: " + eventSuccessData.Timestamp);
}
if (eventSuccessData.Adid != null)
{
Debug.Log("Adid: " + eventSuccessData.Adid);
}
if (eventSuccessData.EventToken != null)
{
Debug.Log("EventToken: " + eventSuccessData.EventToken);
}
if (eventSuccessData.CallbackId != null)
{
Debug.Log("CallbackId: " + eventSuccessData.CallbackId);
}
if (eventSuccessData.JsonResponse != null)
{
Debug.Log("JsonResponse: " + eventSuccessData.GetJsonResponse());
}
}
public void EventFailureCallback(AdjustEventFailure eventFailureData)
{
Debug.Log("Event tracking failed!");
if (eventFailureData.Message != null)
{
Debug.Log("Message: " + eventFailureData.Message);
}
if (eventFailureData.Timestamp != null)
{
Debug.Log("Timestamp: " + eventFailureData.Timestamp);
}
if (eventFailureData.Adid != null)
{
Debug.Log("Adid: " + eventFailureData.Adid);
}
if (eventFailureData.EventToken != null)
{
Debug.Log("EventToken: " + eventFailureData.EventToken);
}
if (eventFailureData.CallbackId != null)
{
Debug.Log("CallbackId: " + eventFailureData.CallbackId);
}
if (eventFailureData.JsonResponse != null)
{
Debug.Log("JsonResponse: " + eventFailureData.GetJsonResponse());
}
Debug.Log("WillRetry: " + eventFailureData.WillRetry.ToString());
}
public void SessionSuccessCallback(AdjustSessionSuccess sessionSuccessData)
{
Debug.Log("Session tracked successfully!");
if (sessionSuccessData.Message != null)
{
Debug.Log("Message: " + sessionSuccessData.Message);
}
if (sessionSuccessData.Timestamp != null)
{
Debug.Log("Timestamp: " + sessionSuccessData.Timestamp);
}
if (sessionSuccessData.Adid != null)
{
Debug.Log("Adid: " + sessionSuccessData.Adid);
}
if (sessionSuccessData.JsonResponse != null)
{
Debug.Log("JsonResponse: " + sessionSuccessData.GetJsonResponse());
}
}
public void SessionFailureCallback(AdjustSessionFailure sessionFailureData)
{
Debug.Log("Session tracking failed!");
if (sessionFailureData.Message != null)
{
Debug.Log("Message: " + sessionFailureData.Message);
}
if (sessionFailureData.Timestamp != null)
{
Debug.Log("Timestamp: " + sessionFailureData.Timestamp);
}
if (sessionFailureData.Adid != null)
{
Debug.Log("Adid: " + sessionFailureData.Adid);
}
if (sessionFailureData.JsonResponse != null)
{
Debug.Log("JsonResponse: " + sessionFailureData.GetJsonResponse());
}
Debug.Log("WillRetry: " + sessionFailureData.WillRetry.ToString());
}
private void DeferredDeeplinkCallback(string deeplinkURL)
{
Debug.Log("Deferred deeplink reported!");
if (deeplinkURL != null)
{
Debug.Log("Deeplink URL: " + deeplinkURL);
}
else
{
Debug.Log("Deeplink URL is null!");
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 196c5c89d4b1e46dfbf423ae77d31a68
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 400000}
- component: {fileID: 11400000}
m_Layer: 0
m_Name: ExampleGUI
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
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 &11400000
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 100000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 196c5c89d4b1e46dfbf423ae77d31a68, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 100000}
m_IsPrefabParent: 1

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 50b53da2a7a154d63a33a49ad08c24a8
NativeFormatImporter:
userData:

View File

@ -0,0 +1,292 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 9
m_Resolution: 1
m_BakeResolution: 50
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666666
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &7284787
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 415478, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 11482148, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: startManually
value: 1
objectReference: {fileID: 0}
- target: {fileID: 11482148, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: logLevel
value: 3
objectReference: {fileID: 0}
- target: {fileID: 11482148, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
propertyPath: appToken
value: '{YourAppToken}'
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: a3267720e82aa41c1a05ab29824902b4, type: 2}
m_IsPrefabParent: 0
--- !u!1 &231489158
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 231489162}
- component: {fileID: 231489161}
- component: {fileID: 231489160}
- component: {fileID: 231489159}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &231489159
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 231489158}
m_Enabled: 1
--- !u!124 &231489160
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 231489158}
m_Enabled: 1
--- !u!20 &231489161
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 231489158}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &231489162
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 231489158}
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!1001 &1861285553
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalPosition.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalPosition.z
value: -10
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 50b53da2a7a154d63a33a49ad08c24a8, type: 2}
m_IsPrefabParent: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6aa8afcd558084586bce9f8efd3eb5d6
timeCreated: 1447689503
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Prefab.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0acdd227ad1b8d147ade044242671e15
folderAsset: yes
timeCreated: 1578652549
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &115478
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 415478}
- component: {fileID: 114179903453641630}
m_Layer: 0
m_Name: Adjust
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &415478
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 115478}
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!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 115478}
m_IsPrefabParent: 1
--- !u!114 &114179903453641630
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 115478}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 525ece82a472e4dea837e1ef938fd15d, type: 3}
m_Name:
m_EditorClassIdentifier:
startManually: 1
appToken:
environment: 0
logLevel: 3
eventBuffering: 0
sendInBackground: 0
launchDeferredDeeplink: 1
needsCost: 0
coppaCompliant: 0
linkMe: 0
defaultTracker:
urlStrategy: 0
startDelay: 0
secretId: 0
info1: 0
info2: 0
info3: 0
info4: 0
preinstallTracking: 0
preinstallFilePath:
playStoreKidsApp: 0
adServicesInfoReading: 1
idfaInfoReading: 1
skAdNetworkHandling: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a3267720e82aa41c1a05ab29824902b4
NativeFormatImporter:
mainObjectFileID: -1
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Unity.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1ac00d53de34e29419cae749db3f6528
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1211
Adjust/Unity/Adjust.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 525ece82a472e4dea837e1ef938fd15d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustAdRevenue
{
internal string source;
internal double? revenue;
internal string currency;
internal int? adImpressionsCount;
internal string adRevenueNetwork;
internal string adRevenueUnit;
internal string adRevenuePlacement;
internal List<string> partnerList;
internal List<string> callbackList;
public AdjustAdRevenue(string source)
{
this.source = source;
}
public void setRevenue(double amount, string currency)
{
this.revenue = amount;
this.currency = currency;
}
public void setAdImpressionsCount(int adImpressionsCount)
{
this.adImpressionsCount = adImpressionsCount;
}
public void setAdRevenueNetwork(string adRevenueNetwork)
{
this.adRevenueNetwork = adRevenueNetwork;
}
public void setAdRevenueUnit(string adRevenueUnit)
{
this.adRevenueUnit = adRevenueUnit;
}
public void setAdRevenuePlacement(string adRevenuePlacement)
{
this.adRevenuePlacement = adRevenuePlacement;
}
public void addCallbackParameter(string key, string value)
{
if (callbackList == null)
{
callbackList = new List<string>();
}
callbackList.Add(key);
callbackList.Add(value);
}
public void addPartnerParameter(string key, string value)
{
if (partnerList == null)
{
partnerList = new List<string>();
}
partnerList.Add(key);
partnerList.Add(value);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 776a9d4b715bc44c68724248a5a75cb9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustAppStorePurchase
{
internal string transactionId;
internal string productId;
internal string receipt;
public AdjustAppStorePurchase(string transactionId, string productId, string receipt)
{
this.transactionId = transactionId;
this.productId = productId;
this.receipt = receipt;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 828a981c8c96741afa5d16ccb679e5af
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustAppStoreSubscription
{
internal string price;
internal string currency;
internal string transactionId;
internal string receipt;
internal string billingStore;
internal string transactionDate;
internal string salesRegion;
internal List<string> partnerList;
internal List<string> callbackList;
public AdjustAppStoreSubscription(string price, string currency, string transactionId, string receipt)
{
this.price = price;
this.currency = currency;
this.transactionId = transactionId;
this.receipt = receipt;
}
public void setTransactionDate(string transactionDate)
{
this.transactionDate = transactionDate;
}
public void setSalesRegion(string salesRegion)
{
this.salesRegion = salesRegion;
}
public void addCallbackParameter(string key, string value)
{
if (callbackList == null)
{
callbackList = new List<string>();
}
callbackList.Add(key);
callbackList.Add(value);
}
public void addPartnerParameter(string key, string value)
{
if (partnerList == null)
{
partnerList = new List<string>();
}
partnerList.Add(key);
partnerList.Add(value);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7e2d69221b1124370a4c016edce5a95a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustAttribution
{
public string adid { get; set; }
public string network { get; set; }
public string adgroup { get; set; }
public string campaign { get; set; }
public string creative { get; set; }
public string clickLabel { get; set; }
public string trackerName { get; set; }
public string trackerToken { get; set; }
public string costType { get; set; }
public double? costAmount { get; set; }
public string costCurrency { get; set; }
// Android only
public string fbInstallReferrer { get; set; }
public AdjustAttribution() {}
public AdjustAttribution(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
trackerName = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTrackerName);
trackerToken = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTrackerToken);
network = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyNetwork);
campaign = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCampaign);
adgroup = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdgroup);
creative = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCreative);
clickLabel = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyClickLabel);
adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
costType = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostType);
try
{
costAmount = double.Parse(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostAmount),
System.Globalization.CultureInfo.InvariantCulture);
}
catch (Exception)
{
// attribution response doesn't contain cost amount attached
// value will default to null
}
costCurrency = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCostCurrency);
fbInstallReferrer = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyFbInstallReferrer);
}
public AdjustAttribution(Dictionary<string, string> dicAttributionData)
{
if (dicAttributionData == null)
{
return;
}
trackerName = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyTrackerName);
trackerToken = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyTrackerToken);
network = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyNetwork);
campaign = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCampaign);
adgroup = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyAdgroup);
creative = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCreative);
clickLabel = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyClickLabel);
adid = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyAdid);
costType = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostType);
try
{
costAmount = double.Parse(AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostAmount),
System.Globalization.CultureInfo.InvariantCulture);
}
catch (Exception)
{
// attribution response doesn't contain cost amount attached
// value will default to null
}
costCurrency = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyCostCurrency);
fbInstallReferrer = AdjustUtils.TryGetValue(dicAttributionData, AdjustUtils.KeyFbInstallReferrer);
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cc46748ad0e664f6d839a4f1a23d9f47
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,328 @@
using System;
namespace com.adjust.sdk
{
public class AdjustConfig
{
public const string AdjustUrlStrategyChina = "china";
public const string AdjustUrlStrategyIndia = "india";
public const string AdjustUrlStrategyCn = "cn";
public const string AdjustUrlStrategyCnOnly = "cn-only";
public const string AdjustDataResidencyEU = "data-residency-eu";
public const string AdjustDataResidencyTR = "data-residency-tr";
public const string AdjustDataResidencyUS = "data-residency-us";
public const string AdjustAdRevenueSourceAppLovinMAX = "applovin_max_sdk";
public const string AdjustAdRevenueSourceMopub = "mopub";
public const string AdjustAdRevenueSourceAdMob = "admob_sdk";
public const string AdjustAdRevenueSourceIronSource = "ironsource_sdk";
public const string AdjustAdRevenueSourceAdmost = "admost_sdk";
public const string AdjustAdRevenueSourceUnity = "unity_sdk";
public const string AdjustAdRevenueSourceHeliumChartboost = "helium_chartboost_sdk";
public const string AdjustAdRevenueSourcePublisher = "publisher_sdk";
public const string AdjustAdRevenueSourceTopOn = "topon_sdk";
public const string AdjustAdRevenueSourceAdx = "adx_sdk";
internal string appToken;
internal string sceneName;
internal string userAgent;
internal string defaultTracker;
internal string externalDeviceId;
internal string urlStrategy;
internal long? info1;
internal long? info2;
internal long? info3;
internal long? info4;
internal long? secretId;
internal double? delayStart;
internal bool? isDeviceKnown;
internal bool? sendInBackground;
internal bool? eventBufferingEnabled;
internal bool? coppaCompliantEnabled;
internal bool? playStoreKidsAppEnabled;
internal bool? allowSuppressLogLevel;
internal bool? needsCost;
internal bool launchDeferredDeeplink;
internal AdjustLogLevel? logLevel;
internal AdjustEnvironment environment;
internal Action<string> deferredDeeplinkDelegate;
internal Action<AdjustEventSuccess> eventSuccessDelegate;
internal Action<AdjustEventFailure> eventFailureDelegate;
internal Action<AdjustSessionSuccess> sessionSuccessDelegate;
internal Action<AdjustSessionFailure> sessionFailureDelegate;
internal Action<AdjustAttribution> attributionChangedDelegate;
internal Action<int> conversionValueUpdatedDelegate;
internal Action<int, string, bool> skad4ConversionValueUpdatedDelegate;
// Android specific members
internal string processName;
internal bool? readImei;
internal bool? preinstallTrackingEnabled;
internal string preinstallFilePath;
internal bool? finalAndroidAttributionEnabled;
internal string fbAppId;
internal bool? readDeviceInfoOnceEnabled;
// iOS specific members
internal bool? allowAdServicesInfoReading;
internal bool? allowIdfaReading;
internal bool? skAdNetworkHandling;
internal bool? linkMeEnabled;
internal int? attConsentWaitingInterval;
// Windows specific members
internal Action<String> logDelegate;
public AdjustConfig(string appToken, AdjustEnvironment environment)
{
this.sceneName = "";
this.processName = "";
this.appToken = appToken;
this.environment = environment;
}
public AdjustConfig(string appToken, AdjustEnvironment environment, bool allowSuppressLogLevel)
{
this.sceneName = "";
this.processName = "";
this.appToken = appToken;
this.environment = environment;
this.allowSuppressLogLevel = allowSuppressLogLevel;
}
public void setLogLevel(AdjustLogLevel logLevel)
{
this.logLevel = logLevel;
}
public void setDefaultTracker(string defaultTracker)
{
this.defaultTracker = defaultTracker;
}
public void setExternalDeviceId(string externalDeviceId)
{
this.externalDeviceId = externalDeviceId;
}
public void setLaunchDeferredDeeplink(bool launchDeferredDeeplink)
{
this.launchDeferredDeeplink = launchDeferredDeeplink;
}
public void setSendInBackground(bool sendInBackground)
{
this.sendInBackground = sendInBackground;
}
public void setEventBufferingEnabled(bool eventBufferingEnabled)
{
this.eventBufferingEnabled = eventBufferingEnabled;
}
public void setCoppaCompliantEnabled(bool coppaCompliantEnabled)
{
this.coppaCompliantEnabled = coppaCompliantEnabled;
}
public void setNeedsCost(bool needsCost)
{
this.needsCost = needsCost;
}
public void setDelayStart(double delayStart)
{
this.delayStart = delayStart;
}
public void setUserAgent(string userAgent)
{
this.userAgent = userAgent;
}
public void setIsDeviceKnown(bool isDeviceKnown)
{
this.isDeviceKnown = isDeviceKnown;
}
public void setUrlStrategy(String urlStrategy)
{
this.urlStrategy = urlStrategy;
}
public void setAppSecret(long secretId, long info1, long info2, long info3, long info4)
{
this.secretId = secretId;
this.info1 = info1;
this.info2 = info2;
this.info3 = info3;
this.info4 = info4;
}
public void setDeferredDeeplinkDelegate(Action<string> deferredDeeplinkDelegate, string sceneName = "Adjust")
{
this.deferredDeeplinkDelegate = deferredDeeplinkDelegate;
this.sceneName = sceneName;
}
public Action<string> getDeferredDeeplinkDelegate()
{
return this.deferredDeeplinkDelegate;
}
public void setAttributionChangedDelegate(Action<AdjustAttribution> attributionChangedDelegate, string sceneName = "Adjust")
{
this.attributionChangedDelegate = attributionChangedDelegate;
this.sceneName = sceneName;
}
public Action<AdjustAttribution> getAttributionChangedDelegate()
{
return this.attributionChangedDelegate;
}
public void setEventSuccessDelegate(Action<AdjustEventSuccess> eventSuccessDelegate, string sceneName = "Adjust")
{
this.eventSuccessDelegate = eventSuccessDelegate;
this.sceneName = sceneName;
}
public Action<AdjustEventSuccess> getEventSuccessDelegate()
{
return this.eventSuccessDelegate;
}
public void setEventFailureDelegate(Action<AdjustEventFailure> eventFailureDelegate, string sceneName = "Adjust")
{
this.eventFailureDelegate = eventFailureDelegate;
this.sceneName = sceneName;
}
public Action<AdjustEventFailure> getEventFailureDelegate()
{
return this.eventFailureDelegate;
}
public void setSessionSuccessDelegate(Action<AdjustSessionSuccess> sessionSuccessDelegate, string sceneName = "Adjust")
{
this.sessionSuccessDelegate = sessionSuccessDelegate;
this.sceneName = sceneName;
}
public Action<AdjustSessionSuccess> getSessionSuccessDelegate()
{
return this.sessionSuccessDelegate;
}
public void setSessionFailureDelegate(Action<AdjustSessionFailure> sessionFailureDelegate, string sceneName = "Adjust")
{
this.sessionFailureDelegate = sessionFailureDelegate;
this.sceneName = sceneName;
}
public Action<AdjustSessionFailure> getSessionFailureDelegate()
{
return this.sessionFailureDelegate;
}
// iOS specific methods.
[Obsolete("This is an obsolete method. Apple Search Ads attribution with usage of iAd.framework has been sunset by Apple as of February 7th 2023.")]
public void setAllowiAdInfoReading(bool allowiAdInfoReading)
{
}
public void setAllowAdServicesInfoReading(bool allowAdServicesInfoReading)
{
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
}
public void setAllowIdfaReading(bool allowIdfaReading)
{
this.allowIdfaReading = allowIdfaReading;
}
public void deactivateSKAdNetworkHandling()
{
this.skAdNetworkHandling = true;
}
public void setLinkMeEnabled(bool linkMeEnabled)
{
this.linkMeEnabled = linkMeEnabled;
}
public void setConversionValueUpdatedDelegate(Action<int> conversionValueUpdatedDelegate, string sceneName = "Adjust")
{
this.conversionValueUpdatedDelegate = conversionValueUpdatedDelegate;
this.sceneName = sceneName;
}
public Action<int> getConversionValueUpdatedDelegate()
{
return this.conversionValueUpdatedDelegate;
}
public void setSkad4ConversionValueUpdatedDelegate(Action<int, string, bool> skad4ConversionValueUpdatedDelegate, string sceneName = "Adjust")
{
this.skad4ConversionValueUpdatedDelegate = skad4ConversionValueUpdatedDelegate;
this.sceneName = sceneName;
}
public Action<int, string, bool> getSkad4ConversionValueUpdatedDelegate()
{
return this.skad4ConversionValueUpdatedDelegate;
}
public void setAttConsentWaitingInterval(int numberOfSeconds)
{
this.attConsentWaitingInterval = numberOfSeconds;
}
// Android specific methods.
public void setProcessName(string processName)
{
this.processName = processName;
}
[Obsolete("This is an obsolete method.")]
public void setReadMobileEquipmentIdentity(bool readMobileEquipmentIdentity)
{
// this.readImei = readMobileEquipmentIdentity;
}
public void setPreinstallTrackingEnabled(bool preinstallTrackingEnabled)
{
this.preinstallTrackingEnabled = preinstallTrackingEnabled;
}
public void setPreinstallFilePath(string preinstallFilePath)
{
this.preinstallFilePath = preinstallFilePath;
}
public void setPlayStoreKidsAppEnabled(bool playStoreKidsAppEnabled)
{
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
}
public void setFinalAndroidAttributionEnabled(bool finalAndroidAttributionEnabled)
{
this.finalAndroidAttributionEnabled = finalAndroidAttributionEnabled;
}
public void setFbAppId(string fbAppId)
{
this.fbAppId = fbAppId;
}
public void setReadDeviceInfoOnceEnabled(bool readDeviceInfoOnceEnabled)
{
this.readDeviceInfoOnceEnabled = readDeviceInfoOnceEnabled;
}
// Windows specific methods.
public void setLogDelegate(Action<String> logDelegate)
{
this.logDelegate = logDelegate;
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02d4cad14fc094b17afde3b685897e5e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,25 @@
namespace com.adjust.sdk
{
[System.Serializable]
public enum AdjustEnvironment
{
Sandbox,
Production
}
public static class AdjustEnvironmentExtension
{
public static string ToLowercaseString(this AdjustEnvironment adjustEnvironment)
{
switch (adjustEnvironment)
{
case AdjustEnvironment.Sandbox:
return "sandbox";
case AdjustEnvironment.Production:
return "production";
default:
return "unknown";
}
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 633f6fa279b2244fdb999db0441f9aac
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustEvent
{
internal string currency;
internal string eventToken;
internal string callbackId;
internal string transactionId;
internal string productId;
internal double? revenue;
internal List<string> partnerList;
internal List<string> callbackList;
// iOS specific members
internal string receipt;
internal bool isReceiptSet;
// Android specific members
internal string purchaseToken;
public AdjustEvent(string eventToken)
{
this.eventToken = eventToken;
this.isReceiptSet = false;
}
public void setRevenue(double amount, string currency)
{
this.revenue = amount;
this.currency = currency;
}
public void addCallbackParameter(string key, string value)
{
if (callbackList == null)
{
callbackList = new List<string>();
}
callbackList.Add(key);
callbackList.Add(value);
}
public void addPartnerParameter(string key, string value)
{
if (partnerList == null)
{
partnerList = new List<string>();
}
partnerList.Add(key);
partnerList.Add(value);
}
public void setCallbackId(string callbackId)
{
this.callbackId = callbackId;
}
// iOS / Android mixed
public void setTransactionId(string transactionId)
{
this.transactionId = transactionId;
}
public void setProductId(string productId)
{
this.productId = productId;
}
// iOS specific methods
[Obsolete("This is an obsolete method. Please use separate setter methods for purchase verification parameters.")]
public void setReceipt(string receipt, string transactionId)
{
// this.receipt = receipt;
// this.transactionId = transactionId;
// this.isReceiptSet = true;
}
public void setReceipt(string receipt)
{
this.receipt = receipt;
}
// Android specific methods
public void setPurchaseToken(string purchaseToken)
{
this.purchaseToken = purchaseToken;
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cd89f7713977f497a862f1a1b6f60933
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustEventFailure
{
public string Adid { get; set; }
public string Message { get; set; }
public string Timestamp { get; set; }
public string EventToken { get; set; }
public string CallbackId { get; set; }
public bool WillRetry { get; set; }
public Dictionary<string, object> JsonResponse { get; set; }
public AdjustEventFailure() {}
public AdjustEventFailure(Dictionary<string, string> eventFailureDataMap)
{
if (eventFailureDataMap == null)
{
return;
}
Adid = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyAdid);
Message = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyTimestamp);
EventToken = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyEventToken);
CallbackId = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyCallbackId);
bool willRetry;
if (bool.TryParse(AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyWillRetry), out willRetry))
{
WillRetry = willRetry;
}
string jsonResponseString = AdjustUtils.TryGetValue(eventFailureDataMap, AdjustUtils.KeyJsonResponse);
var jsonResponseNode = JSON.Parse(jsonResponseString);
if (jsonResponseNode != null && jsonResponseNode.AsObject != null)
{
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
}
public AdjustEventFailure(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
Adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
Message = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTimestamp);
EventToken = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyEventToken);
CallbackId = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCallbackId);
WillRetry = Convert.ToBoolean(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyWillRetry));
var jsonResponseNode = jsonNode[AdjustUtils.KeyJsonResponse];
if (jsonResponseNode == null)
{
return;
}
if (jsonResponseNode.AsObject == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
public void BuildJsonResponseFromString(string jsonResponseString)
{
var jsonNode = JSON.Parse(jsonResponseString);
if (jsonNode == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonNode.AsObject, JsonResponse);
}
public string GetJsonResponse()
{
return AdjustUtils.GetJsonResponseCompact(JsonResponse);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ea86cd4e1c6d0496397920902d0f0b5f
timeCreated: 1458128791
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustEventSuccess
{
public string Adid { get; set; }
public string Message { get; set; }
public string Timestamp { get; set; }
public string EventToken { get; set; }
public string CallbackId { get; set; }
public Dictionary<string, object> JsonResponse { get; set; }
public AdjustEventSuccess() {}
public AdjustEventSuccess(Dictionary<string, string> eventSuccessDataMap)
{
if (eventSuccessDataMap == null)
{
return;
}
Adid = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyAdid);
Message = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyTimestamp);
EventToken = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyEventToken);
CallbackId = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyCallbackId);
string jsonResponseString = AdjustUtils.TryGetValue(eventSuccessDataMap, AdjustUtils.KeyJsonResponse);
var jsonResponseNode = JSON.Parse(jsonResponseString);
if (jsonResponseNode != null && jsonResponseNode.AsObject != null)
{
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
}
public AdjustEventSuccess(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
Adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
Message = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTimestamp);
EventToken = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyEventToken);
CallbackId = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCallbackId);
var jsonResponseNode = jsonNode[AdjustUtils.KeyJsonResponse];
if (jsonResponseNode == null)
{
return;
}
if (jsonResponseNode.AsObject == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
public void BuildJsonResponseFromString(string jsonResponseString)
{
var jsonNode = JSON.Parse(jsonResponseString);
if (jsonNode == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonNode.AsObject, JsonResponse);
}
public string GetJsonResponse()
{
return AdjustUtils.GetJsonResponseCompact(JsonResponse);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 1957a0e6e9aa14f0e8adefa2120f1e02
timeCreated: 1458128791
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
namespace com.adjust.sdk
{
[System.Serializable]
public enum AdjustLogLevel
{
Verbose = 1,
Debug,
Info,
Warn,
Error,
Assert,
Suppress
}
public static class AdjustLogLevelExtension
{
public static string ToLowercaseString(this AdjustLogLevel AdjustLogLevel)
{
switch (AdjustLogLevel)
{
case AdjustLogLevel.Verbose:
return "verbose";
case AdjustLogLevel.Debug:
return "debug";
case AdjustLogLevel.Info:
return "info";
case AdjustLogLevel.Warn:
return "warn";
case AdjustLogLevel.Error:
return "error";
case AdjustLogLevel.Assert:
return "assert";
case AdjustLogLevel.Suppress:
return "suppress";
default:
return "unknown";
}
}
public static string ToUppercaseString(this AdjustLogLevel AdjustLogLevel)
{
switch (AdjustLogLevel)
{
case AdjustLogLevel.Verbose:
return "VERBOSE";
case AdjustLogLevel.Debug:
return "DEBUG";
case AdjustLogLevel.Info:
return "INFO";
case AdjustLogLevel.Warn:
return "WARN";
case AdjustLogLevel.Error:
return "ERROR";
case AdjustLogLevel.Assert:
return "ASSERT";
case AdjustLogLevel.Suppress:
return "SUPPRESS";
default:
return "UNKNOWN";
}
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 428ab44990df24973902248a9d2b43dd
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustPlayStorePurchase
{
internal string productId;
internal string purchaseToken;
public AdjustPlayStorePurchase(string productId, string purchaseToken)
{
this.productId = productId;
this.purchaseToken = purchaseToken;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d875a71a5aeb1496d93afac749ab17f6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustPlayStoreSubscription
{
internal string price;
internal string currency;
internal string sku;
internal string orderId;
internal string signature;
internal string purchaseToken;
internal string billingStore;
internal string purchaseTime;
internal List<string> partnerList;
internal List<string> callbackList;
public AdjustPlayStoreSubscription(string price, string currency, string sku, string orderId, string signature, string purchaseToken)
{
this.price = price;
this.currency = currency;
this.sku = sku;
this.orderId = orderId;
this.signature = signature;
this.purchaseToken = purchaseToken;
}
public void setPurchaseTime(string purchaseTime)
{
this.purchaseTime = purchaseTime;
}
public void addCallbackParameter(string key, string value)
{
if (callbackList == null)
{
callbackList = new List<string>();
}
callbackList.Add(key);
callbackList.Add(value);
}
public void addPartnerParameter(string key, string value)
{
if (partnerList == null)
{
partnerList = new List<string>();
}
partnerList.Add(key);
partnerList.Add(value);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69e7a4074abb44758b3f011d8352a57a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustPurchaseVerificationInfo
{
#region Properties
public int code { get; set; }
public string message { get; set; }
public string verificationStatus { get; set; }
#endregion
#region Constructors
public AdjustPurchaseVerificationInfo()
{
}
public AdjustPurchaseVerificationInfo(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
string stringCode = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyCode);
code = Int32.Parse(stringCode);
message = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyMessage);
verificationStatus = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyVerificationStatus);
}
#endregion
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c0c97a5152b31474d89bc1ba521644de
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustSessionFailure
{
public string Adid { get; set; }
public string Message { get; set; }
public string Timestamp { get; set; }
public bool WillRetry { get; set; }
public Dictionary<string, object> JsonResponse { get; set; }
public AdjustSessionFailure() {}
public AdjustSessionFailure(Dictionary<string, string> sessionFailureDataMap)
{
if (sessionFailureDataMap == null)
{
return;
}
Adid = AdjustUtils.TryGetValue(sessionFailureDataMap, AdjustUtils.KeyAdid);
Message = AdjustUtils.TryGetValue(sessionFailureDataMap, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.TryGetValue(sessionFailureDataMap, AdjustUtils.KeyTimestamp);
bool willRetry;
if (bool.TryParse(AdjustUtils.TryGetValue(sessionFailureDataMap, AdjustUtils.KeyWillRetry), out willRetry))
{
WillRetry = willRetry;
}
string jsonResponseString = AdjustUtils.TryGetValue(sessionFailureDataMap, AdjustUtils.KeyJsonResponse);
var jsonResponseNode = JSON.Parse(jsonResponseString);
if (jsonResponseNode != null && jsonResponseNode.AsObject != null)
{
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
}
public AdjustSessionFailure(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
Adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
Message = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTimestamp);
WillRetry = Convert.ToBoolean(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyWillRetry));
var jsonResponseNode = jsonNode[AdjustUtils.KeyJsonResponse];
if (jsonResponseNode == null)
{
return;
}
if (jsonResponseNode.AsObject == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
public void BuildJsonResponseFromString(string jsonResponseString)
{
var jsonNode = JSON.Parse(jsonResponseString);
if (jsonNode == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonNode.AsObject, JsonResponse);
}
public string GetJsonResponse()
{
return AdjustUtils.GetJsonResponseCompact(JsonResponse);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b4de268ab985448a594fb82264190742
timeCreated: 1458128791
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustSessionSuccess
{
public string Adid { get; set; }
public string Message { get; set; }
public string Timestamp { get; set; }
public Dictionary<string, object> JsonResponse { get; set; }
public AdjustSessionSuccess() {}
public AdjustSessionSuccess(Dictionary<string, string> sessionSuccessDataMap)
{
if (sessionSuccessDataMap == null)
{
return;
}
Adid = AdjustUtils.TryGetValue(sessionSuccessDataMap, AdjustUtils.KeyAdid);
Message = AdjustUtils.TryGetValue(sessionSuccessDataMap, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.TryGetValue(sessionSuccessDataMap, AdjustUtils.KeyTimestamp);
string jsonResponseString = AdjustUtils.TryGetValue(sessionSuccessDataMap, AdjustUtils.KeyJsonResponse);
var jsonResponseNode = JSON.Parse(jsonResponseString);
if (jsonResponseNode != null && jsonResponseNode.AsObject != null)
{
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
}
public AdjustSessionSuccess(string jsonString)
{
var jsonNode = JSON.Parse(jsonString);
if (jsonNode == null)
{
return;
}
Adid = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyAdid);
Message = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyMessage);
Timestamp = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeyTimestamp);
var jsonResponseNode = jsonNode[AdjustUtils.KeyJsonResponse];
if (jsonResponseNode == null)
{
return;
}
if (jsonResponseNode.AsObject == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonResponseNode.AsObject, JsonResponse);
}
public void BuildJsonResponseFromString(string jsonResponseString)
{
var jsonNode = JSON.Parse(jsonResponseString);
if (jsonNode == null)
{
return;
}
JsonResponse = new Dictionary<string, object>();
AdjustUtils.WriteJsonResponseDictionary(jsonNode.AsObject, JsonResponse);
}
public string GetJsonResponse()
{
return AdjustUtils.GetJsonResponseCompact(JsonResponse);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c23847e7a1f464d7a8c7f9b35829af17
timeCreated: 1458128791
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
namespace com.adjust.sdk
{
public class AdjustThirdPartySharing
{
internal bool? isEnabled;
internal Dictionary<string, List<string>> granularOptions;
internal Dictionary<string, List<string>> partnerSharingSettings;
public AdjustThirdPartySharing(bool? isEnabled)
{
this.isEnabled = isEnabled;
this.granularOptions = new Dictionary<string, List<string>>();
this.partnerSharingSettings = new Dictionary<string, List<string>>();
}
public void addGranularOption(string partnerName, string key, string value)
{
// TODO: consider to add some logs about the error case
if (partnerName == null || key == null || value == null)
{
return;
}
List<string> partnerOptions;
if (granularOptions.ContainsKey(partnerName))
{
partnerOptions = granularOptions[partnerName];
}
else
{
partnerOptions = new List<string>();
granularOptions.Add(partnerName, partnerOptions);
}
partnerOptions.Add(key);
partnerOptions.Add(value);
}
public void addPartnerSharingSetting(string partnerName, string key, bool value)
{
// TODO: consider to add some logs about the error case
if (partnerName == null || key == null)
{
return;
}
List<string> partnerSharingSetting;
if (partnerSharingSettings.ContainsKey(partnerName))
{
partnerSharingSetting = partnerSharingSettings[partnerName];
}
else
{
partnerSharingSetting = new List<string>();
partnerSharingSettings.Add(partnerName, partnerSharingSetting);
}
partnerSharingSetting.Add(key);
partnerSharingSetting.Add(value.ToString());
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dcb2591dfab904327904b8879af699ca
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,30 @@
namespace com.adjust.sdk
{
[System.Serializable]
public enum AdjustUrlStrategy
{
Default,
DataResidencyEU,
DataResidencyTK,
DataResidencyUS,
India,
China,
}
public static class AdjustUrlStrategyExtension
{
public static string ToLowerCaseString(this AdjustUrlStrategy strategy)
{
switch (strategy)
{
case AdjustUrlStrategy.India: return "india";
case AdjustUrlStrategy.China: return "china";
case AdjustUrlStrategy.DataResidencyEU: return "data-residency-eu";
case AdjustUrlStrategy.DataResidencyTK: return "data-residency-tr";
case AdjustUrlStrategy.DataResidencyUS: return "data-residency-us";
default: return string.Empty;
}
}
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 034243ca816f644dc97675a908e24e8c
timeCreated: 1617092915
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

374
Adjust/Unity/AdjustUtils.cs Normal file
View File

@ -0,0 +1,374 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace com.adjust.sdk
{
public class AdjustUtils
{
public static string KeyAdid = "adid";
public static string KeyMessage = "message";
public static string KeyNetwork = "network";
public static string KeyAdgroup = "adgroup";
public static string KeyCampaign = "campaign";
public static string KeyCreative = "creative";
public static string KeyWillRetry = "willRetry";
public static string KeyTimestamp = "timestamp";
public static string KeyCallbackId = "callbackId";
public static string KeyEventToken = "eventToken";
public static string KeyClickLabel = "clickLabel";
public static string KeyTrackerName = "trackerName";
public static string KeyTrackerToken = "trackerToken";
public static string KeyJsonResponse = "jsonResponse";
public static string KeyCostType = "costType";
public static string KeyCostAmount = "costAmount";
public static string KeyCostCurrency = "costCurrency";
public static string KeyFbInstallReferrer = "fbInstallReferrer";
public static string KeySkadConversionValue = "fineValue";
public static string KeySkadCoarseValue = "coarseValue";
public static string KeySkadLockWindow = "lockWindow";
public static string KeyCode = "code";
public static string KeyVerificationStatus = "verificationStatus";
// For testing purposes.
public static string KeyTestOptionsBaseUrl = "baseUrl";
public static string KeyTestOptionsGdprUrl = "gdprUrl";
public static string KeyTestOptionsSubscriptionUrl = "subscriptionUrl";
public static string KeyTestOptionsPurchaseVerificationUrl = "purchaseVerificationUrl";
public static string KeyTestOptionsExtraPath = "extraPath";
public static string KeyTestOptionsBasePath = "basePath";
public static string KeyTestOptionsGdprPath = "gdprPath";
public static string KeyTestOptionsDeleteState = "deleteState";
public static string KeyTestOptionsUseTestConnectionOptions = "useTestConnectionOptions";
public static string KeyTestOptionsTimerIntervalInMilliseconds = "timerIntervalInMilliseconds";
public static string KeyTestOptionsTimerStartInMilliseconds = "timerStartInMilliseconds";
public static string KeyTestOptionsSessionIntervalInMilliseconds = "sessionIntervalInMilliseconds";
public static string KeyTestOptionsSubsessionIntervalInMilliseconds = "subsessionIntervalInMilliseconds";
public static string KeyTestOptionsTeardown = "teardown";
public static string KeyTestOptionsNoBackoffWait = "noBackoffWait";
public static string KeyTestOptionsAdServicesFrameworkEnabled = "adServicesFrameworkEnabled";
public static int ConvertLogLevel(AdjustLogLevel? logLevel)
{
if (logLevel == null)
{
return -1;
}
return (int)logLevel;
}
public static int ConvertBool(bool? value)
{
if (value == null)
{
return -1;
}
if (value.Value)
{
return 1;
}
else
{
return 0;
}
}
public static double ConvertDouble(double? value)
{
if (value == null)
{
return -1;
}
return (double)value;
}
public static int ConvertInt(int? value)
{
if (value == null)
{
return -1;
}
return (int)value;
}
public static long ConvertLong(long? value)
{
if (value == null)
{
return -1;
}
return (long)value;
}
public static string ConvertListToJson(List<String> list)
{
if (list == null)
{
return null;
}
// list of callback / partner parameters must contain even number of elements
if (list.Count % 2 != 0)
{
return null;
}
List<String> processedList = new List<String>();
for (int i = 0; i < list.Count; i += 2)
{
String key = list[i];
String value = list[i + 1];
if (key == null || value == null)
{
continue;
}
processedList.Add(key);
processedList.Add(value);
}
// create JSON array
var jsonArray = new JSONArray();
foreach (var listItem in processedList)
{
jsonArray.Add(new JSONData(listItem));
}
return jsonArray.ToString();
}
public static string GetJsonResponseCompact(Dictionary<string, object> dictionary)
{
string logJsonResponse = "";
if (dictionary == null)
{
return logJsonResponse;
}
else
{
int preLoopCounter = 0;
logJsonResponse += "{";
foreach (KeyValuePair<string, object> pair in dictionary)
{
String valueString = pair.Value as string;
if (valueString != null)
{
if (++preLoopCounter > 1)
{
logJsonResponse += ",";
}
// if the value is another JSON/complex-structure
if (valueString.StartsWith("{") && valueString.EndsWith("}"))
{
logJsonResponse += "\"" + pair.Key + "\"" + ":" + valueString;
}
else
{
logJsonResponse += "\"" + pair.Key + "\"" + ":" + "\"" + valueString + "\"";
}
continue;
}
Dictionary<string, object> valueDictionary = pair.Value as Dictionary<string, object>;
if (++preLoopCounter > 1)
{
logJsonResponse += ",";
}
logJsonResponse += "\"" + pair.Key + "\"" + ":";
logJsonResponse += GetJsonResponseCompact(valueDictionary);
}
logJsonResponse += "}";
}
return logJsonResponse;
}
public static String GetJsonString(JSONNode node, string key)
{
if (node == null)
{
return null;
}
// Access value object and cast it to JSONData.
var nodeValue = node[key] as JSONData;
if (nodeValue == null)
{
return null;
}
// https://github.com/adjust/unity_sdk/issues/137
if (nodeValue == "")
{
return null;
}
return nodeValue.Value;
}
public static void WriteJsonResponseDictionary(JSONClass jsonObject, Dictionary<string, object> output)
{
foreach (KeyValuePair<string, JSONNode> pair in jsonObject)
{
// Try to cast value as a complex object.
var subNode = pair.Value.AsObject;
var key = pair.Key;
// Value is not a complex object.
if (subNode == null)
{
var value = pair.Value.Value;
output.Add(key, value);
continue;
}
// Create new dictionary for complex type.
var newSubDictionary = new Dictionary<string, object>();
// Save it in the current dictionary.
output.Add(key, newSubDictionary);
// Recursive call to fill new dictionary.
WriteJsonResponseDictionary(subNode, newSubDictionary);
}
}
public static string TryGetValue(Dictionary<string, string> dictionary, string key)
{
string value;
if (dictionary.TryGetValue(key, out value))
{
// https://github.com/adjust/unity_sdk/issues/137
if (value == "")
{
return null;
}
return value;
}
return null;
}
public static int GetSkad4ConversionValue(string conversionValueUpdate)
{
var jsonNode = JSON.Parse(conversionValueUpdate);
if (jsonNode == null)
{
return -1;
}
string strConversionValue = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeySkadConversionValue);
int conversionValue = 0;
if (Int32.TryParse(strConversionValue, out conversionValue))
{
return conversionValue;
}
else
{
return -1;
}
}
public static string GetSkad4CoarseValue(string conversionValueUpdate)
{
var jsonNode = JSON.Parse(conversionValueUpdate);
if (jsonNode == null)
{
return null;
}
string coarseValue = AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeySkadCoarseValue);
return coarseValue;
}
public static bool GetSkad4LockWindow(string conversionValueUpdate)
{
var jsonNode = JSON.Parse(conversionValueUpdate);
if (jsonNode == null)
{
return false;
}
bool lockWindow = Convert.ToBoolean(AdjustUtils.GetJsonString(jsonNode, AdjustUtils.KeySkadLockWindow));
return lockWindow;
}
#if UNITY_ANDROID
public static AndroidJavaObject TestOptionsMap2AndroidJavaObject(Dictionary<string, string> testOptionsMap, AndroidJavaObject ajoCurrentActivity)
{
AndroidJavaObject ajoTestOptions = new AndroidJavaObject("com.adjust.sdk.AdjustTestOptions");
ajoTestOptions.Set<String>("baseUrl", testOptionsMap[KeyTestOptionsBaseUrl]);
ajoTestOptions.Set<String>("gdprUrl", testOptionsMap[KeyTestOptionsGdprUrl]);
ajoTestOptions.Set<String>("subscriptionUrl", testOptionsMap[KeyTestOptionsSubscriptionUrl]);
ajoTestOptions.Set<String>("purchaseVerificationUrl", testOptionsMap[KeyTestOptionsPurchaseVerificationUrl]);
if (testOptionsMap.ContainsKey(KeyTestOptionsExtraPath) && !string.IsNullOrEmpty(testOptionsMap[KeyTestOptionsExtraPath]))
{
ajoTestOptions.Set<String>("basePath", testOptionsMap[KeyTestOptionsExtraPath]);
ajoTestOptions.Set<String>("gdprPath", testOptionsMap[KeyTestOptionsExtraPath]);
ajoTestOptions.Set<String>("subscriptionPath", testOptionsMap[KeyTestOptionsExtraPath]);
ajoTestOptions.Set<String>("purchaseVerificationPath", testOptionsMap[KeyTestOptionsExtraPath]);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsDeleteState) && ajoCurrentActivity != null)
{
ajoTestOptions.Set<AndroidJavaObject>("context", ajoCurrentActivity);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsUseTestConnectionOptions))
{
bool useTestConnectionOptions = testOptionsMap[KeyTestOptionsUseTestConnectionOptions].ToLower() == "true";
AndroidJavaObject ajoUseTestConnectionOptions = new AndroidJavaObject("java.lang.Boolean", useTestConnectionOptions);
ajoTestOptions.Set<AndroidJavaObject>("useTestConnectionOptions", ajoUseTestConnectionOptions);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsTimerIntervalInMilliseconds))
{
var timerIntervalInMilliseconds = long.Parse(testOptionsMap[KeyTestOptionsTimerIntervalInMilliseconds]);
AndroidJavaObject ajoTimerIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", timerIntervalInMilliseconds);
ajoTestOptions.Set<AndroidJavaObject>("timerIntervalInMilliseconds", ajoTimerIntervalInMilliseconds);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsTimerStartInMilliseconds))
{
var timerStartInMilliseconds = long.Parse(testOptionsMap[KeyTestOptionsTimerStartInMilliseconds]);
AndroidJavaObject ajoTimerStartInMilliseconds = new AndroidJavaObject("java.lang.Long", timerStartInMilliseconds);
ajoTestOptions.Set<AndroidJavaObject>("timerStartInMilliseconds", ajoTimerStartInMilliseconds);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsSessionIntervalInMilliseconds))
{
var sessionIntervalInMilliseconds = long.Parse(testOptionsMap[KeyTestOptionsSessionIntervalInMilliseconds]);
AndroidJavaObject ajoSessionIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", sessionIntervalInMilliseconds);
ajoTestOptions.Set<AndroidJavaObject>("sessionIntervalInMilliseconds", ajoSessionIntervalInMilliseconds);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsSubsessionIntervalInMilliseconds))
{
var subsessionIntervalInMilliseconds = long.Parse(testOptionsMap[KeyTestOptionsSubsessionIntervalInMilliseconds]);
AndroidJavaObject ajoSubsessionIntervalInMilliseconds = new AndroidJavaObject("java.lang.Long", subsessionIntervalInMilliseconds);
ajoTestOptions.Set<AndroidJavaObject>("subsessionIntervalInMilliseconds", ajoSubsessionIntervalInMilliseconds);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsTeardown))
{
bool teardown = testOptionsMap[KeyTestOptionsTeardown].ToLower() == "true";
AndroidJavaObject ajoTeardown = new AndroidJavaObject("java.lang.Boolean", teardown);
ajoTestOptions.Set<AndroidJavaObject>("teardown", ajoTeardown);
}
if (testOptionsMap.ContainsKey(KeyTestOptionsNoBackoffWait))
{
bool noBackoffWait = testOptionsMap[KeyTestOptionsNoBackoffWait].ToLower() == "true";
AndroidJavaObject ajoNoBackoffWait = new AndroidJavaObject("java.lang.Boolean", noBackoffWait);
ajoTestOptions.Set<AndroidJavaObject>("noBackoffWait", ajoNoBackoffWait);
}
return ajoTestOptions;
}
#endif
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 98e51a1481cc24ddebf93f61f6c1eb9d
timeCreated: 1458230617
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Windows.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b2eaef4e025b6a64c942a8a88ad33333
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,340 @@
#if UNITY_WSA
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
#if UNITY_WSA_10_0
using Win10Interface;
#elif UNITY_WP_8_1
using Win81Interface;
#elif UNITY_WSA
using WinWsInterface;
#endif
namespace com.adjust.sdk
{
public class AdjustWindows
{
private const string sdkPrefix = "unity4.36.0";
private static bool appLaunched = false;
public static void Start(AdjustConfig adjustConfig)
{
string logLevelString = null;
string environment = adjustConfig.environment.ToLowercaseString();
Action<Dictionary<string, string>> attributionChangedAction = null;
Action<Dictionary<string, string>> sessionSuccessChangedAction = null;
Action<Dictionary<string, string>> sessionFailureChangedAction = null;
Action<Dictionary<string, string>> eventSuccessChangedAction = null;
Action<Dictionary<string, string>> eventFailureChangedAction = null;
Func<string, bool> deeplinkResponseFunc = null;
if (adjustConfig.logLevel.HasValue)
{
logLevelString = adjustConfig.logLevel.Value.ToLowercaseString();
}
if (adjustConfig.attributionChangedDelegate != null)
{
attributionChangedAction = (attributionMap) =>
{
var attribution = new AdjustAttribution(attributionMap);
adjustConfig.attributionChangedDelegate(attribution);
};
}
if (adjustConfig.sessionSuccessDelegate != null)
{
sessionSuccessChangedAction = (sessionMap) =>
{
var sessionData = new AdjustSessionSuccess(sessionMap);
adjustConfig.sessionSuccessDelegate(sessionData);
};
}
if (adjustConfig.sessionFailureDelegate != null)
{
sessionFailureChangedAction = (sessionMap) =>
{
var sessionData = new AdjustSessionFailure(sessionMap);
adjustConfig.sessionFailureDelegate(sessionData);
};
}
if (adjustConfig.eventSuccessDelegate != null)
{
eventSuccessChangedAction = (eventMap) =>
{
var eventData = new AdjustEventSuccess(eventMap);
adjustConfig.eventSuccessDelegate(eventData);
};
}
if (adjustConfig.eventFailureDelegate != null)
{
eventFailureChangedAction = (eventMap) =>
{
var eventData = new AdjustEventFailure(eventMap);
adjustConfig.eventFailureDelegate(eventData);
};
}
if (adjustConfig.deferredDeeplinkDelegate != null)
{
deeplinkResponseFunc = uri =>
{
if (adjustConfig.launchDeferredDeeplink)
{
adjustConfig.deferredDeeplinkDelegate(uri);
}
return adjustConfig.launchDeferredDeeplink;
};
}
bool sendInBackground = false;
if (adjustConfig.sendInBackground.HasValue)
{
sendInBackground = adjustConfig.sendInBackground.Value;
}
double delayStartSeconds = 0;
if (adjustConfig.delayStart.HasValue)
{
delayStartSeconds = adjustConfig.delayStart.Value;
}
AdjustConfigDto adjustConfigDto = new AdjustConfigDto {
AppToken = adjustConfig.appToken,
Environment = environment,
SdkPrefix = sdkPrefix,
SendInBackground = sendInBackground,
DelayStart = delayStartSeconds,
UserAgent = adjustConfig.userAgent,
DefaultTracker = adjustConfig.defaultTracker,
EventBufferingEnabled = adjustConfig.eventBufferingEnabled,
LaunchDeferredDeeplink = adjustConfig.launchDeferredDeeplink,
LogLevelString = logLevelString,
LogDelegate = adjustConfig.logDelegate,
ActionAttributionChangedData = attributionChangedAction,
ActionSessionSuccessData = sessionSuccessChangedAction,
ActionSessionFailureData = sessionFailureChangedAction,
ActionEventSuccessData = eventSuccessChangedAction,
ActionEventFailureData = eventFailureChangedAction,
FuncDeeplinkResponseData = deeplinkResponseFunc,
IsDeviceKnown = adjustConfig.isDeviceKnown,
SecretId = adjustConfig.secretId,
Info1 = adjustConfig.info1,
Info2 = adjustConfig.info2,
Info3 = adjustConfig.info3,
Info4 = adjustConfig.info4
};
AdjustWinInterface.ApplicationLaunching(adjustConfigDto);
AdjustWinInterface.ApplicationActivated();
appLaunched = true;
}
public static void TrackEvent(AdjustEvent adjustEvent)
{
AdjustWinInterface.TrackEvent(
eventToken: adjustEvent.eventToken,
revenue: adjustEvent.revenue,
currency: adjustEvent.currency,
purchaseId: adjustEvent.transactionId,
callbackId: adjustEvent.callbackId,
callbackList: adjustEvent.callbackList,
partnerList: adjustEvent.partnerList
);
}
public static bool IsEnabled()
{
return AdjustWinInterface.IsEnabled();
}
public static void OnResume()
{
if (!appLaunched)
{
return;
}
AdjustWinInterface.ApplicationActivated();
}
public static void OnPause()
{
AdjustWinInterface.ApplicationDeactivated();
}
public static void SetEnabled(bool enabled)
{
AdjustWinInterface.SetEnabled(enabled);
}
public static void SetOfflineMode(bool offlineMode)
{
AdjustWinInterface.SetOfflineMode(offlineMode);
}
public static void SendFirstPackages()
{
AdjustWinInterface.SendFirstPackages();
}
public static void SetDeviceToken(string deviceToken)
{
AdjustWinInterface.SetDeviceToken(deviceToken);
}
public static void AppWillOpenUrl(string url)
{
AdjustWinInterface.AppWillOpenUrl(url);
}
public static void AddSessionPartnerParameter(string key, string value)
{
AdjustWinInterface.AddSessionPartnerParameter(key, value);
}
public static void AddSessionCallbackParameter(string key, string value)
{
AdjustWinInterface.AddSessionCallbackParameter(key, value);
}
public static void RemoveSessionPartnerParameter(string key)
{
AdjustWinInterface.RemoveSessionPartnerParameter(key);
}
public static void RemoveSessionCallbackParameter(string key)
{
AdjustWinInterface.RemoveSessionCallbackParameter(key);
}
public static void ResetSessionPartnerParameters()
{
AdjustWinInterface.ResetSessionPartnerParameters();
}
public static void ResetSessionCallbackParameters()
{
AdjustWinInterface.ResetSessionCallbackParameters();
}
public static string GetAdid()
{
return AdjustWinInterface.GetAdid();
}
public static string GetSdkVersion()
{
return sdkPrefix + "@" + AdjustWinInterface.GetSdkVersion();
}
public static AdjustAttribution GetAttribution()
{
var attributionMap = AdjustWinInterface.GetAttribution();
if (attributionMap == null)
{
return new AdjustAttribution();
}
return new AdjustAttribution(attributionMap);
}
public static void GdprForgetMe()
{
AdjustWinInterface.GdprForgetMe();
}
public static string GetWinAdId()
{
return AdjustWinInterface.GetWindowsAdId();
}
public static void SetTestOptions(Dictionary<string, string> testOptions)
{
string basePath = testOptions.ContainsKey(AdjustUtils.KeyTestOptionsBasePath) ?
testOptions[AdjustUtils.KeyTestOptionsBasePath] : null;
string gdprPath = testOptions.ContainsKey(AdjustUtils.KeyTestOptionsGdprPath) ?
testOptions[AdjustUtils.KeyTestOptionsGdprPath] : null;
long timerIntervalMls = -1;
long timerStartMls = -1;
long sessionIntMls = -1;
long subsessionIntMls = -1;
bool teardown = false;
bool deleteState = false;
bool noBackoffWait = false;
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTimerIntervalInMilliseconds))
{
timerIntervalMls = long.Parse(testOptions[AdjustUtils.KeyTestOptionsTimerIntervalInMilliseconds]);
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTimerStartInMilliseconds))
{
timerStartMls = long.Parse(testOptions[AdjustUtils.KeyTestOptionsTimerStartInMilliseconds]);
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsSessionIntervalInMilliseconds))
{
sessionIntMls = long.Parse(testOptions[AdjustUtils.KeyTestOptionsSessionIntervalInMilliseconds]);
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsSubsessionIntervalInMilliseconds))
{
subsessionIntMls = long.Parse(testOptions[AdjustUtils.KeyTestOptionsSubsessionIntervalInMilliseconds]);
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTeardown))
{
teardown = testOptions[AdjustUtils.KeyTestOptionsTeardown].ToLower() == "true";
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsDeleteState))
{
deleteState = testOptions[AdjustUtils.KeyTestOptionsDeleteState].ToLower() == "true";
}
if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsNoBackoffWait))
{
noBackoffWait = testOptions[AdjustUtils.KeyTestOptionsNoBackoffWait].ToLower() == "true";
}
Type testLibInterfaceType = Type.GetType("TestLibraryInterface.TestLibraryInterface, TestLibraryInterface");
Type adjustTestOptionsDtoType = Type.GetType("TestLibraryInterface.AdjustTestOptionsDto, TestLibraryInterface");
if (testLibInterfaceType == null || adjustTestOptionsDtoType == null)
{
return;
}
PropertyInfo baseUrlInfo = adjustTestOptionsDtoType.GetProperty("BaseUrl");
PropertyInfo gdprUrlInfo = adjustTestOptionsDtoType.GetProperty("GdprUrl");
PropertyInfo basePathInfo = adjustTestOptionsDtoType.GetProperty("BasePath");
PropertyInfo gdprPathInfo = adjustTestOptionsDtoType.GetProperty("GdprPath");
PropertyInfo sessionIntervalInMillisecondsInfo = adjustTestOptionsDtoType.GetProperty("SessionIntervalInMilliseconds");
PropertyInfo subsessionIntervalInMillisecondsInfo = adjustTestOptionsDtoType.GetProperty("SubsessionIntervalInMilliseconds");
PropertyInfo timerIntervalInMillisecondsInfo = adjustTestOptionsDtoType.GetProperty("TimerIntervalInMilliseconds");
PropertyInfo timerStartInMillisecondsInfo = adjustTestOptionsDtoType.GetProperty("TimerStartInMilliseconds");
PropertyInfo deleteStateInfo = adjustTestOptionsDtoType.GetProperty("DeleteState");
PropertyInfo teardownInfo = adjustTestOptionsDtoType.GetProperty("Teardown");
PropertyInfo noBackoffWaitInfo = adjustTestOptionsDtoType.GetProperty("NoBackoffWait");
object adjustTestOptionsDtoInstance = Activator.CreateInstance(adjustTestOptionsDtoType);
baseUrlInfo.SetValue(adjustTestOptionsDtoInstance, testOptions[AdjustUtils.KeyTestOptionsBaseUrl], null);
gdprUrlInfo.SetValue(adjustTestOptionsDtoInstance, testOptions[AdjustUtils.KeyTestOptionsGdprUrl], null);
basePathInfo.SetValue(adjustTestOptionsDtoInstance, basePath, null);
gdprPathInfo.SetValue(adjustTestOptionsDtoInstance, gdprPath, null);
sessionIntervalInMillisecondsInfo.SetValue(adjustTestOptionsDtoInstance, sessionIntMls, null);
subsessionIntervalInMillisecondsInfo.SetValue(adjustTestOptionsDtoInstance, subsessionIntMls, null);
timerIntervalInMillisecondsInfo.SetValue(adjustTestOptionsDtoInstance, timerIntervalMls, null);
timerStartInMillisecondsInfo.SetValue(adjustTestOptionsDtoInstance, timerStartMls, null);
deleteStateInfo.SetValue(adjustTestOptionsDtoInstance, deleteState, null);
teardownInfo.SetValue(adjustTestOptionsDtoInstance, teardown, null);
noBackoffWaitInfo.SetValue(adjustTestOptionsDtoInstance, noBackoffWait, null);
MethodInfo setTestOptionsMethodInfo = testLibInterfaceType.GetMethod("SetTestOptions");
setTestOptionsMethodInfo.Invoke(null, new object[] { adjustTestOptionsDtoInstance });
}
}
}
#endif

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 3427d1638e7de554f822f2758d5efa5d
timeCreated: 1510134931
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: dde5cfaaa61544444adb278e3df09051
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude WebGL: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 0
Exclude iOS: 1
Exclude tvOS: 1
- first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f843c58f3da8cd04ca908f6ae7cc4584
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: 437f3d4f145f71f48ad0468a8cdd840a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude WebGL: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 1
Exclude iOS: 1
Exclude tvOS: 1
- first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: 4a3249a2bc5a2fc4b90ec1effe1d74ce
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude WebGL: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 1
Exclude iOS: 1
Exclude tvOS: 1
- first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: 28d42f4475bd4c9498aea78c129a80b7
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude WebGL: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 1
Exclude iOS: 1
Exclude tvOS: 1
- first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: AnyScriptingBackend
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Windows/W81.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0a2e5ebe768d3b74a9047dc0592c78b1
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 1e03a607fa75e4a488d6d61ca75c352a
timeCreated: 1510575008
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 0
data:
first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
data:
first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
data:
first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: PhoneSDK81
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 72c922127edd0e94b972c6e40580ec90
timeCreated: 1510575009
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 0
data:
first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
data:
first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
data:
first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath: Assets/Adjust/Windows/Stubs/Win81Interface.dll
SDK: PhoneSDK81
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Windows/WS.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 200065618516a3b479c4dff78f23cdd9
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 244b7bed1ea0ae147b5732f948d3e207
timeCreated: 1510575008
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 0
data:
first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
data:
first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
data:
first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: SDK81
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,132 @@
fileFormatVersion: 2
guid: 35b13abbb89b9874d811856667cc3186
timeCreated: 1510575009
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude WindowsStoreApps: 0
data:
first:
'': Editor
second:
enabled: 0
settings:
CPU: AnyCPU
OS: AnyOS
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
data:
first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
data:
first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
data:
first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath: Assets/Adjust/Windows/Stubs/WinWsInterface.dll
SDK: SDK81
ScriptingBackend: AnyScriptingBackend
userData:
assetBundleName:
assetBundleVariant:

9
Adjust/Windows/WU10.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: abbcaca8b21383f4eaece6c3b078825a
folderAsset: yes
timeCreated: 1578652520
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More