diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATNativeItemProperty.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATNativeItemProperty.cs index 8264978..1987121 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATNativeItemProperty.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATNativeItemProperty.cs @@ -46,10 +46,14 @@ namespace AnyThinkAds.Api{ this.y = y; this.width = width; this.height = height; - this.usesPixel = false; this.backgroundColor = backgroundColor; this.textColor = textColor; this.textSize = textSize; + #if UNITY_ANDROID + this.usesPixel = true; + #else + this.usesPixel = false; + #endif } } } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATRect.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATRect.cs index 7a40130..10ed73e 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATRect.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATRect.cs @@ -21,15 +21,18 @@ namespace AnyThinkAds.Api this.y = y; this.width = width; this.height = height; - this.usesPixel = false; } public int x = 0; public int y = 0; public int width = 0; public int height = 0; - public bool usesPixel = false; - + // public bool usesPixel = false; + #if UNITY_ANDROID + public bool usesPixel = true; + #else + public bool usesPixel = false; + #endif } public class ATSize @@ -45,11 +48,15 @@ namespace AnyThinkAds.Api { this.width = width; this.height = height; - this.usesPixel = false; } public int width = 0; public int height = 0; - public bool usesPixel = false; + + #if UNITY_ANDROID + public bool usesPixel = true; + #else + public bool usesPixel = false; + #endif } } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATSDKAPI.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATSDKAPI.cs index 46ae217..93f60ef 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATSDKAPI.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATSDKAPI.cs @@ -93,6 +93,11 @@ namespace AnyThinkAds.Api client.showDebuggerUI(); } + public static void showDebuggerUI(string debugKey) + { + client.showDebuggerUI(debugKey); + } + public static void setGDPRLevel(int level) { client.setGDPRLevel(level); diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar index 89c8c57..9098530 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs index c781841..5783db0 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs @@ -10,6 +10,7 @@ namespace AnyThinkAds.Common void initSDK(string appId, string appKey); void initSDK(string appId, string appKey, ATSDKInitListener listener); void showDebuggerUI(); + void showDebuggerUI(string debugKey); void getUserLocation(ATGetUserLocationListener listener); void setGDPRLevel(int level); void showGDPRAuth(); diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/ATAdsClientFactory.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/ATAdsClientFactory.cs index ea1f1f4..dfd4504 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/ATAdsClientFactory.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/ATAdsClientFactory.cs @@ -163,6 +163,7 @@ namespace AnyThinkAds public void setWXStatus(bool install) { } public void setLocation(double longitude, double latitude) { } public void showDebuggerUI() {} + public void showDebuggerUI(string debugKey) {} } class UnityBannerClient:IATBannerAdClient diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATBannerAdClient.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATBannerAdClient.cs index 7428ead..0bf6c68 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATBannerAdClient.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATBannerAdClient.cs @@ -153,7 +153,7 @@ namespace AnyThinkAds.Android try{ if (bannerHelperMap.ContainsKey(placementId)) { - this.bannerHelperMap[placementId].Call ("showBannerAd", rect.x, rect.y, rect.width, rect.height, mapJson); + this.bannerHelperMap[placementId].Call ("showBannerAd", rect.x, rect.y, rect.width, rect.height, mapJson, rect.usesPixel); } }catch(System.Exception e){ System.Console.WriteLine("Exception caught: {0}", e); diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATSDKAPIClient.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATSDKAPIClient.cs index c64fec3..9be644b 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATSDKAPIClient.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/Android/ATSDKAPIClient.cs @@ -373,11 +373,15 @@ namespace AnyThinkAds.Android } public void showDebuggerUI() { + showDebuggerUI(""); + } + + public void showDebuggerUI(string debugKey) { try { if (this.sdkInitHelper != null) { - this.sdkInitHelper.Call("showDebuggerUI"); + this.sdkInitHelper.Call("showDebuggerUI", debugKey); } } catch (System.Exception e) diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs index cbc85aa..3a2d91c 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs @@ -200,5 +200,10 @@ namespace AnyThinkAds.iOS { Debug.Log("Unity:ATSDKAPIClient::showDebuggerUI()"); ATManager.showDebuggerUI(); } + + public void showDebuggerUI(string debugKey) + { + //TODO 待iOS支持线上测试的SDK版本上线 + } } } diff --git a/Assets/AnyThinkPlugin/Script/Editor/ATPostProcessBuildiOS.cs b/Assets/AnyThinkPlugin/Script/Editor/ATPostProcessBuildiOS.cs index d931489..27c2492 100644 --- a/Assets/AnyThinkPlugin/Script/Editor/ATPostProcessBuildiOS.cs +++ b/Assets/AnyThinkPlugin/Script/Editor/ATPostProcessBuildiOS.cs @@ -24,6 +24,7 @@ namespace AnyThink.Scripts.Editor public class TopOnPostProcessBuildiOS { + private static string mBuildPath; private static readonly List AtsRequiringNetworks = new List { @@ -47,14 +48,53 @@ namespace AnyThink.Scripts.Editor dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "StartAppSDK/StartApp.xcframework")); dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "BigoADS/BigoADS/BigoADS.xcframework")); dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "BigoADS/BigoADS/OMSDK_Bigosg.xcframework")); - dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "HyBid/PubnativeLite/PubnativeLite/OMSDK-1.3.29/OMSDK_Pubnativenet.xcframework")); dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "Fyber_Marketplace_SDK/IASDKCore/IASDKCore.xcframework")); + dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "InMobiSDK/InMobiSDK.xcframework")); + //pubnative + dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "ATOM-Standalone/ATOM.xcframework")); + string pubNativePath = Path.Combine(mBuildPath, "Pods/HyBid/PubnativeLite/PubnativeLite"); + if (Directory.Exists(pubNativePath)) { + // 获取所有以"OMSDK-"开头的子目录 + string[] subDirectories = Directory.GetDirectories(pubNativePath, "OMSDK-*"); + if (subDirectories.Length > 0) { + string versionDirectory= subDirectories[0]; + string versionDirectoryName = Path.GetFileName(versionDirectory); + // ATLog.logError("DynamicLibraryPathsToEmbed() >>> pubNative versionDirectoryName: " + versionDirectoryName); + dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "HyBid/PubnativeLite/PubnativeLite/" + versionDirectoryName + "/OMSDK_Pubnativenet.xcframework")); + } + } + //applovin + string applovinPath = Path.Combine(mBuildPath, "Pods/AppLovinSDK"); + if (Directory.Exists(applovinPath)) { + // 获取所有以"applovin-ios-sdk-"开头的子目录 + string[] applovinSubDirectories = Directory.GetDirectories(applovinPath, "applovin-ios-sdk-*"); + if (applovinSubDirectories.Length > 0) { + string applovinVersionDirectory = applovinSubDirectories[0]; + string applovinVersionDirectoryName = Path.GetFileName(applovinVersionDirectory); + // ATLog.logError("DynamicLibraryPathsToEmbed() >>> applovinVersionDirectoryName: " + applovinVersionDirectoryName); + dynamicLibraryPathsToEmbed.Add(Path.Combine("Pods/", "AppLovinSDK/" + applovinVersionDirectoryName + "/AppLovinSDK.xcframework")); + } + } return dynamicLibraryPathsToEmbed; } } + //读取本地已安装network的版本号:network_data.json + // private static string getNetworkVersion(string networkDataJsonFilePath) + // { + // if (!File.Exists(networkDataJsonFilePath)) { + // return ""; + // } + // string jsonData = File.ReadAllText(networkDataJsonFilePath); + // var networkLocalData = JsonUtility.FromJson(a_json); + // if (networkLocalData != null) { + // return networkLocalData.version; + // } + // retrun ""; + // } + private static List BunldePathsToAdd { get { @@ -134,6 +174,8 @@ namespace AnyThink.Scripts.Editor private static void EmbedDynamicLibrariesIfNeeded(string buildPath, PBXProject project, string targetGuid) { + mBuildPath = buildPath; + ATLog.log("EmbedDynamicLibrariesIfNeeded() >>> buildPath: " + buildPath); var dynamicLibraryPathsPresentInProject = DynamicLibraryPathsToEmbed.Where(dynamicLibraryPath => Directory.Exists(Path.Combine(buildPath, dynamicLibraryPath))).ToList(); if (dynamicLibraryPathsPresentInProject.Count <= 0) return; diff --git a/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs b/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs index 427ff06..061e28f 100644 --- a/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs +++ b/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs @@ -16,9 +16,10 @@ namespace AnyThink.Scripts.IntegrationManager.Editor public class ATConfig { -public static string PLUGIN_VERSION = "2.1.1"; +public static string PLUGIN_VERSION = "2.1.3"; public static bool isDebug = false; + public static int PLUGIN_TYPE = 1; public static int OS_ANDROID = 1; public static int OS_IOS = 2; public static int CHINA_COUNTRY = 1; @@ -328,48 +329,63 @@ public static bool isDebug = false; //获取admob app id public static string getAdmobAppIdByOs(int os) { var pluginSettingData = getPluginSettingData(); + if (pluginSettingData == null) { + return ""; + } var settingData = pluginSettingData.getCountrySettingData(); return settingData.getAdmobAppId(os); } public static bool enableAndroidX() { var pluginSettingData = getPluginSettingData(); + if (pluginSettingData == null) { + return false; + } return pluginSettingData.getCountrySettingData().androidXSetting == 1; } public static bool isDefaultAndroidX() { var pluginSettingData = getPluginSettingData(); + if (pluginSettingData == null) { + return false; + } return pluginSettingData.getCountrySettingData().androidXSetting == 0; } //获取默认选中的地区 public static int getDefCountry() { - string version = PLUGIN_VERSION; - int lastIndex = version.LastIndexOf('.'); + // string version = PLUGIN_VERSION; + // int lastIndex = version.LastIndexOf('.'); - if (lastIndex != -1) - { - //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件 - string lastPart = version.Substring(lastIndex + 1); - if (lastPart.Length == 2) { - return NONCHINA_COUNTRY; - } + // if (lastIndex != -1) + // { + // //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件 + // string lastPart = version.Substring(lastIndex + 1); + // if (lastPart.Length == 2) { + // return NONCHINA_COUNTRY; + // } + // } + if(PLUGIN_TYPE == 2) { + return NONCHINA_COUNTRY; } return CHINA_COUNTRY; } public static string[] getCountryArray() { // new string[] { "ChinaMainland", "Overseas" } - string version = PLUGIN_VERSION; - int lastIndex = version.LastIndexOf('.'); + // string version = PLUGIN_VERSION; + // int lastIndex = version.LastIndexOf('.'); - if (lastIndex != -1) - { - //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件 - string lastPart = version.Substring(lastIndex + 1); - if (lastPart.Length == 2) { - return new string[] { "Overseas" }; - } + // if (lastIndex != -1) + // { + // //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件 + // string lastPart = version.Substring(lastIndex + 1); + // if (lastPart.Length == 2) { + // return new string[] { "Overseas" }; + // } + // } + if(PLUGIN_TYPE == 2) { + return new string[] { "Overseas" }; } return new string[] { "ChinaMainland", "Overseas" }; } diff --git a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.IOSResolver.dll.meta b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.IOSResolver.dll.meta index 5457a30..3e4f117 100644 --- a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.IOSResolver.dll.meta +++ b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.IOSResolver.dll.meta @@ -1,21 +1,18 @@ fileFormatVersion: 2 -guid: 5552c54c11d94016bcfe740f27df44a6 -labels: -- gvh -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.177/Google.IOSResolver.dll -- gvhp_targets-editor -timeCreated: 1480838400 +guid: cdbad4cb68f85450db4d76d94f7e32a8 PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: - Any: + Any: second: enabled: 0 settings: {} @@ -31,6 +28,6 @@ PluginImporter: enabled: 0 settings: CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.JarResolver.dll.meta b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.JarResolver.dll.meta index 2b43bba..60a662b 100644 --- a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.JarResolver.dll.meta +++ b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.JarResolver.dll.meta @@ -1,21 +1,18 @@ fileFormatVersion: 2 -guid: 1f4f113972f04c3695341dfb3ba48d3b -labels: -- gvh -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.177/Google.JarResolver.dll -- gvhp_targets-editor -timeCreated: 1480838400 +guid: 6825d727c7fc54515a67f5c88a893763 PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: - Any: + Any: second: enabled: 0 settings: {} @@ -31,6 +28,6 @@ PluginImporter: enabled: 0 settings: CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.PackageManagerResolver.dll.meta b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.PackageManagerResolver.dll.meta index 2e94805..c67d7cf 100644 --- a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.PackageManagerResolver.dll.meta +++ b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.PackageManagerResolver.dll.meta @@ -1,21 +1,18 @@ fileFormatVersion: 2 -guid: 413ed4abd14645c38ebbd8c5ff26e9de -labels: -- gvh -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.177/Google.PackageManagerResolver.dll -- gvhp_targets-editor -timeCreated: 1480838400 +guid: eaa3f3ba5fb074092a8dc2523a55ee6e PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: - Any: + Any: second: enabled: 0 settings: {} @@ -31,6 +28,6 @@ PluginImporter: enabled: 0 settings: CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.VersionHandlerImpl.dll.meta b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.VersionHandlerImpl.dll.meta index a6a4454..47bdcf7 100644 --- a/Assets/ExternalDependencyManager/Editor/1.2.177/Google.VersionHandlerImpl.dll.meta +++ b/Assets/ExternalDependencyManager/Editor/1.2.177/Google.VersionHandlerImpl.dll.meta @@ -1,21 +1,18 @@ fileFormatVersion: 2 -guid: 38d0b40a7b2d44c6a6a2362599bfc41e -labels: -- gvh -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/1.2.177/Google.VersionHandlerImpl.dll -- gvhp_targets-editor -timeCreated: 1480838400 +guid: 6cb6437754caa42a7b6e62ef2c63d2e1 PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: - Any: + Any: second: enabled: 0 settings: {} @@ -31,6 +28,6 @@ PluginImporter: enabled: 0 settings: CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta index a35483b..f8a5668 100644 --- a/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta +++ b/Assets/ExternalDependencyManager/Editor/Google.VersionHandler.dll.meta @@ -1,21 +1,18 @@ fileFormatVersion: 2 -guid: 86460262ea60447dbb6a62d21167790f -labels: -- gvh -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/Google.VersionHandler.dll -- gvhp_targets-editor -timeCreated: 1480838400 +guid: 8c409ab99e4f4317b2bec2f54be2a2fc PluginImporter: externalObjects: {} serializedVersion: 2 iconMap: {} executionOrder: {} + defineConstraints: [] isPreloaded: 0 isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 platformData: - first: - Any: + Any: second: enabled: 0 settings: {} @@ -31,6 +28,6 @@ PluginImporter: enabled: 0 settings: CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.177_manifest.txt.meta b/Assets/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.177_manifest.txt.meta index 2adb22e..026ae30 100644 --- a/Assets/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.177_manifest.txt.meta +++ b/Assets/ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.177_manifest.txt.meta @@ -1,15 +1,7 @@ fileFormatVersion: 2 -guid: 2764c5ea3b354f3cb7ca80028fd08da2 -labels: -- gvh -- gvh_manifest -- gvh_version-1.2.177 -- gvhp_exportpath-ExternalDependencyManager/Editor/external-dependency-manager_version-1.2.177_manifest.txt -- gvhp_manifestname-0External Dependency Manager -- gvhp_manifestname-play-services-resolver -timeCreated: 1474401009 -licenseType: Pro +guid: 36bce0d90658a447380074e3b9958ed0 TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 6dd9dc2..95aa5d1 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -775,6 +775,7 @@ PlayerSettings: webGLPowerPreference: 2 scriptingDefineSymbols: Android: AnyThinkSDKEditor + Standalone: AnyThinkSDKEditor additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: {} @@ -785,7 +786,7 @@ PlayerSettings: allowUnsafeCode: 0 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 2 + selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1