Skip to content

Commit

Permalink
HyprMX/6.2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
harryarakkal committed May 24, 2023
1 parent 452408a commit 21f7882
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 34 deletions.
12 changes: 5 additions & 7 deletions HyprMX/AppLovinMediationHyprMXAdapter.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
Pod::Spec.new do |s|

s.authors =
{
'AppLovin Corporation' => 'devsupport@applovin.com'
}
s.authors = 'AppLovin Corporation'
s.name = 'AppLovinMediationHyprMXAdapter'
s.version = '6.0.3.1'
s.version = '6.2.0.0'
s.platform = :ios, '9.0'
s.summary = 'HyprMX adapter used for mediation with the AppLovin MAX SDK'
s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed"
Expand All @@ -29,14 +26,15 @@ s.source =

s.vendored_frameworks = "#{s.name}-#{s.version}/#{s.name}.xcframework"

s.dependency 'HyprMX/Core', '= 6.0.3'
s.dependency 'HyprMX', '= 6.2.0'
s.dependency 'AppLovinSDK'

s.pod_target_xcconfig =
{
'VALID_ARCHS' => 'arm64 arm64e armv7 armv7s x86_64',
'VALID_ARCHS[sdk=iphoneos*]' => 'arm64 arm64e armv7 armv7s',
'VALID_ARCHS[sdk=iphonesimulator*]' => 'arm64 arm64e x86_64'
'VALID_ARCHS[sdk=iphonesimulator*]' => 'arm64 arm64e x86_64',
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386'
}

s.description = <<-DESC
Expand Down
6 changes: 6 additions & 0 deletions HyprMX/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 6.2.0.0
* Certified with HyprMX SDK 6.2.0.
* Updated podspec to use `HyprMX` instead of `HyprMX/Core`.
* Disable bitcode, as Apple deprecated it in Xcode 14 (https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes).
* Add additional details for ad display failures.

## 6.0.3.1
* Set consent based on a mix of 'hasUserConsent', 'ageRestrictedUser' and 'doNotSell' values.

