Skip to content

Commit

Permalink
demoapp/bump_applovin_plugin_6.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AppLovin-Mobile-Engineering committed Aug 21, 2024
1 parent 233500b commit a322c2d
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 21 deletions.
2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions DemoApp/Assets/MaxSdk/AppLovin/Editor/Dependencies.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="com.applovin:applovin-sdk:12.6.0" />
<androidPackage spec="com.applovin:applovin-sdk:12.6.1" />
</androidPackages>
<iosPods>
<iosPod name="AppLovinSDK" version="12.6.0" />
<iosPod name="AppLovinSDK" version="12.6.1" />
</iosPods>
</dependencies>
2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin/Plugins/Android.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin/Plugins/iOS.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "MAUnityAdManager.h"

#define VERSION @"6.6.2"
#define VERSION @"6.6.3"
#define NSSTRING(_X) ( (_X != NULL) ? [NSString stringWithCString: _X encoding: NSStringEncodingConversionAllowLossy].al_stringByTrimmingWhitespace : nil)

@interface NSString (ALUtils)
Expand Down
2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/Prefabs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/Resources/Images.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class AppLovinPostProcessiOS
private const string UseFrameworksDynamicPodfileLine = "use_frameworks! :linkage => :dynamic";
private const string UseFrameworksStaticPodfileLine = "use_frameworks! :linkage => :static";

private const string LegacyResourcesDirectoryName = "Resources";
private const string ResourcesDirectoryName = "Resources";
private const string AppLovinMaxResourcesDirectoryName = "AppLovinMAXResources";
private const string AppLovinAdvertisingAttributionEndpoint = "https://postbacks-app.com";

Expand Down Expand Up @@ -367,9 +367,7 @@ private static string GetDynamicLibraryRelativePath(string dynamicLibraryAbsolut

private static void LocalizeUserTrackingDescriptionIfNeeded(string localizedUserTrackingDescription, string localeCode, string buildPath, PBXProject project, string targetGuid)
{
// Use the legacy resources directory name if the build is being appended (the "Resources" directory already exists if it is an incremental build).
var resourcesDirectoryName = Directory.Exists(Path.Combine(buildPath, LegacyResourcesDirectoryName)) ? LegacyResourcesDirectoryName : AppLovinMaxResourcesDirectoryName;
var resourcesDirectoryPath = Path.Combine(buildPath, resourcesDirectoryName);
var resourcesDirectoryPath = Path.Combine(buildPath, AppLovinMaxResourcesDirectoryName);
var localeSpecificDirectoryName = localeCode + ".lproj";
var localeSpecificDirectoryPath = Path.Combine(resourcesDirectoryPath, localeSpecificDirectoryName);
var infoPlistStringsFilePath = Path.Combine(localeSpecificDirectoryPath, "InfoPlist.strings");
Expand All @@ -383,6 +381,15 @@ private static void LocalizeUserTrackingDescriptionIfNeeded(string localizedUser
return;
}

// Log an error if we detect a localization file for this language in the `Resources` directory
var legacyResourcedDirectoryPath = Path.Combine(buildPath, ResourcesDirectoryName);
var localeSpecificLegacyDirectoryPath = Path.Combine(legacyResourcedDirectoryPath, localeSpecificDirectoryName);
if (Directory.Exists(localeSpecificLegacyDirectoryPath))
{
MaxSdkLogger.UserError("Detected existing localization resource for \"" + localeCode + "\" locale. Skipping localization for User Tracking Usage Description. Please disable localization in AppLovin Integration manager and add the localizations to your existing resource.");
return;
}

// Create intermediate directories as needed.
if (!Directory.Exists(resourcesDirectoryPath))
{
Expand Down Expand Up @@ -427,7 +434,7 @@ private static void LocalizeUserTrackingDescriptionIfNeeded(string localizedUser
File.WriteAllText(infoPlistStringsFilePath, "/* Localized versions of Info.plist keys - Generated by AL MAX plugin */\n" + localizedDescriptionLine);
}

var localeSpecificDirectoryRelativePath = Path.Combine(resourcesDirectoryName, localeSpecificDirectoryName);
var localeSpecificDirectoryRelativePath = Path.Combine(AppLovinMaxResourcesDirectoryName, localeSpecificDirectoryName);
var guid = project.AddFolderReference(localeSpecificDirectoryRelativePath, localeSpecificDirectoryRelativePath);
project.AddFileToBuild(targetGuid, guid);
}
Expand Down
2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/Scripts/MaxSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class MaxSdk :
MaxSdkUnityEditor
#endif
{
private const string _version = "6.6.2";
private const string _version = "6.6.3";

/// <summary>
/// Returns the current plugin version.
Expand Down
28 changes: 25 additions & 3 deletions DemoApp/Assets/MaxSdk/Scripts/MaxSdkBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,39 @@ public enum ErrorCode
/// </summary>
FullscreenAdNotReady = -24,

#if UNITY_ANDROID
#if UNITY_IOS || UNITY_IPHONE
/// <summary>
/// This error code indicates you attempted to present a fullscreen ad from an invalid view controller.
/// </summary>
FullscreenAdInvalidViewController = -25,
#endif

/// <summary>
/// This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is already loading.
/// </summary>
FullscreenAdAlreadyLoading = -26,

/// <summary>
/// This error code indicates that the SDK failed to load an ad because it could not find the top Activity.
/// This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad is still showing.
/// </summary>
NoActivity = -5601,
FullscreenAdLoadWhileShowing = -27,

#if UNITY_ANDROID
/// <summary>
/// This error code indicates that the SDK failed to display an ad because the user has the "Don't Keep Activities" developer setting enabled.
/// </summary>
DontKeepActivitiesEnabled = -5602,
#endif

/// <summary>
/// This error code indicates that the SDK failed to load an ad because the publisher provided an invalid ad unit identifier.
/// Possible reasons for an invalid ad unit identifier:
/// 1. Ad unit identifier is malformed or does not exist
/// 2. Ad unit is disabled
/// 3. Ad unit is not associated with the current app's package name
/// 4. Ad unit was created within the last 30-60 minutes
/// </summary>
InvalidAdUnitId = -5603
}

/**
Expand Down

0 comments on commit a322c2d

Please sign in to comment.