fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -6,7 +6,7 @@ namespace AppsFlyerSDK
|
||||
{
|
||||
public class AppsFlyer : MonoBehaviour
|
||||
{
|
||||
public static readonly string kAppsFlyerPluginVersion = "6.15.3";
|
||||
public static readonly string kAppsFlyerPluginVersion = "6.16.21";
|
||||
public static string CallBackObjectName = null;
|
||||
private static EventHandler onRequestResponse;
|
||||
private static EventHandler onInAppResponse;
|
||||
|
||||
@@ -398,7 +398,12 @@ namespace AppsFlyerSDK
|
||||
public void setConsentData(AppsFlyerConsent appsFlyerConsent)
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
appsFlyerAndroid.CallStatic("setConsentData", appsFlyerConsent.isUserSubjectToGDPR, appsFlyerConsent.hasConsentForDataUsage, appsFlyerConsent.hasConsentForAdsPersonalization);
|
||||
string isUserSubjectToGDPR = appsFlyerConsent.isUserSubjectToGDPR?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForDataUsage = appsFlyerConsent.hasConsentForDataUsage?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForAdsPersonalization = appsFlyerConsent.hasConsentForAdsPersonalization?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForAdStorage = appsFlyerConsent.hasConsentForAdStorage?.ToString().ToLower() ?? "null";
|
||||
|
||||
appsFlyerAndroid.CallStatic("setConsentData", isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization, hasConsentForAdStorage);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -10,26 +10,45 @@ namespace AppsFlyerSDK
|
||||
// This class should be used to notify and record the user's applicability
|
||||
// under GDPR, their general consent to data usage, and their consent to personalized
|
||||
// advertisements based on user data.
|
||||
|
||||
// Note that the consent for data usage and ads personalization pair is only applicable when the user is
|
||||
// subject to GDPR guidelines. Therefore, the following factory methods should be used accordingly:
|
||||
// - Use [forGDPRUser] when the user is subject to GDPR.
|
||||
// - Use [forNonGDPRUser] when the user is not subject to GDPR.
|
||||
|
||||
// @property isUserSubjectToGDPR Indicates whether GDPR regulations apply to the user (true if the user is
|
||||
// a subject of GDPR). It also serves as a flag for compliance with relevant aspects of DMA regulations.
|
||||
// @property hasConsentForDataUsage Indicates whether the user has consented to the use of their data for advertising
|
||||
// purposes under both GDPR and DMA guidelines (true if the user has consented, nullable if not subject to GDPR).
|
||||
// @property hasConsentForAdsPersonalization Indicates whether the user has consented to the use of their data for
|
||||
// personalized advertising within the boundaries of GDPR and DMA rules (true if the user has consented to
|
||||
// personalized ads, nullable if not subject to GDPR).
|
||||
/// ## Properties:
|
||||
/// - `isUserSubjectToGDPR` (optional) - Indicates whether GDPR regulations apply to the user.
|
||||
/// This may also serve as a general compliance flag for other regional regulations.
|
||||
/// - `hasConsentForDataUsage` (optional) - Indicates whether the user consents to the processing
|
||||
/// of their data for advertising purposes.
|
||||
/// - `hasConsentForAdsPersonalization` (optional) - Indicates whether the user consents to the
|
||||
/// use of their data for personalized advertising.
|
||||
/// - `hasConsentForAdStorage` (optional) - Indicates whether the user consents to ad-related storage access.
|
||||
///
|
||||
/// **Usage Example:**
|
||||
/// ```csharp
|
||||
/// var consent = new AppsFlyerConsent(
|
||||
/// isUserSubjectToGDPR: true,
|
||||
/// hasConsentForDataUsage: true,
|
||||
/// hasConsentForAdsPersonalization: false,
|
||||
/// hasConsentForAdStorage: true
|
||||
/// );
|
||||
/// **Deprecated APIs:**
|
||||
/// - `ForGDPRUser(...)` and `ForNonGDPRUser(...)` should no longer be used.
|
||||
/// - Use `new AppsFlyerConsent(...)` instead with relevant consent fields.
|
||||
///
|
||||
/// </summary>
|
||||
public class AppsFlyerConsent
|
||||
{
|
||||
public bool isUserSubjectToGDPR { get; private set; }
|
||||
public bool hasConsentForDataUsage { get; private set; }
|
||||
public bool hasConsentForAdsPersonalization { get; private set; }
|
||||
public bool? isUserSubjectToGDPR { get; private set; }
|
||||
public bool? hasConsentForDataUsage { get; private set; }
|
||||
public bool? hasConsentForAdsPersonalization { get; private set; }
|
||||
public bool? hasConsentForAdStorage { get; private set; }
|
||||
|
||||
public AppsFlyerConsent( bool? isUserSubjectToGDPR = null, bool? hasConsentForDataUsage = null, bool? hasConsentForAdsPersonalization = null, bool? hasConsentForAdStorage = null)
|
||||
{
|
||||
this.isUserSubjectToGDPR = isUserSubjectToGDPR;
|
||||
this.hasConsentForDataUsage = hasConsentForDataUsage;
|
||||
this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;
|
||||
this.hasConsentForAdStorage = hasConsentForAdStorage;
|
||||
}
|
||||
|
||||
[Obsolete("Use the new constructor with optional booleans instead.")]
|
||||
private AppsFlyerConsent(bool isGDPR, bool hasForDataUsage, bool hasForAdsPersonalization)
|
||||
{
|
||||
isUserSubjectToGDPR = isGDPR;
|
||||
@@ -37,15 +56,16 @@ namespace AppsFlyerSDK
|
||||
hasConsentForAdsPersonalization = hasForAdsPersonalization;
|
||||
}
|
||||
|
||||
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
|
||||
public static AppsFlyerConsent ForGDPRUser(bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization)
|
||||
{
|
||||
return new AppsFlyerConsent(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);
|
||||
}
|
||||
|
||||
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
|
||||
public static AppsFlyerConsent ForNonGDPRUser()
|
||||
{
|
||||
return new AppsFlyerConsent(false, false, false);
|
||||
return new AppsFlyerConsent(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -215,7 +215,12 @@ public void startSDK(bool shouldCallback, string CallBackObjectName)
|
||||
public void setConsentData(AppsFlyerConsent appsFlyerConsent)
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
_setConsentData(appsFlyerConsent.isUserSubjectToGDPR, appsFlyerConsent.hasConsentForDataUsage, appsFlyerConsent.hasConsentForAdsPersonalization);
|
||||
string isUserSubjectToGDPR = appsFlyerConsent.isUserSubjectToGDPR?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForDataUsage = appsFlyerConsent.hasConsentForDataUsage?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForAdsPersonalization = appsFlyerConsent.hasConsentForAdsPersonalization?.ToString().ToLower() ?? "null";
|
||||
string hasConsentForAdStorage = appsFlyerConsent.hasConsentForAdStorage?.ToString().ToLower() ?? "null";
|
||||
|
||||
_setConsentData(isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization, hasConsentForAdStorage);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -760,7 +765,7 @@ public void startSDK(bool shouldCallback, string CallBackObjectName)
|
||||
#elif UNITY_STANDALONE_OSX
|
||||
[DllImport("AppsFlyerBundle")]
|
||||
#endif
|
||||
private static extern void _setConsentData(bool isUserSubjectToGDPR, bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization);
|
||||
private static extern void _setConsentData(string isUserSubjectToGDPR, string hasConsentForDataUsage, string hasConsentForAdsPersonalization, string hasConsentForAdStorage);
|
||||
|
||||
#if UNITY_IOS
|
||||
[DllImport("__Internal")]
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<dependencies>
|
||||
|
||||
<androidPackages>
|
||||
<androidPackage spec="com.appsflyer:af-android-sdk:6.15.0">
|
||||
<androidPackage spec="com.appsflyer:af-android-sdk:6.16.2">
|
||||
</androidPackage>
|
||||
<androidPackage spec="com.appsflyer:unity-wrapper:6.15.3">
|
||||
<androidPackage spec="com.appsflyer:unity-wrapper:6.16.21">
|
||||
</androidPackage>
|
||||
<androidPackage spec="com.android.installreferrer:installreferrer:2.1">
|
||||
</androidPackage>
|
||||
</androidPackages>
|
||||
|
||||
<iosPods>
|
||||
<iosPod name="AppsFlyerFramework" version="6.15.2" minTargetSdk="12.0">
|
||||
<iosPod name="AppsFlyerFramework" version="6.16.2" minTargetSdk="12.0">
|
||||
</iosPod>
|
||||
</iosPods>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96a328019e42349aabc478b546b8605e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 682114f7790724ab3b9410e89bbc076c
|
||||
folderAsset: yes
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28175da64865f4e398b3b9ddfbe97b24
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20G417</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AppsFlyerBundle</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.appsflyer.support.two.AppsFlyerBundle</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AppsFlyerBundle</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>13A1030d</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>12.0</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>21A344</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx12.0</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1310</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>13A1030d</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.6</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58a86b0b376564c06bf8ce29e1dbfb04
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 218a2e7ff5a4c461981bc41f7d7bfeba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0889edee891d84a8eb0b7cc87071b91e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16068f30788004029bd487756623799b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,115 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict/>
|
||||
<key>files2</key>
|
||||
<dict/>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 724b52b308e9a4a6d889d7bf3945a2ca
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -18,6 +18,7 @@ static char* getCString(const char* string);
|
||||
static AppsFlyerLinkGenerator* generatorFromDictionary(NSDictionary* dictionary, AppsFlyerLinkGenerator* generator);
|
||||
static EmailCryptType emailCryptTypeFromInt(int emailCryptTypeInt);
|
||||
static AppsFlyerAdRevenueMediationNetworkType mediationNetworkTypeFromInt(int mediationNetwork);
|
||||
static NSNumber *intFromNullableBool(const char *cStr);
|
||||
static NSString* stringFromDeepLinkResultStatus(AFSDKDeepLinkResultStatus deepLinkResult);
|
||||
static NSString* stringFromDeepLinkResultError(AppsFlyerDeepLinkResult *result);
|
||||
|
||||
|
||||
@@ -108,6 +108,18 @@ static EmailCryptType emailCryptTypeFromInt(int emailCryptTypeInt){
|
||||
return emailCryptType;
|
||||
}
|
||||
|
||||
static NSNumber *intFromNullableBool(const char *cStr) {
|
||||
if (!cStr) return nil;
|
||||
NSString *str = [NSString stringWithUTF8String:cStr];
|
||||
|
||||
if ([str caseInsensitiveCompare:@"true"] == NSOrderedSame) {
|
||||
return @YES;
|
||||
} else if ([str caseInsensitiveCompare:@"false"] == NSOrderedSame) {
|
||||
return @NO;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
static AppsFlyerAdRevenueMediationNetworkType mediationNetworkTypeFromInt(int mediationNetworkInt){
|
||||
|
||||
AppsFlyerAdRevenueMediationNetworkType mediationNetworkType;
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
#import "AppsFlyerAttribution.h"
|
||||
#if __has_include(<AppsFlyerLib/AppsFlyerLib.h>)
|
||||
#import <AppsFlyerLib/AppsFlyerLib.h>
|
||||
#import "AppsFlyerLib/AppsFlyerLib-Swift.h"
|
||||
#else
|
||||
#import "AppsFlyerLib.h"
|
||||
#import "AppsFlyerLib-Swift.h"
|
||||
#endif
|
||||
|
||||
@interface AppsFlyeriOSWarpper : NSObject <AppsFlyerLibDelegate, AppsFlyerDeepLinkDelegate>
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
|
||||
const void _startSDK(bool shouldCallback, const char* objectName) {
|
||||
[[AppsFlyerLib shared] setPluginInfoWith: AFSDKPluginUnity
|
||||
pluginVersion:@"6.15.3"
|
||||
pluginVersion:@"6.16.21"
|
||||
additionalParams:nil];
|
||||
startRequestObjectName = stringFromChar(objectName);
|
||||
AppsFlyeriOSWarpper.didCallStart = YES;
|
||||
@@ -87,14 +87,19 @@ extern "C" {
|
||||
[[AppsFlyerLib shared] enableTCFDataCollection:shouldCollectTcfData];
|
||||
}
|
||||
|
||||
const void _setConsentData(bool isUserSubjectToGDPR, bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization) {
|
||||
AppsFlyerConsent *consentData = nil;
|
||||
if (isUserSubjectToGDPR) {
|
||||
consentData = [[AppsFlyerConsent alloc] initForGDPRUserWithHasConsentForDataUsage:hasConsentForDataUsage hasConsentForAdsPersonalization:hasConsentForAdsPersonalization];
|
||||
} else {
|
||||
consentData = [[AppsFlyerConsent alloc] initNonGDPRUser];
|
||||
}
|
||||
[[AppsFlyerLib shared] setConsentData:consentData];
|
||||
const void _setConsentData(const char* isUserSubjectToGDPR, const char* hasConsentForDataUsage, const char* hasConsentForAdsPersonalization, const char* hasConsentForAdStorage) {
|
||||
|
||||
NSNumber *gdpr = intFromNullableBool(isUserSubjectToGDPR);
|
||||
NSNumber *dataUsage = intFromNullableBool(hasConsentForDataUsage);
|
||||
NSNumber *adsPersonalization = intFromNullableBool(hasConsentForAdsPersonalization);
|
||||
NSNumber *adStorage = intFromNullableBool(hasConsentForAdStorage);
|
||||
|
||||
AppsFlyerConsent *consentData = [[AppsFlyerConsent alloc] initWithIsUserSubjectToGDPR:gdpr
|
||||
hasConsentForDataUsage:dataUsage
|
||||
hasConsentForAdsPersonalization:adsPersonalization
|
||||
hasConsentForAdStorage:adStorage];
|
||||
|
||||
[[AppsFlyerLib shared] setConsentData:consentData];
|
||||
}
|
||||
|
||||
const void _logAdRevenue(const char* monetizationNetwork, int mediationNetworkInt, const char* currencyIso4217Code, double eventRevenue, const char* additionalParameters) {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f19f272c71674582bed1d93925da003
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5b4579db85b4cfd8395bfb19aa309e
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 642cf65ed2573419bab7e7d44fc73181
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a5ccbd864ba94a9a9ba47895ff14922
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee45ae2608f3c44d08fc6e21a94d133f
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "Tests",
|
||||
"references": [
|
||||
"UnityEngine.TestRunner",
|
||||
"UnityEditor.TestRunner",
|
||||
"AppsFlyer"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"nunit.framework.dll",
|
||||
"NSubstitute.dll",
|
||||
"Castle.Core.dll",
|
||||
"System.Threading.Tasks.Extensions.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_INCLUDE_TESTS"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f155a0e4c9ab48eeb4b54b2dc0aeba7
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,810 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using NSubstitute;
|
||||
|
||||
namespace AppsFlyerSDK.Tests
|
||||
{
|
||||
public class NewTestScript
|
||||
{
|
||||
|
||||
[Test]
|
||||
public void test_startSDK_called()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.startSDK();
|
||||
AppsFlyerMOCKInterface.Received().startSDK(Arg.Any<bool>(), Arg.Any<string>());
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_sendEvent_withValues()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
var eventParams = new Dictionary<string, string>();
|
||||
eventParams.Add("key", "value");
|
||||
AppsFlyer.sendEvent("testevent", eventParams);
|
||||
AppsFlyerMOCKInterface.Received().sendEvent("testevent", eventParams, false, null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_sendEvent_withNullParams()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.sendEvent("testevent", null);
|
||||
AppsFlyerMOCKInterface.Received().sendEvent("testevent", null,false, null);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void test_isSDKStopped_true()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.stopSDK(true);
|
||||
|
||||
AppsFlyerMOCKInterface.Received().stopSDK(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_isSDKStopped_false()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
AppsFlyer.stopSDK(false);
|
||||
|
||||
AppsFlyerMOCKInterface.Received().stopSDK(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_isSDKStopped_called()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
var isSDKStopped = AppsFlyer.isSDKStopped();
|
||||
|
||||
AppsFlyerMOCKInterface.Received().isSDKStopped();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_isSDKStopped_receveivedFalse()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
var isSDKStopped = AppsFlyer.isSDKStopped();
|
||||
|
||||
Assert.AreEqual(AppsFlyerMOCKInterface.Received().isSDKStopped(), false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void test_getSdkVersion_called()
|
||||
{
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.getSdkVersion();
|
||||
AppsFlyerMOCKInterface.Received().getSdkVersion();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void test_setCustomerUserId_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCustomerUserId("test");
|
||||
AppsFlyerMOCKInterface.Received().setCustomerUserId("test");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setAppInviteOneLinkID_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setAppInviteOneLinkID("2f36");
|
||||
AppsFlyerMOCKInterface.Received().setAppInviteOneLinkID("2f36");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setAdditionalData_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
var customData = new Dictionary<string, string>();
|
||||
customData.Add("test", "test");
|
||||
AppsFlyer.setAdditionalData(customData);
|
||||
AppsFlyerMOCKInterface.Received().setAdditionalData(customData);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setResolveDeepLinkURLs_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setResolveDeepLinkURLs("url1", "url2");
|
||||
AppsFlyerMOCKInterface.Received().setResolveDeepLinkURLs("url1", "url2");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setOneLinkCustomDomain_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setOneLinkCustomDomain("url1", "url2");
|
||||
AppsFlyerMOCKInterface.Received().setOneLinkCustomDomain("url1", "url2");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setCurrencyCode_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCurrencyCode("usd");
|
||||
AppsFlyerMOCKInterface.Received().setCurrencyCode("usd");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_recordLocation_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.recordLocation(0.3, 5.2);
|
||||
AppsFlyerMOCKInterface.Received().recordLocation(0.3, 5.2);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_anonymizeUser_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.anonymizeUser(true);
|
||||
AppsFlyerMOCKInterface.Received().anonymizeUser(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_anonymizeUser_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.anonymizeUser(false);
|
||||
AppsFlyerMOCKInterface.Received().anonymizeUser(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_getAppsFlyerId_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.getAppsFlyerId();
|
||||
AppsFlyerMOCKInterface.Received().getAppsFlyerId();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setMinTimeBetweenSessions_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setMinTimeBetweenSessions(3);
|
||||
AppsFlyerMOCKInterface.Received().setMinTimeBetweenSessions(3);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setHost_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setHost("prefix", "name");
|
||||
AppsFlyerMOCKInterface.Received().setHost("prefix", "name");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_setPhoneNumber_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setPhoneNumber("002");
|
||||
AppsFlyerMOCKInterface.Received().setPhoneNumber("002");
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[System.Obsolete]
|
||||
public void Test_setSharingFilterForAllPartners_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setSharingFilterForAllPartners();
|
||||
AppsFlyerMOCKInterface.Received().setSharingFilterForAllPartners();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[System.Obsolete]
|
||||
public void Test_setSharingFilter_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
|
||||
AppsFlyer.setSharingFilter("filter1", "filter2");
|
||||
AppsFlyerMOCKInterface.Received().setSharingFilter("filter1", "filter2");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_getConversionData_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
AppsFlyer.getConversionData("ObjectName");
|
||||
AppsFlyerMOCKInterface.Received().getConversionData("ObjectName");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_attributeAndOpenStore_called_withParams()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||
parameters.Add("af_sub1", "val");
|
||||
parameters.Add("custom_param", "val2");
|
||||
AppsFlyer.attributeAndOpenStore("appid", "campaign", parameters, new MonoBehaviour());
|
||||
AppsFlyerMOCKInterface.Received().attributeAndOpenStore("appid", "campaign", parameters, Arg.Any<MonoBehaviour>());
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_attributeAndOpenStore_called_nullParams()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
AppsFlyer.attributeAndOpenStore("appid", "campaign", null, new MonoBehaviour());
|
||||
AppsFlyerMOCKInterface.Received().attributeAndOpenStore("appid", "campaign", null, Arg.Any<MonoBehaviour>());
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_recordCrossPromoteImpression_calledWithParameters()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||
parameters.Add("af_sub1", "val");
|
||||
parameters.Add("custom_param", "val2");
|
||||
AppsFlyer.recordCrossPromoteImpression("appid", "campaign", parameters);
|
||||
AppsFlyerMOCKInterface.Received().recordCrossPromoteImpression("appid", "campaign", parameters);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void Test_recordCrossPromoteImpression_calledWithoutParameters()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.recordCrossPromoteImpression("appid", "campaign", null);
|
||||
AppsFlyerMOCKInterface.Received().recordCrossPromoteImpression("appid", "campaign", null);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_generateUserInviteLink_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
|
||||
AppsFlyer.generateUserInviteLink(new Dictionary<string, string>(), new MonoBehaviour());
|
||||
AppsFlyerMOCKInterface.Received().generateUserInviteLink(Arg.Any<Dictionary<string, string>>(), Arg.Any<MonoBehaviour>());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Test_addPushNotificationDeepLinkPath_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerNativeBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.addPushNotificationDeepLinkPath("path1", "path2");
|
||||
AppsFlyerMOCKInterface.Received().addPushNotificationDeepLinkPath("path1", "path2");
|
||||
|
||||
}
|
||||
|
||||
#if UNITY_ANDROID
|
||||
[Test]
|
||||
public void updateServerUninstallToken_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.updateServerUninstallToken("tokenTest");
|
||||
AppsFlyerMOCKInterface.Received().updateServerUninstallToken("tokenTest");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setImeiData_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setImeiData("imei");
|
||||
AppsFlyerMOCKInterface.Received().setImeiData("imei");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setAndroidIdData_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setAndroidIdData("androidId");
|
||||
AppsFlyerMOCKInterface.Received().setAndroidIdData("androidId");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void waitForCustomerUserId_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.waitForCustomerUserId(true);
|
||||
AppsFlyerMOCKInterface.Received().waitForCustomerUserId(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setCustomerIdAndStartSDK_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCustomerIdAndStartSDK("01234");
|
||||
AppsFlyerMOCKInterface.Received().setCustomerIdAndStartSDK("01234");
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void getOutOfStore_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.getOutOfStore();
|
||||
AppsFlyerMOCKInterface.Received().getOutOfStore();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setOutOfStore_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setOutOfStore("test");
|
||||
AppsFlyerMOCKInterface.Received().setOutOfStore("test");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setCollectAndroidID_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCollectAndroidID(true);
|
||||
AppsFlyerMOCKInterface.Received().setCollectAndroidID(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setCollectIMEI_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCollectIMEI(true);
|
||||
AppsFlyerMOCKInterface.Received().setCollectIMEI(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setIsUpdate_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setIsUpdate(true);
|
||||
AppsFlyerMOCKInterface.Received().setIsUpdate(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setPreinstallAttribution_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setPreinstallAttribution("mediaSourceTestt", "campaign", "sideId");
|
||||
AppsFlyerMOCKInterface.Received().setPreinstallAttribution("mediaSourceTestt", "campaign", "sideId");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void isPreInstalledApp_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.isPreInstalledApp();
|
||||
AppsFlyerMOCKInterface.Received().isPreInstalledApp();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void getAttributionId_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.getAttributionId();
|
||||
AppsFlyerMOCKInterface.Received().getAttributionId();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void handlePushNotifications_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.handlePushNotifications();
|
||||
AppsFlyerMOCKInterface.Received().handlePushNotifications();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void validateAndSendInAppPurchase_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.validateAndSendInAppPurchase("ewjkekwjekw","hewjehwj", "purchaseData", "3.0", "USD", null, null);
|
||||
AppsFlyerMOCKInterface.Received().validateAndSendInAppPurchase("ewjkekwjekw", "hewjehwj", "purchaseData", "3.0", "USD", null, null);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setCollectOaid_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCollectOaid(true);
|
||||
AppsFlyerMOCKInterface.Received().setCollectOaid(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setDisableAdvertisingIdentifiers_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableAdvertisingIdentifiers(true);
|
||||
AppsFlyerMOCKInterface.Received().setDisableAdvertisingIdentifiers(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setDisableNetworkData_called() {
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerAndroidBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableNetworkData(true);
|
||||
AppsFlyerMOCKInterface.Received().setDisableNetworkData(true);
|
||||
}
|
||||
#elif UNITY_IOS
|
||||
|
||||
[Test]
|
||||
public void setDisableCollectAppleAdSupport_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableCollectAppleAdSupport(true);
|
||||
AppsFlyerMOCKInterface.Received().setDisableCollectAppleAdSupport(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setDisableCollectAppleAdSupport_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableCollectAppleAdSupport(false);
|
||||
AppsFlyerMOCKInterface.Received().setDisableCollectAppleAdSupport(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[System.Obsolete]
|
||||
public void setShouldCollectDeviceName_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setShouldCollectDeviceName(true);
|
||||
AppsFlyerMOCKInterface.Received().setShouldCollectDeviceName(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[System.Obsolete]
|
||||
public void setShouldCollectDeviceName_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setShouldCollectDeviceName(false);
|
||||
AppsFlyerMOCKInterface.Received().setShouldCollectDeviceName(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setDisableCollectIAd_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableCollectIAd(true);
|
||||
AppsFlyerMOCKInterface.Received().setDisableCollectIAd(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setDisableCollectIAd_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setDisableCollectIAd(false);
|
||||
AppsFlyerMOCKInterface.Received().setDisableCollectIAd(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setUseReceiptValidationSandbox_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setUseReceiptValidationSandbox(true);
|
||||
AppsFlyerMOCKInterface.Received().setUseReceiptValidationSandbox(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setUseReceiptValidationSandbox_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setUseReceiptValidationSandbox(false);
|
||||
AppsFlyerMOCKInterface.Received().setUseReceiptValidationSandbox(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ssetUseUninstallSandbox_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setUseUninstallSandbox(true);
|
||||
AppsFlyerMOCKInterface.Received().setUseUninstallSandbox(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setUseUninstallSandbox_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setUseUninstallSandbox(false);
|
||||
AppsFlyerMOCKInterface.Received().setUseUninstallSandbox(false);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void validateAndSendInAppPurchase_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.validateAndSendInAppPurchase("3d2", "5.0","USD", "45", null, null);
|
||||
AppsFlyerMOCKInterface.Received().validateAndSendInAppPurchase("3d2", "5.0", "USD", "45", null, null);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void registerUninstall_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
byte[] token = System.Text.Encoding.UTF8.GetBytes("740f4707 bebcf74f 9b7c25d4 8e335894 5f6aa01d a5ddb387 462c7eaf 61bb78ad");
|
||||
AppsFlyer.registerUninstall(token);
|
||||
AppsFlyerMOCKInterface.Received().registerUninstall(token);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void handleOpenUrl_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.handleOpenUrl("www.test.com", "appTest", "test");
|
||||
AppsFlyerMOCKInterface.Received().handleOpenUrl("www.test.com", "appTest", "test");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void waitForATTUserAuthorizationWithTimeoutInterval_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(30);
|
||||
AppsFlyerMOCKInterface.Received().waitForATTUserAuthorizationWithTimeoutInterval(30);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void setCurrentDeviceLanguage_called()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.setCurrentDeviceLanguage("en");
|
||||
AppsFlyerMOCKInterface.Received().setCurrentDeviceLanguage("en");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void disableSKAdNetwork_called_true()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.disableSKAdNetwork(true);
|
||||
AppsFlyerMOCKInterface.Received().disableSKAdNetwork(true);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void disableSKAdNetwork_called_false()
|
||||
{
|
||||
|
||||
var AppsFlyerMOCKInterface = Substitute.For<IAppsFlyerIOSBridge>();
|
||||
|
||||
AppsFlyer.instance = AppsFlyerMOCKInterface;
|
||||
AppsFlyer.disableSKAdNetwork(false);
|
||||
AppsFlyerMOCKInterface.Received().disableSKAdNetwork(false);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b1a24aa01166451d804d7c03c14a3db
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "appsflyer-unity-plugin",
|
||||
"displayName": "AppsFlyer",
|
||||
"description": "AppsFlyer Unity plugin",
|
||||
"version": "6.15.2",
|
||||
"version": "6.16.2",
|
||||
"unity": "2019.4",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user