Expand Down
63 changes: 49 additions & 14 deletions HyprMX/HyprMXAdapter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
58BD7B588AA886AEB6367F80 /* Pods_HyprMXAdapter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD8B910F9925CB52706DB03 /* Pods_HyprMXAdapter.framework */; };
6A561CE0219BB5A600E3749A /* AppLovinSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D31B64D219BA4E600875D92 /* AppLovinSDK.framework */; };
6A9A772A21A4F43A00151D7A /* ALHyprMXMediationAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A9A772821A4F43A00151D7A /* ALHyprMXMediationAdapter.m */; };
/* End PBXBuildFile section */
Expand All @@ -25,6 +26,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0AD8B910F9925CB52706DB03 /* Pods_HyprMXAdapter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HyprMXAdapter.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1D31B64D219BA4E600875D92 /* AppLovinSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppLovinSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1D9AE8E221423C7D00080475 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
1D9AE8E321423C7D00080475 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; };
Expand All @@ -45,6 +47,8 @@
6A5A633A21C0875E00B755D7 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
6A9A772821A4F43A00151D7A /* ALHyprMXMediationAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALHyprMXMediationAdapter.m; sourceTree = "<group>"; };
6A9A772921A4F43A00151D7A /* ALHyprMXMediationAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALHyprMXMediationAdapter.h; sourceTree = "<group>"; };
95672DCD50F193FAA4F6DF24 /* Pods-HyprMXAdapter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HyprMXAdapter.release.xcconfig"; path = "Target Support Files/Pods-HyprMXAdapter/Pods-HyprMXAdapter.release.xcconfig"; sourceTree = "<group>"; };
9F085E87718C948EC7C8C53E /* Pods-HyprMXAdapter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HyprMXAdapter.debug.xcconfig"; path = "Target Support Files/Pods-HyprMXAdapter/Pods-HyprMXAdapter.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -53,6 +57,7 @@
buildActionMask = 2147483647;
files = (
6A561CE0219BB5A600E3749A /* AppLovinSDK.framework in Frameworks */,
58BD7B588AA886AEB6367F80 /* Pods_HyprMXAdapter.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -77,6 +82,7 @@
1D9AE8EA21423C7E00080475 /* SystemConfiguration.framework */,
1D9AE8E821423C7E00080475 /* UIKit.framework */,
1D9AE8E721423C7E00080475 /* WebKit.framework */,
0AD8B910F9925CB52706DB03 /* Pods_HyprMXAdapter.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -88,6 +94,7 @@
6A5A632921C086CF00B755D7 /* Supporting Files */,
1D97FB861FBCF38B00D6C309 /* Products */,
1D2303A61FBCF4C7001939D7 /* Frameworks */,
749207DBB43C935CAC438820 /* Pods */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -117,13 +124,24 @@
path = HyprMXAdapter;
sourceTree = "<group>";
};
749207DBB43C935CAC438820 /* Pods */ = {
isa = PBXGroup;
children = (
9F085E87718C948EC7C8C53E /* Pods-HyprMXAdapter.debug.xcconfig */,
95672DCD50F193FAA4F6DF24 /* Pods-HyprMXAdapter.release.xcconfig */,
);
name = Pods;
path = "../../iOS-Workspace/Pods";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
6A561CDC219BB5A600E3749A /* HyprMXAdapter */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6A561CE2219BB5A600E3749A /* Build configuration list for PBXNativeTarget "HyprMXAdapter" */;
buildPhases = (
15ECE39FE2F1EE3C6B5D0F49 /* [CP] Check Pods Manifest.lock */,
6A561CDD219BB5A600E3749A /* Sources */,
6A561CDF219BB5A600E3749A /* Frameworks */,
6A561CE1219BB5A600E3749A /* Copy Files */,
Expand Down Expand Up @@ -169,6 +187,31 @@
};
/* End PBXProject section */

/* Begin PBXShellScriptBuildPhase section */
15ECE39FE2F1EE3C6B5D0F49 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-HyprMXAdapter-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
6A561CDD219BB5A600E3749A /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -217,10 +260,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
EXCLUDED_ARCHS = i386;
FRAMEWORK_SEARCH_PATHS = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -236,7 +279,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LIBRARY_SEARCH_PATHS = "";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -280,10 +322,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXCLUDED_ARCHS = i386;
FRAMEWORK_SEARCH_PATHS = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -293,7 +335,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LIBRARY_SEARCH_PATHS = "";
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
Expand All @@ -304,40 +345,34 @@
};
6A561CE3219BB5A600E3749A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9F085E87718C948EC7C8C53E /* Pods-HyprMXAdapter.debug.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Manual;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = X8JXXK4FF5;
FRAMEWORK_SEARCH_PATHS = "../../iOS-Workspace/Pods/**";
HEADER_SEARCH_PATHS = "";
FRAMEWORK_SEARCH_PATHS = "$(inherited)/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LIBRARY_SEARCH_PATHS = "$(inherited)";
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode-marker";
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SYSTEM_FRAMEWORK_SEARCH_PATHS = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
6A561CE4219BB5A600E3749A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 95672DCD50F193FAA4F6DF24 /* Pods-HyprMXAdapter.release.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Manual;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = X8JXXK4FF5;
FRAMEWORK_SEARCH_PATHS = "../../iOS-Workspace/Pods/**";
HEADER_SEARCH_PATHS = "";
FRAMEWORK_SEARCH_PATHS = "$(inherited)/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LIBRARY_SEARCH_PATHS = "$(inherited)";
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-fembed-bitcode";
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SYSTEM_FRAMEWORK_SEARCH_PATHS = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion HyprMX/HyprMXAdapter/ALHyprMXMediationAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

#import <AppLovinSDK/AppLovinSDK.h>

@interface ALHyprMXMediationAdapter : ALMediationAdapter<MASignalProvider, MAAdViewAdapter, MAInterstitialAdapter, MARewardedAdapter>
@interface ALHyprMXMediationAdapter : ALMediationAdapter <MASignalProvider, MAAdViewAdapter, MAInterstitialAdapter, MARewardedAdapter>

@end
38 changes: 26 additions & 12 deletions HyprMX/HyprMXAdapter/ALHyprMXMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
#import "ALHyprMXMediationAdapter.h"
#import <HyprMX/HyprMX.h>

#define ADAPTER_VERSION @"6.0.3.1"
#define ADAPTER_VERSION @"6.2.0.0"

/**
* Dedicated delegate object for HyprMX initialization.
*/
@interface ALHyprMXMediationAdapterInitializationDelegate : NSObject<HyprMXInitializationDelegate>
@interface ALHyprMXMediationAdapterInitializationDelegate : NSObject <HyprMXInitializationDelegate>
@property (nonatomic, weak) ALHyprMXMediationAdapter *parentAdapter;
@property (nonatomic, copy, nullable) void(^completionBlock)(MAAdapterInitializationStatus, NSString * _Nullable);
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter completionHandler:(void (^)(MAAdapterInitializationStatus, NSString * _Nullable))completionHandler;
@property (nonatomic, copy, nullable) void(^completionBlock)(MAAdapterInitializationStatus, NSString *_Nullable);
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter completionHandler:(void (^)(MAAdapterInitializationStatus, NSString *_Nullable))completionHandler;
@end

