Skip to content

Commit

Permalink
demoapp/bump_applovin_plugin_6.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Apr 6, 2024
1 parent d9eb6be commit 604c283
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 43 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.

2 changes: 1 addition & 1 deletion DemoApp/Assets/MaxSdk/AppLovin/Editor/Dependencies.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="com.applovin:applovin-sdk:12.4.0" />
<androidPackage spec="com.applovin:applovin-sdk:12.4.2" />
</androidPackages>
<iosPods>
<iosPod name="AppLovinSDK" version="12.4.1" />
Expand Down
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.

78 changes: 46 additions & 32 deletions DemoApp/Assets/MaxSdk/AppLovin/Plugins/iOS/MAUnityAdManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#import "MAUnityAdManager.h"

#define VERSION @"6.4.1"
#define VERSION @"6.4.2"

#define KEY_WINDOW [UIApplication sharedApplication].keyWindow
#define DEVICE_SPECIFIC_ADVIEW_AD_FORMAT ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) ? MAAdFormat.leader : MAAdFormat.banner
Expand All @@ -24,6 +24,12 @@
void UnityPause(int pause);
void UnitySendMessage(const char* obj, const char* method, const char* msg);

static const char * cStringCopy(NSString *string)
{
const char *value = string.UTF8String;
return value ? strdup(value) : NULL;
}

void max_unity_dispatch_on_main_thread(dispatch_block_t block)
{
if ( block )
Expand Down Expand Up @@ -809,14 +815,16 @@ - (void)didClickAd:(MAAd *)ad

- (void)didDisplayAd:(MAAd *)ad
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// BMLs do not support [DISPLAY] events in Unity
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isFullscreenAd] ) return;
// BMLs do not support [DISPLAY] events in Unity
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isFullscreenAd] ) return;

// UnityPause needs to be called on the main thread.
#if !IS_TEST_APP
UnityPause(1);
UnityPause(1);
#endif

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

NSString *name;
if ( MAAdFormat.interstitial == adFormat )
Expand Down Expand Up @@ -879,14 +887,16 @@ - (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error

- (void)didHideAd:(MAAd *)ad
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// BMLs do not support [HIDDEN] events in Unity
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isFullscreenAd] ) return;
// BMLs do not support [HIDDEN] events in Unity
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isFullscreenAd] ) return;

// UnityPause needs to be called on the main thread.
#if !IS_TEST_APP
UnityPause(0);
UnityPause(0);
#endif

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

NSString *name;
if ( MAAdFormat.interstitial == adFormat )
Expand All @@ -913,17 +923,19 @@ - (void)didHideAd:(MAAd *)ad

- (void)didExpandAd:(MAAd *)ad
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isAdViewAd] )
{
[self logInvalidAdFormat: adFormat];
return;
}
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isAdViewAd] )
{
[self logInvalidAdFormat: adFormat];
return;
}

// UnityPause needs to be called on the main thread.
#if !IS_TEST_APP
UnityPause(1);
UnityPause(1);
#endif

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

NSString *name;
if ( MAAdFormat.mrec == adFormat )
Expand All @@ -942,17 +954,19 @@ - (void)didExpandAd:(MAAd *)ad

- (void)didCollapseAd:(MAAd *)ad
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isAdViewAd] )
{
[self logInvalidAdFormat: adFormat];
return;
}
MAAdFormat *adFormat = ad.format;
if ( ![adFormat isAdViewAd] )
{
[self logInvalidAdFormat: adFormat];
return;
}

// UnityPause needs to be called on the main thread.
#if !IS_TEST_APP
UnityPause(0);
UnityPause(0);
#endif

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

NSString *name;
if ( MAAdFormat.mrec == adFormat )
Expand Down Expand Up @@ -1923,7 +1937,7 @@ + (void)forwardUnityEventWithArgs:(NSDictionary<NSString *, id> *)args
{
#if !IS_TEST_APP
void (^runnable)(void) = ^{
char *serializedParameters = [self serializeParameters: args].UTF8String;
const char *serializedParameters = cStringCopy([self serializeParameters: args]);
backgroundCallback(serializedParameters);
};

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.

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.4.1";
private const string _version = "6.4.2";

/// <summary>
/// Returns the current plugin version.
Expand Down

0 comments on commit 604c283

Please sign in to comment.