You've already forked Commercialization.topon
update 2.1.3
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
#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;
|
||||
|
||||
#if UNITY_ANDROID
|
||||
public bool usesPixel = true;
|
||||
#else
|
||||
public bool usesPixel = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Binary file not shown.
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -200,5 +200,10 @@ namespace AnyThinkAds.iOS {
|
||||
Debug.Log("Unity:ATSDKAPIClient::showDebuggerUI()");
|
||||
ATManager.showDebuggerUI();
|
||||
}
|
||||
|
||||
public void showDebuggerUI(string debugKey)
|
||||
{
|
||||
//TODO 待iOS支持线上测试的SDK版本上线
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace AnyThink.Scripts.Editor
|
||||
|
||||
public class TopOnPostProcessBuildiOS
|
||||
{
|
||||
private static string mBuildPath;
|
||||
|
||||
private static readonly List<string> AtsRequiringNetworks = new List<string>
|
||||
{
|
||||
@@ -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<NetworkLocalData>(a_json);
|
||||
// if (networkLocalData != null) {
|
||||
// return networkLocalData.version;
|
||||
// }
|
||||
// retrun "";
|
||||
// }
|
||||
|
||||
private static List<string> 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;
|
||||
|
||||
|
||||
@@ -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,49 +329,64 @@ 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) {
|
||||
// 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) {
|
||||
// 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" };
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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:
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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:
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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:
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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:
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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:
|
||||
|
||||
@@ -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:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user