init
This commit is contained in:
9
Assets/Adjust/3rd Party.meta
Normal file
9
Assets/Adjust/3rd Party.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48d72eaa514ffd0449362a759c8e9a86
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1038
Assets/Adjust/3rd Party/SimpleJSON.cs
Normal file
1038
Assets/Adjust/3rd Party/SimpleJSON.cs
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Adjust/3rd Party/SimpleJSON.cs.meta
Normal file
8
Assets/Adjust/3rd Party/SimpleJSON.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c780c17852614618be5ffd9cc43a75f
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
9
Assets/Adjust/Android.meta
Normal file
9
Assets/Adjust/Android.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64b3fa260fe5b3c4e9215ec9b42c90da
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
961
Assets/Adjust/Android/AdjustAndroid.cs
Normal file
961
Assets/Adjust/Android/AdjustAndroid.cs
Normal file
@@ -0,0 +1,961 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace com.adjust.sdk
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
public class AdjustAndroid
|
||||
{
|
||||
private const string sdkPrefix = "unity4.32.2";
|
||||
private static bool launchDeferredDeeplink = true;
|
||||
private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
|
||||
private static DeferredDeeplinkListener onDeferredDeeplinkListener;
|
||||
private static AttributionChangeListener onAttributionChangedListener;
|
||||
private static EventTrackingFailedListener onEventTrackingFailedListener;
|
||||
private static EventTrackingSucceededListener onEventTrackingSucceededListener;
|
||||
private static SessionTrackingFailedListener onSessionTrackingFailedListener;
|
||||
private static SessionTrackingSucceededListener onSessionTrackingSucceededListener;
|
||||
|
||||
public static void Start(AdjustConfig adjustConfig)
|
||||
{
|
||||
// Thank you, Unity 2019.2.0, for breaking this.
|
||||
// AndroidJavaObject ajoEnvironment = adjustConfig.environment == AdjustEnvironment.Sandbox ?
|
||||
// new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("ENVIRONMENT_SANDBOX") :
|
||||
// new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("ENVIRONMENT_PRODUCTION");
|
||||
|
||||
// Get environment variable.
|
||||
string ajoEnvironment = adjustConfig.environment == AdjustEnvironment.Production ? "production" : "sandbox";
|
||||
|
||||
// Create adjust config object.
|
||||
AndroidJavaObject ajoAdjustConfig;
|
||||
|
||||
// Check if suppress log leve is supported.
|
||||
if (adjustConfig.allowSuppressLogLevel != null)
|
||||
{
|
||||
ajoAdjustConfig = new AndroidJavaObject("com.adjust.sdk.AdjustConfig", ajoCurrentActivity, adjustConfig.appToken, ajoEnvironment, adjustConfig.allowSuppressLogLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
ajoAdjustConfig = new AndroidJavaObject("com.adjust.sdk.AdjustConfig", ajoCurrentActivity, adjustConfig.appToken, ajoEnvironment);
|
||||
}
|
||||
|
||||
// Check if deferred deeplink should be launched by SDK.
|
||||
launchDeferredDeeplink = adjustConfig.launchDeferredDeeplink;
|
||||
|
||||
// Check log level.
|
||||
if (adjustConfig.logLevel != null)
|
||||
{
|
||||
AndroidJavaObject ajoLogLevel;
|
||||
if (adjustConfig.logLevel.Value.ToUppercaseString().Equals("SUPPRESS"))
|
||||
{
|
||||
ajoLogLevel = new AndroidJavaClass("com.adjust.sdk.LogLevel").GetStatic<AndroidJavaObject>("SUPRESS");
|
||||
}
|
||||
else
|
||||
{
|
||||
ajoLogLevel = new AndroidJavaClass("com.adjust.sdk.LogLevel").GetStatic<AndroidJavaObject>(adjustConfig.logLevel.Value.ToUppercaseString());
|
||||
}
|
||||
|
||||
if (ajoLogLevel != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setLogLevel", ajoLogLevel);
|
||||
}
|
||||
}
|
||||
|
||||
// Set unity SDK prefix.
|
||||
ajoAdjustConfig.Call("setSdkPrefix", sdkPrefix);
|
||||
|
||||
// Check if user has configured the delayed start option.
|
||||
if (adjustConfig.delayStart != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setDelayStart", adjustConfig.delayStart);
|
||||
}
|
||||
|
||||
// Check event buffering setting.
|
||||
if (adjustConfig.eventBufferingEnabled != null)
|
||||
{
|
||||
AndroidJavaObject ajoIsEnabled = new AndroidJavaObject("java.lang.Boolean", adjustConfig.eventBufferingEnabled.Value);
|
||||
ajoAdjustConfig.Call("setEventBufferingEnabled", ajoIsEnabled);
|
||||
}
|
||||
|
||||
// Check COPPA setting.
|
||||
if (adjustConfig.coppaCompliantEnabled != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setCoppaCompliantEnabled", adjustConfig.coppaCompliantEnabled.Value);
|
||||
}
|
||||
|
||||
// Check Play Store Kids Apps setting.
|
||||
if (adjustConfig.playStoreKidsAppEnabled != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setPlayStoreKidsAppEnabled", adjustConfig.playStoreKidsAppEnabled.Value);
|
||||
}
|
||||
|
||||
// Check if user enabled tracking in the background.
|
||||
if (adjustConfig.sendInBackground != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setSendInBackground", adjustConfig.sendInBackground.Value);
|
||||
}
|
||||
|
||||
// Check if user wants to get cost data in attribution callback.
|
||||
if (adjustConfig.needsCost != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setNeedsCost", adjustConfig.needsCost.Value);
|
||||
}
|
||||
|
||||
// Check if user wants to run preinstall campaigns.
|
||||
if (adjustConfig.preinstallTrackingEnabled != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setPreinstallTrackingEnabled", adjustConfig.preinstallTrackingEnabled.Value);
|
||||
}
|
||||
|
||||
// Check if user has set custom preinstall file path.
|
||||
if (adjustConfig.preinstallFilePath != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setPreinstallFilePath", adjustConfig.preinstallFilePath);
|
||||
}
|
||||
|
||||
// Check if user has set user agent value.
|
||||
if (adjustConfig.userAgent != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setUserAgent", adjustConfig.userAgent);
|
||||
}
|
||||
|
||||
// Check if user has set default process name.
|
||||
if (!String.IsNullOrEmpty(adjustConfig.processName))
|
||||
{
|
||||
ajoAdjustConfig.Call("setProcessName", adjustConfig.processName);
|
||||
}
|
||||
|
||||
// Check if user has set default tracker token.
|
||||
if (adjustConfig.defaultTracker != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setDefaultTracker", adjustConfig.defaultTracker);
|
||||
}
|
||||
|
||||
// Check if user has set external device identifier.
|
||||
if (adjustConfig.externalDeviceId != null)
|
||||
{
|
||||
ajoAdjustConfig.Call("setExternalDeviceId", adjustConfig.externalDeviceId);
|
||||
}
|
||||
|
||||
// Check if user has set custom URL strategy.
|
||||
if (adjustConfig.urlStrategy != null)
|
||||
{
|
||||
if (adjustConfig.urlStrategy == AdjustConfig.AdjustUrlStrategyChina)
|
||||
{
|
||||
AndroidJavaObject ajoUrlStrategyChina = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("URL_STRATEGY_CHINA");
|
||||
ajoAdjustConfig.Call("setUrlStrategy", ajoUrlStrategyChina);
|
||||
}
|
||||
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustUrlStrategyIndia)
|
||||
{
|
||||
AndroidJavaObject ajoUrlStrategyIndia = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("URL_STRATEGY_INDIA");
|
||||
ajoAdjustConfig.Call("setUrlStrategy", ajoUrlStrategyIndia);
|
||||
}
|
||||
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustDataResidencyEU)
|
||||
{
|
||||
AndroidJavaObject ajoDataResidencyEU = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("DATA_RESIDENCY_EU");
|
||||
ajoAdjustConfig.Call("setUrlStrategy", ajoDataResidencyEU);
|
||||
}
|
||||
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustDataResidencyTR)
|
||||
{
|
||||
AndroidJavaObject ajoDataResidencyTR = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("DATA_RESIDENCY_TR");
|
||||
ajoAdjustConfig.Call("setUrlStrategy", ajoDataResidencyTR);
|
||||
}
|
||||
else if (adjustConfig.urlStrategy == AdjustConfig.AdjustDataResidencyUS)
|
||||
{
|
||||
AndroidJavaObject ajoDataResidencyUS = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic<AndroidJavaObject>("DATA_RESIDENCY_US");
|
||||
ajoAdjustConfig.Call("setUrlStrategy", ajoDataResidencyUS);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has set app secret.
|
||||
if (IsAppSecretSet(adjustConfig))
|
||||
{
|
||||
ajoAdjustConfig.Call("setAppSecret",
|
||||
adjustConfig.secretId.Value,
|
||||
adjustConfig.info1.Value,
|
||||
adjustConfig.info2.Value,
|
||||
adjustConfig.info3.Value,
|
||||
adjustConfig.info4.Value);
|
||||
}
|
||||
|
||||
// Check if user has set device as known.
|
||||
if (adjustConfig.isDeviceKnown.HasValue)
|
||||
{
|
||||
ajoAdjustConfig.Call("setDeviceKnown", adjustConfig.isDeviceKnown.Value);
|
||||
}
|
||||
|
||||
// Check if user has enabled reading of IMEI and MEID.
|
||||
// Obsolete method.
|
||||
if (adjustConfig.readImei.HasValue)
|
||||
{
|
||||
// ajoAdjustConfig.Call("setReadMobileEquipmentIdentity", adjustConfig.readImei.Value);
|
||||
}
|
||||
|
||||
// Check attribution changed delagate setting.
|
||||
if (adjustConfig.attributionChangedDelegate != null)
|
||||
{
|
||||
onAttributionChangedListener = new AttributionChangeListener(adjustConfig.attributionChangedDelegate);
|
||||
ajoAdjustConfig.Call("setOnAttributionChangedListener", onAttributionChangedListener);
|
||||
}
|
||||
|
||||
// Check event success delegate setting.
|
||||
if (adjustConfig.eventSuccessDelegate != null)
|
||||
{
|
||||
onEventTrackingSucceededListener = new EventTrackingSucceededListener(adjustConfig.eventSuccessDelegate);
|
||||
ajoAdjustConfig.Call("setOnEventTrackingSucceededListener", onEventTrackingSucceededListener);
|
||||
}
|
||||
|
||||
// Check event failure delagate setting.
|
||||
if (adjustConfig.eventFailureDelegate != null)
|
||||
{
|
||||
onEventTrackingFailedListener = new EventTrackingFailedListener(adjustConfig.eventFailureDelegate);
|
||||
ajoAdjustConfig.Call("setOnEventTrackingFailedListener", onEventTrackingFailedListener);
|
||||
}
|
||||
|
||||
// Check session success delegate setting.
|
||||
if (adjustConfig.sessionSuccessDelegate != null)
|
||||
{
|
||||
onSessionTrackingSucceededListener = new SessionTrackingSucceededListener(adjustConfig.sessionSuccessDelegate);
|
||||
ajoAdjustConfig.Call("setOnSessionTrackingSucceededListener", onSessionTrackingSucceededListener);
|
||||
}
|
||||
|
||||
// Check session failure delegate setting.
|
||||
if (adjustConfig.sessionFailureDelegate != null)
|
||||
{
|
||||
onSessionTrackingFailedListener = new SessionTrackingFailedListener(adjustConfig.sessionFailureDelegate);
|
||||
ajoAdjustConfig.Call("setOnSessionTrackingFailedListener", onSessionTrackingFailedListener);
|
||||
}
|
||||
|
||||
// Check deferred deeplink delegate setting.
|
||||
if (adjustConfig.deferredDeeplinkDelegate != null)
|
||||
{
|
||||
onDeferredDeeplinkListener = new DeferredDeeplinkListener(adjustConfig.deferredDeeplinkDelegate);
|
||||
ajoAdjustConfig.Call("setOnDeeplinkResponseListener", onDeferredDeeplinkListener);
|
||||
}
|
||||
|
||||
// Initialise and start the SDK.
|
||||
ajcAdjust.CallStatic("onCreate", ajoAdjustConfig);
|
||||
ajcAdjust.CallStatic("onResume");
|
||||
}
|
||||
|
||||
public static void TrackEvent(AdjustEvent adjustEvent)
|
||||
{
|
||||
AndroidJavaObject ajoAdjustEvent = new AndroidJavaObject("com.adjust.sdk.AdjustEvent", adjustEvent.eventToken);
|
||||
|
||||
// Check if user has set revenue for the event.
|
||||
if (adjustEvent.revenue != null)
|
||||
{
|
||||
ajoAdjustEvent.Call("setRevenue", (double)adjustEvent.revenue, adjustEvent.currency);
|
||||
}
|
||||
|
||||
// Check if user has added any callback parameters to the event.
|
||||
if (adjustEvent.callbackList != null)
|
||||
{
|
||||
for (int i = 0; i < adjustEvent.callbackList.Count; i += 2)
|
||||
{
|
||||
string key = adjustEvent.callbackList[i];
|
||||
string value = adjustEvent.callbackList[i + 1];
|
||||
ajoAdjustEvent.Call("addCallbackParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has added any partner parameters to the event.
|
||||
if (adjustEvent.partnerList != null)
|
||||
{
|
||||
for (int i = 0; i < adjustEvent.partnerList.Count; i += 2)
|
||||
{
|
||||
string key = adjustEvent.partnerList[i];
|
||||
string value = adjustEvent.partnerList[i + 1];
|
||||
ajoAdjustEvent.Call("addPartnerParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has added transaction ID to the event.
|
||||
if (adjustEvent.transactionId != null)
|
||||
{
|
||||
ajoAdjustEvent.Call("setOrderId", adjustEvent.transactionId);
|
||||
}
|
||||
|
||||
// Check if user has added callback ID to the event.
|
||||
if (adjustEvent.callbackId != null)
|
||||
{
|
||||
ajoAdjustEvent.Call("setCallbackId", adjustEvent.callbackId);
|
||||
}
|
||||
|
||||
// Track the event.
|
||||
ajcAdjust.CallStatic("trackEvent", ajoAdjustEvent);
|
||||
}
|
||||
|
||||
public static bool IsEnabled()
|
||||
{
|
||||
return ajcAdjust.CallStatic<bool>("isEnabled");
|
||||
}
|
||||
|
||||
public static void SetEnabled(bool enabled)
|
||||
{
|
||||
ajcAdjust.CallStatic("setEnabled", enabled);
|
||||
}
|
||||
|
||||
public static void SetOfflineMode(bool enabled)
|
||||
{
|
||||
ajcAdjust.CallStatic("setOfflineMode", enabled);
|
||||
}
|
||||
|
||||
public static void SendFirstPackages()
|
||||
{
|
||||
ajcAdjust.CallStatic("sendFirstPackages");
|
||||
}
|
||||
|
||||
public static void SetDeviceToken(string deviceToken)
|
||||
{
|
||||
ajcAdjust.CallStatic("setPushToken", deviceToken, ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static string GetAdid()
|
||||
{
|
||||
return ajcAdjust.CallStatic<string>("getAdid");
|
||||
}
|
||||
|
||||
public static void GdprForgetMe()
|
||||
{
|
||||
ajcAdjust.CallStatic("gdprForgetMe", ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static void DisableThirdPartySharing()
|
||||
{
|
||||
ajcAdjust.CallStatic("disableThirdPartySharing", ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static AdjustAttribution GetAttribution()
|
||||
{
|
||||
try
|
||||
{
|
||||
AndroidJavaObject ajoAttribution = ajcAdjust.CallStatic<AndroidJavaObject>("getAttribution");
|
||||
if (null == ajoAttribution)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
AdjustAttribution adjustAttribution = new AdjustAttribution();
|
||||
adjustAttribution.trackerName = ajoAttribution.Get<string>(AdjustUtils.KeyTrackerName) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyTrackerName);
|
||||
adjustAttribution.trackerToken = ajoAttribution.Get<string>(AdjustUtils.KeyTrackerToken) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyTrackerToken);
|
||||
adjustAttribution.network = ajoAttribution.Get<string>(AdjustUtils.KeyNetwork) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyNetwork);
|
||||
adjustAttribution.campaign = ajoAttribution.Get<string>(AdjustUtils.KeyCampaign) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyCampaign);
|
||||
adjustAttribution.adgroup = ajoAttribution.Get<string>(AdjustUtils.KeyAdgroup) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyAdgroup);
|
||||
adjustAttribution.creative = ajoAttribution.Get<string>(AdjustUtils.KeyCreative) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyCreative);
|
||||
adjustAttribution.clickLabel = ajoAttribution.Get<string>(AdjustUtils.KeyClickLabel) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyClickLabel);
|
||||
adjustAttribution.adid = ajoAttribution.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustAttribution.costType = ajoAttribution.Get<string>(AdjustUtils.KeyCostType) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyCostType);
|
||||
AndroidJavaObject ajoCostAmount = ajoAttribution.Get<AndroidJavaObject>(AdjustUtils.KeyCostAmount) == null ?
|
||||
null : ajoAttribution.Get<AndroidJavaObject>(AdjustUtils.KeyCostAmount);
|
||||
if (ajoCostAmount == null)
|
||||
{
|
||||
adjustAttribution.costAmount = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
double costAmount = ajoCostAmount.Call<double>("doubleValue");
|
||||
adjustAttribution.costAmount = costAmount;
|
||||
}
|
||||
adjustAttribution.costCurrency = ajoAttribution.Get<string>(AdjustUtils.KeyCostCurrency) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyCostCurrency);
|
||||
adjustAttribution.fbInstallReferrer = ajoAttribution.Get<string>(AdjustUtils.KeyFbInstallReferrer) == "" ?
|
||||
null : ajoAttribution.Get<string>(AdjustUtils.KeyFbInstallReferrer);
|
||||
return adjustAttribution;
|
||||
}
|
||||
catch (Exception) {}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void AddSessionPartnerParameter(string key, string value)
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("addSessionPartnerParameter", key, value);
|
||||
}
|
||||
|
||||
public static void AddSessionCallbackParameter(string key, string value)
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("addSessionCallbackParameter", key, value);
|
||||
}
|
||||
|
||||
public static void RemoveSessionPartnerParameter(string key)
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("removeSessionPartnerParameter", key);
|
||||
}
|
||||
|
||||
public static void RemoveSessionCallbackParameter(string key)
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("removeSessionCallbackParameter", key);
|
||||
}
|
||||
|
||||
public static void ResetSessionPartnerParameters()
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("resetSessionPartnerParameters");
|
||||
}
|
||||
|
||||
public static void ResetSessionCallbackParameters()
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
ajcAdjust.CallStatic("resetSessionCallbackParameters");
|
||||
}
|
||||
|
||||
public static void AppWillOpenUrl(string url)
|
||||
{
|
||||
AndroidJavaClass ajcUri = new AndroidJavaClass("android.net.Uri");
|
||||
AndroidJavaObject ajoUri = ajcUri.CallStatic<AndroidJavaObject>("parse", url);
|
||||
ajcAdjust.CallStatic("appWillOpenUrl", ajoUri, ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static void TrackAdRevenue(string source, string payload)
|
||||
{
|
||||
if (ajcAdjust == null)
|
||||
{
|
||||
ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust");
|
||||
}
|
||||
AndroidJavaObject jsonPayload = new AndroidJavaObject("org.json.JSONObject", payload);
|
||||
ajcAdjust.CallStatic("trackAdRevenue", source, jsonPayload);
|
||||
}
|
||||
|
||||
public static void TrackAdRevenue(AdjustAdRevenue adRevenue)
|
||||
{
|
||||
AndroidJavaObject ajoAdjustAdRevenue = new AndroidJavaObject("com.adjust.sdk.AdjustAdRevenue", adRevenue.source);
|
||||
|
||||
// Check if user has set revenue.
|
||||
if (adRevenue.revenue != null)
|
||||
{
|
||||
AndroidJavaObject ajoRevenue = new AndroidJavaObject("java.lang.Double", adRevenue.revenue);
|
||||
ajoAdjustAdRevenue.Call("setRevenue", ajoRevenue, adRevenue.currency);
|
||||
}
|
||||
|
||||
// Check if user has set ad impressions count.
|
||||
if (adRevenue.adImpressionsCount != null)
|
||||
{
|
||||
AndroidJavaObject ajoAdImpressionsCount = new AndroidJavaObject("java.lang.Integer", adRevenue.adImpressionsCount);
|
||||
ajoAdjustAdRevenue.Call("setAdImpressionsCount", ajoAdImpressionsCount);
|
||||
}
|
||||
|
||||
// Check if user has set ad revenue network.
|
||||
if (adRevenue.adRevenueNetwork != null)
|
||||
{
|
||||
ajoAdjustAdRevenue.Call("setAdRevenueNetwork", adRevenue.adRevenueNetwork);
|
||||
}
|
||||
|
||||
// Check if user has set ad revenue unit.
|
||||
if (adRevenue.adRevenueUnit != null)
|
||||
{
|
||||
ajoAdjustAdRevenue.Call("setAdRevenueUnit", adRevenue.adRevenueUnit);
|
||||
}
|
||||
|
||||
// Check if user has set ad revenue placement.
|
||||
if (adRevenue.adRevenuePlacement != null)
|
||||
{
|
||||
ajoAdjustAdRevenue.Call("setAdRevenuePlacement", adRevenue.adRevenuePlacement);
|
||||
}
|
||||
|
||||
// Check if user has added any callback parameters.
|
||||
if (adRevenue.callbackList != null)
|
||||
{
|
||||
for (int i = 0; i < adRevenue.callbackList.Count; i += 2)
|
||||
{
|
||||
string key = adRevenue.callbackList[i];
|
||||
string value = adRevenue.callbackList[i + 1];
|
||||
ajoAdjustAdRevenue.Call("addCallbackParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has added any partner parameters.
|
||||
if (adRevenue.partnerList != null)
|
||||
{
|
||||
for (int i = 0; i < adRevenue.partnerList.Count; i += 2)
|
||||
{
|
||||
string key = adRevenue.partnerList[i];
|
||||
string value = adRevenue.partnerList[i + 1];
|
||||
ajoAdjustAdRevenue.Call("addPartnerParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Track ad revenue.
|
||||
ajcAdjust.CallStatic("trackAdRevenue", ajoAdjustAdRevenue);
|
||||
}
|
||||
|
||||
public static void TrackPlayStoreSubscription(AdjustPlayStoreSubscription subscription)
|
||||
{
|
||||
AndroidJavaObject ajoSubscription = new AndroidJavaObject("com.adjust.sdk.AdjustPlayStoreSubscription",
|
||||
Convert.ToInt64(subscription.price),
|
||||
subscription.currency,
|
||||
subscription.sku,
|
||||
subscription.orderId,
|
||||
subscription.signature,
|
||||
subscription.purchaseToken);
|
||||
|
||||
// Check if user has set purchase time for subscription.
|
||||
if (subscription.purchaseTime != null)
|
||||
{
|
||||
ajoSubscription.Call("setPurchaseTime", Convert.ToInt64(subscription.purchaseTime));
|
||||
}
|
||||
|
||||
// Check if user has added any callback parameters to the subscription.
|
||||
if (subscription.callbackList != null)
|
||||
{
|
||||
for (int i = 0; i < subscription.callbackList.Count; i += 2)
|
||||
{
|
||||
string key = subscription.callbackList[i];
|
||||
string value = subscription.callbackList[i + 1];
|
||||
ajoSubscription.Call("addCallbackParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has added any partner parameters to the subscription.
|
||||
if (subscription.partnerList != null)
|
||||
{
|
||||
for (int i = 0; i < subscription.partnerList.Count; i += 2)
|
||||
{
|
||||
string key = subscription.partnerList[i];
|
||||
string value = subscription.partnerList[i + 1];
|
||||
ajoSubscription.Call("addPartnerParameter", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Track the subscription.
|
||||
ajcAdjust.CallStatic("trackPlayStoreSubscription", ajoSubscription);
|
||||
}
|
||||
|
||||
public static void TrackThirdPartySharing(AdjustThirdPartySharing thirdPartySharing)
|
||||
{
|
||||
AndroidJavaObject ajoIsEnabled;
|
||||
AndroidJavaObject ajoAdjustThirdPartySharing;
|
||||
if (thirdPartySharing.isEnabled != null)
|
||||
{
|
||||
ajoIsEnabled = new AndroidJavaObject("java.lang.Boolean", thirdPartySharing.isEnabled.Value);
|
||||
ajoAdjustThirdPartySharing = new AndroidJavaObject("com.adjust.sdk.AdjustThirdPartySharing", ajoIsEnabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] parameters = null;
|
||||
ajoAdjustThirdPartySharing = new AndroidJavaObject("com.adjust.sdk.AdjustThirdPartySharing", parameters);
|
||||
}
|
||||
|
||||
if (thirdPartySharing.granularOptions != null)
|
||||
{
|
||||
foreach (KeyValuePair<string, List<string>> entry in thirdPartySharing.granularOptions)
|
||||
{
|
||||
for (int i = 0; i < entry.Value.Count;)
|
||||
{
|
||||
ajoAdjustThirdPartySharing.Call("addGranularOption", entry.Key, entry.Value[i++], entry.Value[i++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thirdPartySharing.partnerSharingSettings != null)
|
||||
{
|
||||
foreach (KeyValuePair<string, List<string>> entry in thirdPartySharing.partnerSharingSettings)
|
||||
{
|
||||
for (int i = 0; i < entry.Value.Count;)
|
||||
{
|
||||
ajoAdjustThirdPartySharing.Call("addPartnerSharingSetting", entry.Key, entry.Value[i++], bool.Parse(entry.Value[i++]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ajcAdjust.CallStatic("trackThirdPartySharing", ajoAdjustThirdPartySharing);
|
||||
}
|
||||
|
||||
public static void TrackMeasurementConsent(bool measurementConsent)
|
||||
{
|
||||
ajcAdjust.CallStatic("trackMeasurementConsent", measurementConsent);
|
||||
}
|
||||
|
||||
// Android specific methods.
|
||||
public static void OnPause()
|
||||
{
|
||||
ajcAdjust.CallStatic("onPause");
|
||||
}
|
||||
|
||||
public static void OnResume()
|
||||
{
|
||||
ajcAdjust.CallStatic("onResume");
|
||||
}
|
||||
|
||||
public static void SetReferrer(string referrer)
|
||||
{
|
||||
ajcAdjust.CallStatic("setReferrer", referrer, ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static void GetGoogleAdId(Action<string> onDeviceIdsRead)
|
||||
{
|
||||
DeviceIdsReadListener onDeviceIdsReadProxy = new DeviceIdsReadListener(onDeviceIdsRead);
|
||||
ajcAdjust.CallStatic("getGoogleAdId", ajoCurrentActivity, onDeviceIdsReadProxy);
|
||||
}
|
||||
|
||||
public static string GetAmazonAdId()
|
||||
{
|
||||
return ajcAdjust.CallStatic<string>("getAmazonAdId", ajoCurrentActivity);
|
||||
}
|
||||
|
||||
public static string GetSdkVersion()
|
||||
{
|
||||
string nativeSdkVersion = ajcAdjust.CallStatic<string>("getSdkVersion");
|
||||
return sdkPrefix + "@" + nativeSdkVersion;
|
||||
}
|
||||
|
||||
// Used for testing only.
|
||||
public static void SetTestOptions(Dictionary<string, string> testOptions)
|
||||
{
|
||||
AndroidJavaObject ajoTestOptions = AdjustUtils.TestOptionsMap2AndroidJavaObject(testOptions, ajoCurrentActivity);
|
||||
ajcAdjust.CallStatic("setTestOptions", ajoTestOptions);
|
||||
}
|
||||
|
||||
// Private & helper classes.
|
||||
private class AttributionChangeListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<AdjustAttribution> callback;
|
||||
|
||||
public AttributionChangeListener(Action<AdjustAttribution> pCallback) : base("com.adjust.sdk.OnAttributionChangedListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onAttributionChanged(AndroidJavaObject attribution)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AdjustAttribution adjustAttribution = new AdjustAttribution();
|
||||
adjustAttribution.trackerName = attribution.Get<string>(AdjustUtils.KeyTrackerName) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyTrackerName);
|
||||
adjustAttribution.trackerToken = attribution.Get<string>(AdjustUtils.KeyTrackerToken) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyTrackerToken);
|
||||
adjustAttribution.network = attribution.Get<string>(AdjustUtils.KeyNetwork) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyNetwork);
|
||||
adjustAttribution.campaign = attribution.Get<string>(AdjustUtils.KeyCampaign) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyCampaign);
|
||||
adjustAttribution.adgroup = attribution.Get<string>(AdjustUtils.KeyAdgroup) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyAdgroup);
|
||||
adjustAttribution.creative = attribution.Get<string>(AdjustUtils.KeyCreative) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyCreative);
|
||||
adjustAttribution.clickLabel = attribution.Get<string>(AdjustUtils.KeyClickLabel) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyClickLabel);
|
||||
adjustAttribution.adid = attribution.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustAttribution.costType = attribution.Get<string>(AdjustUtils.KeyCostType) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyCostType);
|
||||
AndroidJavaObject ajoCostAmount = attribution.Get<AndroidJavaObject>(AdjustUtils.KeyCostAmount) == null ?
|
||||
null : attribution.Get<AndroidJavaObject>(AdjustUtils.KeyCostAmount);
|
||||
if (ajoCostAmount == null)
|
||||
{
|
||||
adjustAttribution.costAmount = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
double costAmount = ajoCostAmount.Call<double>("doubleValue");
|
||||
adjustAttribution.costAmount = costAmount;
|
||||
}
|
||||
adjustAttribution.costCurrency = attribution.Get<string>(AdjustUtils.KeyCostCurrency) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyCostCurrency);
|
||||
adjustAttribution.fbInstallReferrer = attribution.Get<string>(AdjustUtils.KeyFbInstallReferrer) == "" ?
|
||||
null : attribution.Get<string>(AdjustUtils.KeyFbInstallReferrer);
|
||||
callback(adjustAttribution);
|
||||
}
|
||||
}
|
||||
|
||||
private class DeferredDeeplinkListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<string> callback;
|
||||
|
||||
public DeferredDeeplinkListener(Action<string> pCallback) : base("com.adjust.sdk.OnDeeplinkResponseListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public bool launchReceivedDeeplink(AndroidJavaObject deeplink)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return launchDeferredDeeplink;
|
||||
}
|
||||
|
||||
string deeplinkURL = deeplink.Call<string>("toString");
|
||||
callback(deeplinkURL);
|
||||
return launchDeferredDeeplink;
|
||||
}
|
||||
}
|
||||
|
||||
private class EventTrackingSucceededListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<AdjustEventSuccess> callback;
|
||||
|
||||
public EventTrackingSucceededListener(Action<AdjustEventSuccess> pCallback) : base("com.adjust.sdk.OnEventTrackingSucceededListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onFinishedEventTrackingSucceeded(AndroidJavaObject eventSuccessData)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (eventSuccessData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AdjustEventSuccess adjustEventSuccess = new AdjustEventSuccess();
|
||||
adjustEventSuccess.Adid = eventSuccessData.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : eventSuccessData.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustEventSuccess.Message = eventSuccessData.Get<string>(AdjustUtils.KeyMessage) == "" ?
|
||||
null : eventSuccessData.Get<string>(AdjustUtils.KeyMessage);
|
||||
adjustEventSuccess.Timestamp = eventSuccessData.Get<string>(AdjustUtils.KeyTimestamp) == "" ?
|
||||
null : eventSuccessData.Get<string>(AdjustUtils.KeyTimestamp);
|
||||
adjustEventSuccess.EventToken = eventSuccessData.Get<string>(AdjustUtils.KeyEventToken) == "" ?
|
||||
null : eventSuccessData.Get<string>(AdjustUtils.KeyEventToken);
|
||||
adjustEventSuccess.CallbackId = eventSuccessData.Get<string>(AdjustUtils.KeyCallbackId) == "" ?
|
||||
null : eventSuccessData.Get<string>(AdjustUtils.KeyCallbackId);
|
||||
|
||||
try
|
||||
{
|
||||
AndroidJavaObject ajoJsonResponse = eventSuccessData.Get<AndroidJavaObject>(AdjustUtils.KeyJsonResponse);
|
||||
string jsonResponseString = ajoJsonResponse.Call<string>("toString");
|
||||
adjustEventSuccess.BuildJsonResponseFromString(jsonResponseString);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// JSON response reading failed.
|
||||
// Native Android SDK should send empty JSON object if none available as of v4.12.5.
|
||||
// Native Android SDK added special logic to send Unity friendly values as of v4.15.0.
|
||||
}
|
||||
|
||||
callback(adjustEventSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
private class EventTrackingFailedListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<AdjustEventFailure> callback;
|
||||
|
||||
public EventTrackingFailedListener(Action<AdjustEventFailure> pCallback) : base("com.adjust.sdk.OnEventTrackingFailedListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onFinishedEventTrackingFailed(AndroidJavaObject eventFailureData)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (eventFailureData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AdjustEventFailure adjustEventFailure = new AdjustEventFailure();
|
||||
adjustEventFailure.Adid = eventFailureData.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : eventFailureData.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustEventFailure.Message = eventFailureData.Get<string>(AdjustUtils.KeyMessage) == "" ?
|
||||
null : eventFailureData.Get<string>(AdjustUtils.KeyMessage);
|
||||
adjustEventFailure.WillRetry = eventFailureData.Get<bool>(AdjustUtils.KeyWillRetry);
|
||||
adjustEventFailure.Timestamp = eventFailureData.Get<string>(AdjustUtils.KeyTimestamp) == "" ?
|
||||
null : eventFailureData.Get<string>(AdjustUtils.KeyTimestamp);
|
||||
adjustEventFailure.EventToken = eventFailureData.Get<string>(AdjustUtils.KeyEventToken) == "" ?
|
||||
null : eventFailureData.Get<string>(AdjustUtils.KeyEventToken);
|
||||
adjustEventFailure.CallbackId = eventFailureData.Get<string>(AdjustUtils.KeyCallbackId) == "" ?
|
||||
null : eventFailureData.Get<string>(AdjustUtils.KeyCallbackId);
|
||||
|
||||
try
|
||||
{
|
||||
AndroidJavaObject ajoJsonResponse = eventFailureData.Get<AndroidJavaObject>(AdjustUtils.KeyJsonResponse);
|
||||
string jsonResponseString = ajoJsonResponse.Call<string>("toString");
|
||||
adjustEventFailure.BuildJsonResponseFromString(jsonResponseString);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// JSON response reading failed.
|
||||
// Native Android SDK should send empty JSON object if none available as of v4.12.5.
|
||||
// Native Android SDK added special logic to send Unity friendly values as of v4.15.0.
|
||||
}
|
||||
|
||||
callback(adjustEventFailure);
|
||||
}
|
||||
}
|
||||
|
||||
private class SessionTrackingSucceededListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<AdjustSessionSuccess> callback;
|
||||
|
||||
public SessionTrackingSucceededListener(Action<AdjustSessionSuccess> pCallback) : base("com.adjust.sdk.OnSessionTrackingSucceededListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onFinishedSessionTrackingSucceeded(AndroidJavaObject sessionSuccessData)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (sessionSuccessData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AdjustSessionSuccess adjustSessionSuccess = new AdjustSessionSuccess();
|
||||
adjustSessionSuccess.Adid = sessionSuccessData.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : sessionSuccessData.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustSessionSuccess.Message = sessionSuccessData.Get<string>(AdjustUtils.KeyMessage) == "" ?
|
||||
null : sessionSuccessData.Get<string>(AdjustUtils.KeyMessage);
|
||||
adjustSessionSuccess.Timestamp = sessionSuccessData.Get<string>(AdjustUtils.KeyTimestamp) == "" ?
|
||||
null : sessionSuccessData.Get<string>(AdjustUtils.KeyTimestamp);
|
||||
|
||||
try
|
||||
{
|
||||
AndroidJavaObject ajoJsonResponse = sessionSuccessData.Get<AndroidJavaObject>(AdjustUtils.KeyJsonResponse);
|
||||
string jsonResponseString = ajoJsonResponse.Call<string>("toString");
|
||||
adjustSessionSuccess.BuildJsonResponseFromString(jsonResponseString);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// JSON response reading failed.
|
||||
// Native Android SDK should send empty JSON object if none available as of v4.12.5.
|
||||
// Native Android SDK added special logic to send Unity friendly values as of v4.15.0.
|
||||
}
|
||||
|
||||
callback(adjustSessionSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
private class SessionTrackingFailedListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<AdjustSessionFailure> callback;
|
||||
|
||||
public SessionTrackingFailedListener(Action<AdjustSessionFailure> pCallback) : base("com.adjust.sdk.OnSessionTrackingFailedListener")
|
||||
{
|
||||
this.callback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onFinishedSessionTrackingFailed(AndroidJavaObject sessionFailureData)
|
||||
{
|
||||
if (callback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (sessionFailureData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AdjustSessionFailure adjustSessionFailure = new AdjustSessionFailure();
|
||||
adjustSessionFailure.Adid = sessionFailureData.Get<string>(AdjustUtils.KeyAdid) == "" ?
|
||||
null : sessionFailureData.Get<string>(AdjustUtils.KeyAdid);
|
||||
adjustSessionFailure.Message = sessionFailureData.Get<string>(AdjustUtils.KeyMessage) == "" ?
|
||||
null : sessionFailureData.Get<string>(AdjustUtils.KeyMessage);
|
||||
adjustSessionFailure.WillRetry = sessionFailureData.Get<bool>(AdjustUtils.KeyWillRetry);
|
||||
adjustSessionFailure.Timestamp = sessionFailureData.Get<string>(AdjustUtils.KeyTimestamp) == "" ?
|
||||
null : sessionFailureData.Get<string>(AdjustUtils.KeyTimestamp);
|
||||
|
||||
try
|
||||
{
|
||||
AndroidJavaObject ajoJsonResponse = sessionFailureData.Get<AndroidJavaObject>(AdjustUtils.KeyJsonResponse);
|
||||
string jsonResponseString = ajoJsonResponse.Call<string>("toString");
|
||||
adjustSessionFailure.BuildJsonResponseFromString(jsonResponseString);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// JSON response reading failed.
|
||||
// Native Android SDK should send empty JSON object if none available as of v4.12.5.
|
||||
// Native Android SDK added special logic to send Unity friendly values as of v4.15.0.
|
||||
}
|
||||
|
||||
callback(adjustSessionFailure);
|
||||
}
|
||||
}
|
||||
|
||||
private class DeviceIdsReadListener : AndroidJavaProxy
|
||||
{
|
||||
private Action<string> onPlayAdIdReadCallback;
|
||||
|
||||
public DeviceIdsReadListener(Action<string> pCallback) : base("com.adjust.sdk.OnDeviceIdsRead")
|
||||
{
|
||||
this.onPlayAdIdReadCallback = pCallback;
|
||||
}
|
||||
|
||||
// Method must be lowercase to match Android method signature.
|
||||
public void onGoogleAdIdRead(string playAdId)
|
||||
{
|
||||
if (onPlayAdIdReadCallback == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.onPlayAdIdReadCallback(playAdId);
|
||||
}
|
||||
|
||||
// Handling of null object.
|
||||
public void onGoogleAdIdRead(AndroidJavaObject ajoAdId)
|
||||
{
|
||||
if (ajoAdId == null)
|
||||
{
|
||||
string adId = null;
|
||||
this.onGoogleAdIdRead(adId);
|
||||
return;
|
||||
}
|
||||
|
||||
this.onGoogleAdIdRead(ajoAdId.Call<string>("toString"));
|
||||
}
|
||||
}
|
||||
|
||||
// Private & helper methods.
|
||||
private static bool IsAppSecretSet(AdjustConfig adjustConfig)
|
||||
{
|
||||
return adjustConfig.secretId.HasValue
|
||||
&& adjustConfig.info1.HasValue
|
||||
&& adjustConfig.info2.HasValue
|
||||
&& adjustConfig.info3.HasValue
|
||||
&& adjustConfig.info4.HasValue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
8
Assets/Adjust/Android/AdjustAndroid.cs.meta
Normal file
8
Assets/Adjust/Android/AdjustAndroid.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b21499aaf10a42e8b6377af71a35ba5
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
49
Assets/Adjust/Android/AdjustAndroidManifest.xml
Normal file
49
Assets/Adjust/Android/AdjustAndroidManifest.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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" />
|
||||
|
||||
<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>
|
||||
4
Assets/Adjust/Android/AdjustAndroidManifest.xml.meta
Normal file
4
Assets/Adjust/Android/AdjustAndroidManifest.xml.meta
Normal file
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a13ef442648c346a79f9ff24875c037a
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
BIN
Assets/Adjust/Android/adjust-android.jar
Normal file
BIN
Assets/Adjust/Android/adjust-android.jar
Normal file
Binary file not shown.
33
Assets/Adjust/Android/adjust-android.jar.meta
Normal file
33
Assets/Adjust/Android/adjust-android.jar.meta
Normal 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
Assets/Adjust/Editor.meta
Normal file
9
Assets/Adjust/Editor.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b51771bcccf507e45b2db8213466a010
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
85
Assets/Adjust/Editor/AdjustCustomEditor.cs
Normal file
85
Assets/Adjust/Editor/AdjustCustomEditor.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
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.iadInfoReading = EditorGUILayout.Toggle("iAd Info Reading", adjust.iadInfoReading);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Assets/Adjust/Editor/AdjustCustomEditor.cs.meta
Normal file
13
Assets/Adjust/Editor/AdjustCustomEditor.cs.meta
Normal 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:
|
||||
348
Assets/Adjust/Editor/AdjustEditor.cs
Normal file
348
Assets/Adjust/Editor/AdjustEditor.cs
Normal file
@@ -0,0 +1,348 @@
|
||||
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)
|
||||
// - iAd.framework (needed in case you are running ASA campaigns)
|
||||
// - 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.iOSFrameworkiAd)
|
||||
{
|
||||
Debug.Log("[Adjust]: Adding iAd.framework to Xcode project.");
|
||||
xcodeProject.AddFrameworkToProject(xcodeTarget, "iAd.framework", true);
|
||||
Debug.Log("[Adjust]: iAd.framework added successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[Adjust]: Skipping iAd.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 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.");
|
||||
|
||||
// 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.");
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
8
Assets/Adjust/Editor/AdjustEditor.cs.meta
Normal file
8
Assets/Adjust/Editor/AdjustEditor.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc5962e0096e9495bbad76934c842619
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
365
Assets/Adjust/Editor/AdjustEditorPreprocessor.cs
Normal file
365
Assets/Adjust/Editor/AdjustEditorPreprocessor.cs
Normal 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
|
||||
}
|
||||
13
Assets/Adjust/Editor/AdjustEditorPreprocessor.cs.meta
Normal file
13
Assets/Adjust/Editor/AdjustEditorPreprocessor.cs.meta
Normal 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:
|
||||
28
Assets/Adjust/Editor/AdjustSettings.asset
Normal file
28
Assets/Adjust/Editor/AdjustSettings.asset
Normal file
@@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ea4d495dc6d5ba64b90db7afda6a48a4, type: 3}
|
||||
m_Name: AdjustSettings
|
||||
m_EditorClassIdentifier:
|
||||
_iOSFrameworkAdSupport: 1
|
||||
_iOSFrameworkiAd: 0
|
||||
_iOSFrameworkAdServices: 0
|
||||
_iOSFrameworkAppTrackingTransparency: 0
|
||||
_iOSFrameworkStoreKit: 0
|
||||
_androidPermissionInternet: 1
|
||||
_androidPermissionInstallReferrerService: 1
|
||||
_androidPermissionAdId: 1
|
||||
_androidPermissionAccessNetworkState: 0
|
||||
_iOSUserTrackingUsageDescription:
|
||||
_iOSUrlIdentifier:
|
||||
_iOSUrlSchemes: []
|
||||
_iOSUniversalLinksDomains: []
|
||||
androidUriSchemes: []
|
||||
8
Assets/Adjust/Editor/AdjustSettings.asset.meta
Normal file
8
Assets/Adjust/Editor/AdjustSettings.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a31d99032792e3c408acc58e27146961
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
165
Assets/Adjust/Editor/AdjustSettings.cs
Normal file
165
Assets/Adjust/Editor/AdjustSettings.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
// 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 _iOSFrameworkiAd = false;
|
||||
[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");
|
||||
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 iOSFrameworkiAd
|
||||
{
|
||||
get { return Instance._iOSFrameworkiAd; }
|
||||
set { Instance._iOSFrameworkiAd = 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; }
|
||||
}
|
||||
}
|
||||
13
Assets/Adjust/Editor/AdjustSettings.cs.meta
Normal file
13
Assets/Adjust/Editor/AdjustSettings.cs.meta
Normal 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:
|
||||
132
Assets/Adjust/Editor/AdjustSettingsEditor.cs
Normal file
132
Assets/Adjust/Editor/AdjustSettingsEditor.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace com.adjust.sdk
|
||||
{
|
||||
[CustomEditor(typeof(AdjustSettings))]
|
||||
public class AdjustSettingsEditor : Editor
|
||||
{
|
||||
SerializedProperty iOSFrameworkAdSupport;
|
||||
SerializedProperty iOSFrameworkiAd;
|
||||
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");
|
||||
iOSFrameworkiAd = serializedObject.FindProperty("_iOSFrameworkiAd");
|
||||
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(iOSFrameworkiAd,
|
||||
new GUIContent("iAd.framework",
|
||||
"iOS framework needed to support iAd based Apple Search Ads attribution"),
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Adjust/Editor/AdjustSettingsEditor.cs.meta
Normal file
11
Assets/Adjust/Editor/AdjustSettingsEditor.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e957ffb3938e94bcaab247e46bd9804c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Adjust/ExampleGUI.meta
Normal file
9
Assets/Adjust/ExampleGUI.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c173c46523b75714d945d694e8b89742
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
290
Assets/Adjust/ExampleGUI/ExampleGUI.cs
Normal file
290
Assets/Adjust/ExampleGUI/ExampleGUI.cs
Normal 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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/ExampleGUI/ExampleGUI.cs.meta
Normal file
8
Assets/Adjust/ExampleGUI/ExampleGUI.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 196c5c89d4b1e46dfbf423ae77d31a68
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
53
Assets/Adjust/ExampleGUI/ExampleGUI.prefab
Normal file
53
Assets/Adjust/ExampleGUI/ExampleGUI.prefab
Normal 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
|
||||
4
Assets/Adjust/ExampleGUI/ExampleGUI.prefab.meta
Normal file
4
Assets/Adjust/ExampleGUI/ExampleGUI.prefab.meta
Normal file
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50b53da2a7a154d63a33a49ad08c24a8
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
292
Assets/Adjust/ExampleGUI/ExampleGUI.unity
Normal file
292
Assets/Adjust/ExampleGUI/ExampleGUI.unity
Normal 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
|
||||
8
Assets/Adjust/ExampleGUI/ExampleGUI.unity.meta
Normal file
8
Assets/Adjust/ExampleGUI/ExampleGUI.unity.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6aa8afcd558084586bce9f8efd3eb5d6
|
||||
timeCreated: 1447689503
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Adjust/Prefab.meta
Normal file
9
Assets/Adjust/Prefab.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0acdd227ad1b8d147ade044242671e15
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652549
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
78
Assets/Adjust/Prefab/Adjust.prefab
Normal file
78
Assets/Adjust/Prefab/Adjust.prefab
Normal file
@@ -0,0 +1,78 @@
|
||||
%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
|
||||
iadInfoReading: 1
|
||||
adServicesInfoReading: 1
|
||||
idfaInfoReading: 1
|
||||
skAdNetworkHandling: 1
|
||||
7
Assets/Adjust/Prefab/Adjust.prefab.meta
Normal file
7
Assets/Adjust/Prefab/Adjust.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3267720e82aa41c1a05ab29824902b4
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: -1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Adjust/Unity.meta
Normal file
9
Assets/Adjust/Unity.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ac00d53de34e29419cae749db3f6528
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1016
Assets/Adjust/Unity/Adjust.cs
Normal file
1016
Assets/Adjust/Unity/Adjust.cs
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Adjust/Unity/Adjust.cs.meta
Normal file
8
Assets/Adjust/Unity/Adjust.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 525ece82a472e4dea837e1ef938fd15d
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
69
Assets/Adjust/Unity/AdjustAdRevenue.cs
Normal file
69
Assets/Adjust/Unity/AdjustAdRevenue.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Adjust/Unity/AdjustAdRevenue.cs.meta
Normal file
11
Assets/Adjust/Unity/AdjustAdRevenue.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 776a9d4b715bc44c68724248a5a75cb9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
56
Assets/Adjust/Unity/AdjustAppStoreSubscription.cs
Normal file
56
Assets/Adjust/Unity/AdjustAppStoreSubscription.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Adjust/Unity/AdjustAppStoreSubscription.cs.meta
Normal file
11
Assets/Adjust/Unity/AdjustAppStoreSubscription.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e2d69221b1124370a4c016edce5a95a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
85
Assets/Adjust/Unity/AdjustAttribution.cs
Normal file
85
Assets/Adjust/Unity/AdjustAttribution.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/Unity/AdjustAttribution.cs.meta
Normal file
8
Assets/Adjust/Unity/AdjustAttribution.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc46748ad0e664f6d839a4f1a23d9f47
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
289
Assets/Adjust/Unity/AdjustConfig.cs
Normal file
289
Assets/Adjust/Unity/AdjustConfig.cs
Normal file
@@ -0,0 +1,289 @@
|
||||
using System;
|
||||
|
||||
namespace com.adjust.sdk
|
||||
{
|
||||
public class AdjustConfig
|
||||
{
|
||||
public const string AdjustUrlStrategyChina = "china";
|
||||
public const string AdjustUrlStrategyIndia = "india";
|
||||
|
||||
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";
|
||||
|
||||
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;
|
||||
|
||||
// Android specific members
|
||||
internal string processName;
|
||||
internal bool? readImei;
|
||||
internal bool? preinstallTrackingEnabled;
|
||||
internal string preinstallFilePath;
|
||||
// iOS specific members
|
||||
internal bool? allowiAdInfoReading;
|
||||
internal bool? allowAdServicesInfoReading;
|
||||
internal bool? allowIdfaReading;
|
||||
internal bool? skAdNetworkHandling;
|
||||
internal bool? linkMeEnabled;
|
||||
// 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 setPlayStoreKidsAppEnabled(bool playStoreKidsAppEnabled)
|
||||
{
|
||||
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
|
||||
}
|
||||
|
||||
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 deactivateSKAdNetworkHandling()
|
||||
{
|
||||
this.skAdNetworkHandling = true;
|
||||
}
|
||||
|
||||
public void setLinkMeEnabled(bool linkMeEnabled)
|
||||
{
|
||||
this.linkMeEnabled = linkMeEnabled;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void setConversionValueUpdatedDelegate(Action<int> conversionValueUpdatedDelegate, string sceneName = "Adjust")
|
||||
{
|
||||
this.conversionValueUpdatedDelegate = conversionValueUpdatedDelegate;
|
||||
this.sceneName = sceneName;
|
||||
}
|
||||
|
||||
public Action<int> getConversionValueUpdatedDelegate()
|
||||
{
|
||||
return this.conversionValueUpdatedDelegate;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// iOS specific methods.
|
||||
public void setAllowiAdInfoReading(bool allowiAdInfoReading)
|
||||
{
|
||||
this.allowiAdInfoReading = allowiAdInfoReading;
|
||||
}
|
||||
|
||||
public void setAllowAdServicesInfoReading(bool allowAdServicesInfoReading)
|
||||
{
|
||||
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
|
||||
}
|
||||
|
||||
public void setAllowIdfaReading(bool allowIdfaReading)
|
||||
{
|
||||
this.allowIdfaReading = allowIdfaReading;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// Windows specific methods.
|
||||
public void setLogDelegate(Action<String> logDelegate)
|
||||
{
|
||||
this.logDelegate = logDelegate;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/Unity/AdjustConfig.cs.meta
Normal file
8
Assets/Adjust/Unity/AdjustConfig.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02d4cad14fc094b17afde3b685897e5e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
25
Assets/Adjust/Unity/AdjustEnvironment.cs
Normal file
25
Assets/Adjust/Unity/AdjustEnvironment.cs
Normal 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/Unity/AdjustEnvironment.cs.meta
Normal file
8
Assets/Adjust/Unity/AdjustEnvironment.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 633f6fa279b2244fdb999db0441f9aac
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
70
Assets/Adjust/Unity/AdjustEvent.cs
Normal file
70
Assets/Adjust/Unity/AdjustEvent.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
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 double? revenue;
|
||||
internal List<string> partnerList;
|
||||
internal List<string> callbackList;
|
||||
// iOS specific members
|
||||
internal string receipt;
|
||||
internal bool isReceiptSet;
|
||||
|
||||
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 setTransactionId(string transactionId)
|
||||
{
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public void setCallbackId(string callbackId)
|
||||
{
|
||||
this.callbackId = callbackId;
|
||||
}
|
||||
|
||||
// iOS specific methods
|
||||
[Obsolete("This is an obsolete method. Please use the adjust purchase SDK for purchase verification (https://github.com/adjust/unity_purchase_sdk)")]
|
||||
public void setReceipt(string receipt, string transactionId)
|
||||
{
|
||||
this.receipt = receipt;
|
||||
this.transactionId = transactionId;
|
||||
this.isReceiptSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/Unity/AdjustEvent.cs.meta
Normal file
8
Assets/Adjust/Unity/AdjustEvent.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd89f7713977f497a862f1a1b6f60933
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
92
Assets/Adjust/Unity/AdjustEventFailure.cs
Normal file
92
Assets/Adjust/Unity/AdjustEventFailure.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Adjust/Unity/AdjustEventFailure.cs.meta
Normal file
12
Assets/Adjust/Unity/AdjustEventFailure.cs.meta
Normal 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:
|
||||
85
Assets/Adjust/Unity/AdjustEventSuccess.cs
Normal file
85
Assets/Adjust/Unity/AdjustEventSuccess.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Adjust/Unity/AdjustEventSuccess.cs.meta
Normal file
12
Assets/Adjust/Unity/AdjustEventSuccess.cs.meta
Normal 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:
|
||||
63
Assets/Adjust/Unity/AdjustLogLevel.cs
Normal file
63
Assets/Adjust/Unity/AdjustLogLevel.cs
Normal 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Adjust/Unity/AdjustLogLevel.cs.meta
Normal file
8
Assets/Adjust/Unity/AdjustLogLevel.cs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 428ab44990df24973902248a9d2b43dd
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
54
Assets/Adjust/Unity/AdjustPlayStoreSubscription.cs
Normal file
54
Assets/Adjust/Unity/AdjustPlayStoreSubscription.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Adjust/Unity/AdjustPlayStoreSubscription.cs.meta
Normal file
11
Assets/Adjust/Unity/AdjustPlayStoreSubscription.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69e7a4074abb44758b3f011d8352a57a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
86
Assets/Adjust/Unity/AdjustSessionFailure.cs
Normal file
86
Assets/Adjust/Unity/AdjustSessionFailure.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Adjust/Unity/AdjustSessionFailure.cs.meta
Normal file
12
Assets/Adjust/Unity/AdjustSessionFailure.cs.meta
Normal 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:
|
||||
78
Assets/Adjust/Unity/AdjustSessionSuccess.cs
Normal file
78
Assets/Adjust/Unity/AdjustSessionSuccess.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Adjust/Unity/AdjustSessionSuccess.cs.meta
Normal file
12
Assets/Adjust/Unity/AdjustSessionSuccess.cs.meta
Normal 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:
|
||||
65
Assets/Adjust/Unity/AdjustThirdPartySharing.cs
Normal file
65
Assets/Adjust/Unity/AdjustThirdPartySharing.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Adjust/Unity/AdjustThirdPartySharing.cs.meta
Normal file
11
Assets/Adjust/Unity/AdjustThirdPartySharing.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcb2591dfab904327904b8879af699ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/Adjust/Unity/AdjustUrlStrategy.cs
Normal file
30
Assets/Adjust/Unity/AdjustUrlStrategy.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
Assets/Adjust/Unity/AdjustUrlStrategy.cs.meta
Normal file
13
Assets/Adjust/Unity/AdjustUrlStrategy.cs.meta
Normal 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:
|
||||
325
Assets/Adjust/Unity/AdjustUtils.cs
Normal file
325
Assets/Adjust/Unity/AdjustUtils.cs
Normal file
@@ -0,0 +1,325 @@
|
||||
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";
|
||||
|
||||
// For testing purposes.
|
||||
public static string KeyTestOptionsBaseUrl = "baseUrl";
|
||||
public static string KeyTestOptionsGdprUrl = "gdprUrl";
|
||||
public static string KeyTestOptionsSubscriptionUrl = "subscriptionUrl";
|
||||
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 KeyTestOptionsiAdFrameworkEnabled = "iAdFrameworkEnabled";
|
||||
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;
|
||||
}
|
||||
|
||||
#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]);
|
||||
|
||||
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]);
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
12
Assets/Adjust/Unity/AdjustUtils.cs.meta
Normal file
12
Assets/Adjust/Unity/AdjustUtils.cs.meta
Normal 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
Assets/Adjust/Windows.meta
Normal file
9
Assets/Adjust/Windows.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2eaef4e025b6a64c942a8a88ad33333
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
340
Assets/Adjust/Windows/AdjustWindows.cs
Normal file
340
Assets/Adjust/Windows/AdjustWindows.cs
Normal 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.32.2";
|
||||
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
|
||||
12
Assets/Adjust/Windows/AdjustWindows.cs.meta
Normal file
12
Assets/Adjust/Windows/AdjustWindows.cs.meta
Normal 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:
|
||||
142
Assets/Adjust/Windows/Newtonsoft.Json.dll.meta
Normal file
142
Assets/Adjust/Windows/Newtonsoft.Json.dll.meta
Normal 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:
|
||||
9
Assets/Adjust/Windows/Stubs.meta
Normal file
9
Assets/Adjust/Windows/Stubs.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f843c58f3da8cd04ca908f6ae7cc4584
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
142
Assets/Adjust/Windows/Stubs/Win10Interface.dll.meta
Normal file
142
Assets/Adjust/Windows/Stubs/Win10Interface.dll.meta
Normal 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:
|
||||
142
Assets/Adjust/Windows/Stubs/Win81Interface.dll.meta
Normal file
142
Assets/Adjust/Windows/Stubs/Win81Interface.dll.meta
Normal 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:
|
||||
142
Assets/Adjust/Windows/Stubs/WinWsInterface.dll.meta
Normal file
142
Assets/Adjust/Windows/Stubs/WinWsInterface.dll.meta
Normal 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
Assets/Adjust/Windows/W81.meta
Normal file
9
Assets/Adjust/Windows/W81.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a2e5ebe768d3b74a9047dc0592c78b1
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
132
Assets/Adjust/Windows/W81/AdjustWP81.dll.meta
Normal file
132
Assets/Adjust/Windows/W81/AdjustWP81.dll.meta
Normal 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:
|
||||
132
Assets/Adjust/Windows/W81/Win81Interface.dll.meta
Normal file
132
Assets/Adjust/Windows/W81/Win81Interface.dll.meta
Normal 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
Assets/Adjust/Windows/WS.meta
Normal file
9
Assets/Adjust/Windows/WS.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 200065618516a3b479c4dff78f23cdd9
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
132
Assets/Adjust/Windows/WS/AdjustWS.dll.meta
Normal file
132
Assets/Adjust/Windows/WS/AdjustWS.dll.meta
Normal 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:
|
||||
132
Assets/Adjust/Windows/WS/WinWsInterface.dll.meta
Normal file
132
Assets/Adjust/Windows/WS/WinWsInterface.dll.meta
Normal 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
Assets/Adjust/Windows/WU10.meta
Normal file
9
Assets/Adjust/Windows/WU10.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abbcaca8b21383f4eaece6c3b078825a
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
146
Assets/Adjust/Windows/WU10/AdjustUAP10.dll.meta
Normal file
146
Assets/Adjust/Windows/WU10/AdjustUAP10.dll.meta
Normal file
@@ -0,0 +1,146 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b969527d95894f4b8710cce1119c292
|
||||
timeCreated: 1509723106
|
||||
licenseType: Free
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
data:
|
||||
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 Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude WindowsStoreApps: 0
|
||||
Exclude iOS: 1
|
||||
Exclude tvOS: 1
|
||||
data:
|
||||
first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
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: UWP
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
data:
|
||||
first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
data:
|
||||
first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
151
Assets/Adjust/Windows/WU10/Win10Interface.dll.meta
Normal file
151
Assets/Adjust/Windows/WU10/Win10Interface.dll.meta
Normal file
@@ -0,0 +1,151 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64aebd589aa21cd489368a1570e09acd
|
||||
timeCreated: 1509723107
|
||||
licenseType: Free
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
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 Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude WindowsStoreApps: 0
|
||||
Exclude iOS: 1
|
||||
data:
|
||||
first:
|
||||
'': Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OS: AnyOS
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
data:
|
||||
first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
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/Win10Interface.dll
|
||||
SDK: UWP
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
data:
|
||||
first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
132
Assets/Adjust/Windows/WindowsPcl.dll.meta
Normal file
132
Assets/Adjust/Windows/WindowsPcl.dll.meta
Normal file
@@ -0,0 +1,132 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f29a24c7f8821a04b948fa281beaadc0
|
||||
timeCreated: 1509723108
|
||||
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: AnySDK
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
132
Assets/Adjust/Windows/WindowsUap.dll.meta
Normal file
132
Assets/Adjust/Windows/WindowsUap.dll.meta
Normal file
@@ -0,0 +1,132 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50382477c784d8146a4c96803ec33711
|
||||
timeCreated: 1509723107
|
||||
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: AnySDK
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Adjust/iOS.meta
Normal file
9
Assets/Adjust/iOS.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28da4e9eb3d011141b258019c71a8416
|
||||
folderAsset: yes
|
||||
timeCreated: 1578652520
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
80
Assets/Adjust/iOS/ADJAdRevenue.h
Normal file
80
Assets/Adjust/iOS/ADJAdRevenue.h
Normal file
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ADJAdRevenue.h
|
||||
// Adjust SDK
|
||||
//
|
||||
// Created by Uglješa Erceg (@uerceg) on 13th April 2021
|
||||
// Copyright (c) 2021 Adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* @brief Adjust ad revenue class.
|
||||
*/
|
||||
@interface ADJAdRevenue : NSObject<NSCopying>
|
||||
|
||||
/**
|
||||
* @brief Ad revenue source value.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *source;
|
||||
|
||||
/**
|
||||
* @brief Revenue value.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSNumber *revenue;
|
||||
|
||||
/**
|
||||
* @brief Currency value.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *currency;
|
||||
|
||||
/**
|
||||
* @brief Ad impressions count.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSNumber *adImpressionsCount;
|
||||
|
||||
/**
|
||||
* @brief Ad revenue network.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *adRevenueNetwork;
|
||||
|
||||
/**
|
||||
* @brief Ad revenue unit.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *adRevenueUnit;
|
||||
|
||||
/**
|
||||
* @brief Ad revenue placement.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *adRevenuePlacement;
|
||||
|
||||
/**
|
||||
* @brief List of partner parameters.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSDictionary *partnerParameters;
|
||||
|
||||
/**
|
||||
* @brief List of callback parameters.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSDictionary *callbackParameters;
|
||||
|
||||
|
||||
- (nullable id)initWithSource:(nonnull NSString *)source;
|
||||
|
||||
- (void)setRevenue:(double)amount currency:(nonnull NSString *)currency;
|
||||
|
||||
- (void)setAdImpressionsCount:(int)adImpressionsCount;
|
||||
|
||||
- (void)setAdRevenueNetwork:(nonnull NSString *)adRevenueNetwork;
|
||||
|
||||
- (void)setAdRevenueUnit:(nonnull NSString *)adRevenueUnit;
|
||||
|
||||
- (void)setAdRevenuePlacement:(nonnull NSString *)adRevenuePlacement;
|
||||
|
||||
- (void)addCallbackParameter:(nonnull NSString *)key value:(nonnull NSString *)value;
|
||||
|
||||
- (void)addPartnerParameter:(nonnull NSString *)key value:(nonnull NSString *)value;
|
||||
|
||||
- (BOOL)isValid;
|
||||
|
||||
@end
|
||||
24
Assets/Adjust/iOS/ADJAdRevenue.h.meta
Normal file
24
Assets/Adjust/iOS/ADJAdRevenue.h.meta
Normal file
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f382ac4ce0db3407baf40dd118470093
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
99
Assets/Adjust/iOS/ADJAttribution.h
Normal file
99
Assets/Adjust/iOS/ADJAttribution.h
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// ADJAttribution.h
|
||||
// adjust
|
||||
//
|
||||
// Created by Pedro Filipe on 29/10/14.
|
||||
// Copyright (c) 2014 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* @brief Adjust attribution object.
|
||||
*/
|
||||
@interface ADJAttribution : NSObject <NSCoding, NSCopying>
|
||||
|
||||
/**
|
||||
* @brief Tracker token.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *trackerToken;
|
||||
|
||||
/**
|
||||
* @brief Tracker name.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *trackerName;
|
||||
|
||||
/**
|
||||
* @brief Network name.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *network;
|
||||
|
||||
/**
|
||||
* @brief Campaign name.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *campaign;
|
||||
|
||||
/**
|
||||
* @brief Adgroup name.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *adgroup;
|
||||
|
||||
/**
|
||||
* @brief Creative name.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *creative;
|
||||
|
||||
/**
|
||||
* @brief Click label content.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *clickLabel;
|
||||
|
||||
/**
|
||||
* @brief Adjust identifier value.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *adid;
|
||||
|
||||
/**
|
||||
* @brief Cost type.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *costType;
|
||||
|
||||
/**
|
||||
* @brief Cost amount.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSNumber *costAmount;
|
||||
|
||||
/**
|
||||
* @brief Cost currency.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *costCurrency;
|
||||
|
||||
/**
|
||||
* @brief Make attribution object.
|
||||
*
|
||||
* @param jsonDict Dictionary holding attribution key value pairs.
|
||||
* @param adid Adjust identifier value.
|
||||
*
|
||||
* @return Adjust attribution object.
|
||||
*/
|
||||
+ (nullable ADJAttribution *)dataWithJsonDict:(nonnull NSDictionary *)jsonDict adid:(nonnull NSString *)adid;
|
||||
|
||||
- (nullable id)initWithJsonDict:(nonnull NSDictionary *)jsonDict adid:(nonnull NSString *)adid;
|
||||
|
||||
/**
|
||||
* @brief Check if given attribution equals current one.
|
||||
*
|
||||
* @param attribution Attribution object to be compared with current one.
|
||||
*
|
||||
* @return Boolean indicating whether two attribution objects are the equal.
|
||||
*/
|
||||
- (BOOL)isEqualToAttribution:(nonnull ADJAttribution *)attribution;
|
||||
|
||||
/**
|
||||
* @brief Get attribution value as dictionary.
|
||||
*
|
||||
* @return Dictionary containing attribution as key-value pairs.
|
||||
*/
|
||||
- (nullable NSDictionary *)dictionary;
|
||||
|
||||
@end
|
||||
21
Assets/Adjust/iOS/ADJAttribution.h.meta
Normal file
21
Assets/Adjust/iOS/ADJAttribution.h.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dddf8beb94ee49a7aba11b4e22e059c
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
276
Assets/Adjust/iOS/ADJConfig.h
Normal file
276
Assets/Adjust/iOS/ADJConfig.h
Normal file
@@ -0,0 +1,276 @@
|
||||
//
|
||||
// ADJConfig.h
|
||||
// adjust
|
||||
//
|
||||
// Created by Pedro Filipe on 30/10/14.
|
||||
// Copyright (c) 2014 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "ADJLogger.h"
|
||||
#import "ADJAttribution.h"
|
||||
#import "ADJEventSuccess.h"
|
||||
#import "ADJEventFailure.h"
|
||||
#import "ADJSessionSuccess.h"
|
||||
#import "ADJSessionFailure.h"
|
||||
|
||||
/**
|
||||
* @brief Optional delegate that will get informed about tracking results.
|
||||
*/
|
||||
@protocol AdjustDelegate
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when the attribution information changed.
|
||||
*
|
||||
* @param attribution The attribution information.
|
||||
*
|
||||
* @note See ADJAttribution for details.
|
||||
*/
|
||||
- (void)adjustAttributionChanged:(nullable ADJAttribution *)attribution;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when an event is tracked with success.
|
||||
*
|
||||
* @param eventSuccessResponseData The response information from tracking with success
|
||||
*
|
||||
* @note See ADJEventSuccess for details.
|
||||
*/
|
||||
- (void)adjustEventTrackingSucceeded:(nullable ADJEventSuccess *)eventSuccessResponseData;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when an event is tracked with failure.
|
||||
*
|
||||
* @param eventFailureResponseData The response information from tracking with failure
|
||||
*
|
||||
* @note See ADJEventFailure for details.
|
||||
*/
|
||||
- (void)adjustEventTrackingFailed:(nullable ADJEventFailure *)eventFailureResponseData;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when an session is tracked with success.
|
||||
*
|
||||
* @param sessionSuccessResponseData The response information from tracking with success
|
||||
*
|
||||
* @note See ADJSessionSuccess for details.
|
||||
*/
|
||||
- (void)adjustSessionTrackingSucceeded:(nullable ADJSessionSuccess *)sessionSuccessResponseData;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when an session is tracked with failure.
|
||||
*
|
||||
* @param sessionFailureResponseData The response information from tracking with failure
|
||||
*
|
||||
* @note See ADJSessionFailure for details.
|
||||
*/
|
||||
- (void)adjustSessionTrackingFailed:(nullable ADJSessionFailure *)sessionFailureResponseData;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when a deferred deep link is about to be opened by the adjust SDK.
|
||||
*
|
||||
* @param deeplink The deep link url that was received by the adjust SDK to be opened.
|
||||
*
|
||||
* @return Boolean that indicates whether the deep link should be opened by the adjust SDK or not.
|
||||
*/
|
||||
- (BOOL)adjustDeeplinkResponse:(nullable NSURL *)deeplink;
|
||||
|
||||
/**
|
||||
* @brief Optional delegate method that gets called when Adjust SDK sets conversion value for the user.
|
||||
*
|
||||
* @param conversionValue Conversion value used by Adjust SDK to invoke updateConversionValue: API.
|
||||
*/
|
||||
- (void)adjustConversionValueUpdated:(nullable NSNumber *)conversionValue;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* @brief Adjust configuration object class.
|
||||
*/
|
||||
@interface ADJConfig : NSObject<NSCopying>
|
||||
|
||||
/**
|
||||
* @brief SDK prefix.
|
||||
*
|
||||
* @note Not to be used by users, intended for non-native adjust SDKs only.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *sdkPrefix;
|
||||
|
||||
/**
|
||||
* @brief Default tracker to attribute organic installs to (optional).
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *defaultTracker;
|
||||
|
||||
@property (nonatomic, copy, nullable) NSString *externalDeviceId;
|
||||
|
||||
/**
|
||||
* @brief Adjust app token.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *appToken;
|
||||
|
||||
/**
|
||||
* @brief Adjust environment variable.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *environment;
|
||||
|
||||
/**
|
||||
* @brief Change the verbosity of Adjust's logs.
|
||||
*
|
||||
* @note You can increase or reduce the amount of logs from Adjust by passing
|
||||
* one of the following parameters. Use ADJLogLevelSuppress to disable all logging.
|
||||
* The desired minimum log level (default: info)
|
||||
* Must be one of the following:
|
||||
* - ADJLogLevelVerbose (enable all logging)
|
||||
* - ADJLogLevelDebug (enable more logging)
|
||||
* - ADJLogLevelInfo (the default)
|
||||
* - ADJLogLevelWarn (disable info logging)
|
||||
* - ADJLogLevelError (disable warnings as well)
|
||||
* - ADJLogLevelAssert (disable errors as well)
|
||||
* - ADJLogLevelSuppress (suppress all logging)
|
||||
*/
|
||||
@property (nonatomic, assign) ADJLogLevel logLevel;
|
||||
|
||||
/**
|
||||
* @brief Enable event buffering if your app triggers a lot of events.
|
||||
* When enabled, events get buffered and only get tracked each
|
||||
* minute. Buffered events are still persisted, of course.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL eventBufferingEnabled;
|
||||
|
||||
/**
|
||||
* @brief Set the optional delegate that will inform you about attribution or events.
|
||||
*
|
||||
* @note See the AdjustDelegate declaration above for details.
|
||||
*/
|
||||
@property (nonatomic, weak, nullable) NSObject<AdjustDelegate> *delegate;
|
||||
|
||||
/**
|
||||
* @brief Enables sending in the background.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL sendInBackground;
|
||||
|
||||
/**
|
||||
* @brief Enables/disables reading of iAd framework data needed for ASA tracking.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL allowiAdInfoReading;
|
||||
|
||||
/**
|
||||
* @brief Enables/disables reading of AdServices framework data needed for attribution.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL allowAdServicesInfoReading;
|
||||
|
||||
/**
|
||||
* @brief Enables/disables reading of IDFA parameter.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL allowIdfaReading;
|
||||
|
||||
/**
|
||||
* @brief Enables delayed start of the SDK.
|
||||
*/
|
||||
@property (nonatomic, assign) double delayStart;
|
||||
|
||||
/**
|
||||
* @brief User agent for the requests.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSString *userAgent;
|
||||
|
||||
/**
|
||||
* @brief Set if the device is known.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isDeviceKnown;
|
||||
|
||||
/**
|
||||
* @brief Set if cost data is needed in attribution response.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL needsCost;
|
||||
|
||||
/**
|
||||
* @brief Adjust app secret id.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *secretId;
|
||||
|
||||
/**
|
||||
* @brief Adjust app secret.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSString *appSecret;
|
||||
|
||||
/**
|
||||
* @brief Adjust set app secret.
|
||||
*/
|
||||
- (void)setAppSecret:(NSUInteger)secretId
|
||||
info1:(NSUInteger)info1
|
||||
info2:(NSUInteger)info2
|
||||
info3:(NSUInteger)info3
|
||||
info4:(NSUInteger)info4;
|
||||
|
||||
|
||||
@property (nonatomic, assign, readonly) BOOL isSKAdNetworkHandlingActive;
|
||||
|
||||
- (void)deactivateSKAdNetworkHandling;
|
||||
|
||||
/**
|
||||
* @brief Adjust url strategy.
|
||||
*/
|
||||
@property (nonatomic, copy, readwrite, nullable) NSString *urlStrategy;
|
||||
|
||||
/**
|
||||
* @brief Enables/disables linkMe
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL linkMeEnabled;
|
||||
|
||||
/**
|
||||
* @brief Get configuration object for the initialization of the Adjust SDK.
|
||||
*
|
||||
* @param appToken The App Token of your app. This unique identifier can
|
||||
* be found it in your dashboard at http://adjust.com and should always
|
||||
* be 12 characters long.
|
||||
* @param environment The current environment your app. We use this environment to
|
||||
* distinguish between real traffic and artificial traffic from test devices.
|
||||
* It is very important that you keep this value meaningful at all times!
|
||||
* Especially if you are tracking revenue.
|
||||
*
|
||||
* @returns Adjust configuration object.
|
||||
*/
|
||||
+ (nullable ADJConfig *)configWithAppToken:(nonnull NSString *)appToken
|
||||
environment:(nonnull NSString *)environment;
|
||||
|
||||
- (nullable id)initWithAppToken:(nonnull NSString *)appToken
|
||||
environment:(nonnull NSString *)environment;
|
||||
|
||||
/**
|
||||
* @brief Configuration object for the initialization of the Adjust SDK.
|
||||
*
|
||||
* @param appToken The App Token of your app. This unique identifier can
|
||||
* be found it in your dashboard at http://adjust.com and should always
|
||||
* be 12 characters long.
|
||||
* @param environment The current environment your app. We use this environment to
|
||||
* distinguish between real traffic and artificial traffic from test devices.
|
||||
* It is very important that you keep this value meaningful at all times!
|
||||
* Especially if you are tracking revenue.
|
||||
* @param allowSuppressLogLevel If set to true, it allows usage of ADJLogLevelSuppress
|
||||
* and replaces the default value for production environment.
|
||||
*
|
||||
* @returns Adjust configuration object.
|
||||
*/
|
||||
+ (nullable ADJConfig *)configWithAppToken:(nonnull NSString *)appToken
|
||||
environment:(nonnull NSString *)environment
|
||||
allowSuppressLogLevel:(BOOL)allowSuppressLogLevel;
|
||||
|
||||
- (nullable id)initWithAppToken:(nonnull NSString *)appToken
|
||||
environment:(nonnull NSString *)environment
|
||||
allowSuppressLogLevel:(BOOL)allowSuppressLogLevel;
|
||||
|
||||
/**
|
||||
* @brief Check if adjust configuration object is valid.
|
||||
*
|
||||
* @return Boolean indicating whether adjust config object is valid or not.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
/**
|
||||
* @brief Enable COPPA (Children's Online Privacy Protection Act) compliant for the application.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL coppaCompliantEnabled;
|
||||
|
||||
@end
|
||||
21
Assets/Adjust/iOS/ADJConfig.h.meta
Normal file
21
Assets/Adjust/iOS/ADJConfig.h.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c958f3cabffd44b6a58b8e0621ee82e
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
140
Assets/Adjust/iOS/ADJEvent.h
Normal file
140
Assets/Adjust/iOS/ADJEvent.h
Normal file
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// ADJEvent.h
|
||||
// adjust
|
||||
//
|
||||
// Created by Pedro Filipe on 15/10/14.
|
||||
// Copyright (c) 2014 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* @brief Adjust event class.
|
||||
*/
|
||||
@interface ADJEvent : NSObject<NSCopying>
|
||||
|
||||
/**
|
||||
* @brief Revenue attached to the event.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSNumber *revenue;
|
||||
|
||||
/**
|
||||
* @brief Event token.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *eventToken;
|
||||
|
||||
/**
|
||||
* @brief IAP transaction ID.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *transactionId;
|
||||
|
||||
/**
|
||||
* @brief Custom user defined event ID.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *callbackId;
|
||||
|
||||
/**
|
||||
* @brief Currency value.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *currency;
|
||||
|
||||
/**
|
||||
* @brief IAP receipt.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSData *receipt;
|
||||
|
||||
/**
|
||||
* @brief List of partner parameters.
|
||||
*/
|
||||
@property (nonatomic, readonly, nonnull) NSDictionary *partnerParameters;
|
||||
|
||||
/**
|
||||
* @brief List of callback parameters.
|
||||
*/
|
||||
@property (nonatomic, readonly, nonnull) NSDictionary *callbackParameters;
|
||||
|
||||
/**
|
||||
* @brief Is the given receipt empty.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL emptyReceipt;
|
||||
|
||||
/**
|
||||
* @brief Create Event object with event token.
|
||||
*
|
||||
* @param eventToken Event token that is created in the dashboard
|
||||
* at http://adjust.com and should be six characters long.
|
||||
*/
|
||||
+ (nullable ADJEvent *)eventWithEventToken:(nonnull NSString *)eventToken;
|
||||
|
||||
- (nullable id)initWithEventToken:(nonnull NSString *)eventToken;
|
||||
|
||||
/**
|
||||
* @brief Add a key-pair to a callback URL.
|
||||
*
|
||||
* @param key String key in the callback URL.
|
||||
* @param value String value of the key in the Callback URL.
|
||||
*
|
||||
* @note In your dashboard at http://adjust.com you can assign a callback URL to each
|
||||
* event type. That URL will get called every time the event is triggered. On
|
||||
* top of that you can add callback parameters to the following method that
|
||||
* will be forwarded to these callbacks.
|
||||
*/
|
||||
- (void)addCallbackParameter:(nonnull NSString *)key value:(nonnull NSString *)value;
|
||||
|
||||
/**
|
||||
* @brief Add a key-pair to be fowarded to a partner.
|
||||
*
|
||||
* @param key String key to be fowarded to the partner.
|
||||
* @param value String value of the key to be fowarded to the partner.
|
||||
*/
|
||||
- (void)addPartnerParameter:(nonnull NSString *)key value:(nonnull NSString *)value;
|
||||
|
||||
/**
|
||||
* @brief Set the revenue and associated currency of the event.
|
||||
*
|
||||
* @param amount The amount in units (example: for 1.50 EUR is 1.5).
|
||||
* @param currency String of the currency with ISO 4217 format.
|
||||
* It should be 3 characters long (example: for 1.50 EUR is @"EUR").
|
||||
*
|
||||
* @note The event can contain some revenue. The amount revenue is measured in units.
|
||||
* It must include a currency in the ISO 4217 format.
|
||||
*/
|
||||
- (void)setRevenue:(double)amount currency:(nonnull NSString *)currency;
|
||||
|
||||
/**
|
||||
* @brief Set the transaction ID of a In-App Purchases to avoid revenue duplications.
|
||||
*
|
||||
* @note A transaction ID can be used to avoid duplicate revenue events. The last ten
|
||||
* transaction identifiers are remembered.
|
||||
*
|
||||
* @param transactionId The identifier used to avoid duplicate revenue events.
|
||||
*/
|
||||
- (void)setTransactionId:(nonnull NSString *)transactionId;
|
||||
|
||||
/**
|
||||
* @brief Set the custom user defined ID for the event which will be reported in
|
||||
* success/failure callbacks.
|
||||
*
|
||||
* @param callbackId Custom user defined identifier for the event
|
||||
*/
|
||||
- (void)setCallbackId:(nonnull NSString *)callbackId;
|
||||
|
||||
/**
|
||||
* @brief Check if created adjust event object is valid.
|
||||
*
|
||||
* @return Boolean indicating whether the adjust event object is valid or not.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
/**
|
||||
* @brief Validate a in-app-purchase receipt.
|
||||
*
|
||||
* @param receipt The receipt to validate.
|
||||
* @param transactionId The identifier used to validate the receipt and to avoid duplicate revenue events.
|
||||
*
|
||||
* @note This method is obsolete and should not be used.
|
||||
* For more information, visit: https://github.com/adjust/ios_purchase_sdk
|
||||
*/
|
||||
- (void)setReceipt:(nonnull NSData *)receipt transactionId:(nonnull NSString *)transactionId;
|
||||
|
||||
@end
|
||||
21
Assets/Adjust/iOS/ADJEvent.h.meta
Normal file
21
Assets/Adjust/iOS/ADJEvent.h.meta
Normal file
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 426362cccd2154c908b504e138832851
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
55
Assets/Adjust/iOS/ADJEventFailure.h
Normal file
55
Assets/Adjust/iOS/ADJEventFailure.h
Normal file
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ADJEventFailure.h
|
||||
// adjust
|
||||
//
|
||||
// Created by Pedro Filipe on 17/02/16.
|
||||
// Copyright © 2016 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ADJEventFailure : NSObject
|
||||
|
||||
/**
|
||||
* @brief Message from the adjust backend.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString * message;
|
||||
|
||||
/**
|
||||
* @brief Timestamp from the adjust backend.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString * timeStamp;
|
||||
|
||||
/**
|
||||
* @brief Adjust identifier of the device.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString * adid;
|
||||
|
||||
/**
|
||||
* @brief Event token value.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString * eventToken;
|
||||
|
||||
/**
|
||||
* @brief Event callback ID.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *callbackId;
|
||||
|
||||
/**
|
||||
* @brief Information whether sending of the package will be retried or not.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL willRetry;
|
||||
|
||||
/**
|
||||
* @brief Backend response in JSON format.
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary *jsonResponse;
|
||||
|
||||
/**
|
||||
* @brief Initialisation method.
|
||||
*
|
||||
* @return ADJEventFailure instance.
|
||||
*/
|
||||
+ (ADJEventFailure *)eventFailureResponseData;
|
||||
|
||||
@end
|
||||
147
Assets/Adjust/iOS/ADJEventFailure.h.meta
Normal file
147
Assets/Adjust/iOS/ADJEventFailure.h.meta
Normal file
@@ -0,0 +1,147 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b274a5403f60c4e7ca731709d03d1ee8
|
||||
timeCreated: 1458122523
|
||||
licenseType: Free
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
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 iOS: 0
|
||||
Exclude tvOS: 1
|
||||
data:
|
||||
first:
|
||||
'': Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OS: AnyOS
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
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:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
data:
|
||||
first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
50
Assets/Adjust/iOS/ADJEventSuccess.h
Normal file
50
Assets/Adjust/iOS/ADJEventSuccess.h
Normal file
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// ADJEventSuccess.h
|
||||
// adjust
|
||||
//
|
||||
// Created by Pedro Filipe on 17/02/16.
|
||||
// Copyright © 2016 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ADJEventSuccess : NSObject
|
||||
|
||||
/**
|
||||
* @brief Message from the adjust backend.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *message;
|
||||
|
||||
/**
|
||||
* @brief Timestamp from the adjust backend.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *timeStamp;
|
||||
|
||||
/**
|
||||
* @brief Adjust identifier of the device.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *adid;
|
||||
|
||||
/**
|
||||
* @brief Event token value.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *eventToken;
|
||||
|
||||
/**
|
||||
* @brief Event callback ID.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *callbackId;
|
||||
|
||||
/**
|
||||
* @brief Backend response in JSON format.
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary *jsonResponse;
|
||||
|
||||
/**
|
||||
* @brief Initialisation method.
|
||||
*
|
||||
* @return ADJEventSuccess instance.
|
||||
*/
|
||||
+ (ADJEventSuccess *)eventSuccessResponseData;
|
||||
|
||||
@end
|
||||
147
Assets/Adjust/iOS/ADJEventSuccess.h.meta
Normal file
147
Assets/Adjust/iOS/ADJEventSuccess.h.meta
Normal file
@@ -0,0 +1,147 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65ff11a24f3b043759b70623a745a004
|
||||
timeCreated: 1458122523
|
||||
licenseType: Free
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
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 iOS: 0
|
||||
Exclude tvOS: 1
|
||||
data:
|
||||
first:
|
||||
'': Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OS: AnyOS
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
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:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
data:
|
||||
first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/Adjust/iOS/ADJLinkResolution.h
Normal file
17
Assets/Adjust/iOS/ADJLinkResolution.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ADJLinkResolution.h
|
||||
// Adjust
|
||||
//
|
||||
// Created by Pedro S. on 26.04.21.
|
||||
// Copyright © 2021 adjust GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ADJLinkResolution : NSObject
|
||||
|
||||
+ (void)resolveLinkWithUrl:(nonnull NSURL *)url
|
||||
resolveUrlSuffixArray:(nullable NSArray<NSString *> *)resolveUrlSuffixArray
|
||||
callback:(nonnull void (^)(NSURL *_Nullable resolvedLink))callback;
|
||||
|
||||
@end
|
||||
24
Assets/Adjust/iOS/ADJLinkResolution.h.meta
Normal file
24
Assets/Adjust/iOS/ADJLinkResolution.h.meta
Normal file
@@ -0,0 +1,24 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6eb7389a3c5c4df6ba3506c8fd4ad2c
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user