/**
* Dedicated delegate object for HyprMX AdView ads.
*/
@interface ALHyprMXMediationAdapterAdViewDelegate : NSObject<HyprMXBannerDelegate>
@interface ALHyprMXMediationAdapterAdViewDelegate : NSObject <HyprMXBannerDelegate>
@property (nonatomic, weak) ALHyprMXMediationAdapter *parentAdapter;
@property (nonatomic, strong) id<MAAdViewAdapterDelegate> delegate;
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter andNotify:(id<MAAdViewAdapterDelegate>)delegate;
Expand All @@ -33,7 +33,7 @@ - (instancetype)init NS_UNAVAILABLE;
/**
* Dedicated delegate object for HyprMX interstitial ads.
*/
@interface ALHyprMXMediationAdapterInterstitialAdDelegate : NSObject<HyprMXPlacementDelegate>
@interface ALHyprMXMediationAdapterInterstitialAdDelegate : NSObject <HyprMXPlacementDelegate>
@property (nonatomic, weak) ALHyprMXMediationAdapter *parentAdapter;
@property (nonatomic, strong) id<MAInterstitialAdapterDelegate> delegate;
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter andNotify:(id<MAInterstitialAdapterDelegate>)delegate;
Expand All @@ -43,15 +43,15 @@ - (instancetype)init NS_UNAVAILABLE;
/**
* Dedicated delegate object for HyprMX rewarded ads.
*/
@interface ALHyprMXMediationAdapterRewardedAdDelegate : NSObject<HyprMXPlacementDelegate>
@interface ALHyprMXMediationAdapterRewardedAdDelegate : NSObject <HyprMXPlacementDelegate>
@property (nonatomic, weak) ALHyprMXMediationAdapter *parentAdapter;
@property (nonatomic, strong) id<MARewardedAdapterDelegate> delegate;
@property (nonatomic, assign, getter=hasGrantedReward) BOOL grantedReward;
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter andNotify:(id<MARewardedAdapterDelegate>)delegate;
- (instancetype)init NS_UNAVAILABLE;
@end

@interface ALHyprMXMediationAdapter()
@interface ALHyprMXMediationAdapter ()

// Initialization
@property (nonatomic, strong) ALHyprMXMediationAdapterInitializationDelegate *initializationDelegate;
Expand Down Expand Up @@ -219,7 +219,14 @@ - (void)showInterstitialAdForParameters:(id<MAAdapterResponseParameters>)paramet
else
{
[self log: @"Interstitial ad not ready"];
[delegate didFailToDisplayInterstitialAdWithError: [MAAdapterError errorWithCode: -4205 errorString: @"Ad Display Failed"]];

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[delegate didFailToDisplayInterstitialAdWithError: [MAAdapterError errorWithCode: -4205
errorString: @"Ad Display Failed"
thirdPartySdkErrorCode: 0
thirdPartySdkErrorMessage: @"Interstitial ad not ready"]];
#pragma clang diagnostic pop
}
}

Expand Down Expand Up @@ -262,7 +269,14 @@ - (void)showRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters
else
{
[self log: @"Rewarded ad not ready"];
[delegate didFailToDisplayRewardedAdWithError: [MAAdapterError errorWithCode: -4205 errorString: @"Ad Display Failed"]];

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[delegate didFailToDisplayRewardedAdWithError: [MAAdapterError errorWithCode: -4205
errorString: @"Ad Display Failed"
thirdPartySdkErrorCode: 0
thirdPartySdkErrorMessage: @"Rewarded ad not ready"]];
#pragma clang diagnostic pop
}
}

Expand Down Expand Up @@ -396,7 +410,7 @@ + (MAAdapterError *)toMaxError:(NSInteger)hyprMXErrorCode message:(nullable NSSt

@implementation ALHyprMXMediationAdapterInitializationDelegate

- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter completionHandler:(void (^)(MAAdapterInitializationStatus, NSString * _Nullable))completionHandler;
- (instancetype)initWithParentAdapter:(ALHyprMXMediationAdapter *)parentAdapter completionHandler:(void (^)(MAAdapterInitializationStatus, NSString *_Nullable))completionHandler;
{
self = [super init];
if ( self )
Expand Down Expand Up @@ -620,7 +634,7 @@ - (void)adDisplayError:(NSError *)error placement:(HyprMXPlacement *)placement

- (void)adDidRewardForPlacement:(HyprMXPlacement *)placement rewardName:(NSString *)rewardName rewardValue:(NSInteger)rewardValue
{
[self.parentAdapter log: @"Rewarded ad for placement: %@ granted reward with rewardName: %@, rewardValue: %ld", placement.placementName, rewardName, (long)rewardValue];
[self.parentAdapter log: @"Rewarded ad for placement: %@ granted reward with rewardName: %@, rewardValue: %ld", placement.placementName, rewardName, (long) rewardValue];
self.grantedReward = YES;
}

Expand Down

0 comments on commit 21f7882

Please sign in to comment.