1.1.9广告调试版

This commit is contained in:
Mr.zhou 2024-09-02 15:01:07 +08:00
parent f87291a46b
commit d81c3e65f0
3 changed files with 86 additions and 16 deletions

View File

@ -1899,7 +1899,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1.1.8.1;
CURRENT_PROJECT_VERSION = 1.1.9.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RAQJ4FNZUH;
@ -1920,7 +1920,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.8;
MARKETING_VERSION = 1.1.9;
PRODUCT_BUNDLE_IDENTIFIER = relax.offline.mp3.music;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1945,7 +1945,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1.1.8.1;
CURRENT_PROJECT_VERSION = 1.1.9.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RAQJ4FNZUH;
@ -1966,7 +1966,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.8;
MARKETING_VERSION = 1.1.9;
PRODUCT_BUNDLE_IDENTIFIER = relax.offline.mp3.music;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -113,6 +113,8 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
NotificationCenter.notificationKey.add(observer: self, selector: #selector(netWorkReachableAction(_:)), notificationName: .net_switch_reachable)
GADMobileAds.sharedInstance().audioVideoManager.delegate = self
GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = false
// GADMobileAds.sharedInstance().audioVideoManager.
reloadAdMobIDs()
//广
completeOpenAdBlock = {
@ -511,11 +513,19 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
item = OpenHOSTID[level]
}
isLoadingOpenAd = true
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
if item.type == .Open {
//广
// 使 GADAppOpenAd load completion handler广
GADAppOpenAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADAppOpenAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -541,7 +551,7 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
}else if item.type == .Insert {
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request ) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -710,7 +720,15 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
MP_AnalyticsManager.shared.result_ads_chanceAction()
searchAdLoader = GADAdLoader(adUnitID: first.identifier, rootViewController: vc, adTypes: [.native], options: [multipleAdOptions, imageAdOptions, videoAdOptions])
searchAdLoader?.delegate = self
searchAdLoader?.load(GADRequest())
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
searchAdLoader?.load(request)
}
}
///广
@ -792,9 +810,13 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
isLoadingSearchInterstitialAd = true
let item = SearchINSERTID[level]
let request = GADRequest()
let extras = GADMAdapterAppLovinExtras()
extras.muteAudio = false
request.register(extras)
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
@ -911,8 +933,16 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
isLoadingPlayInterstitialAd = true
let item = PlayerINSERTID[level]
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -1038,8 +1068,16 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
isLoadingSwitchInterstitialAd = true
let item = SwitchINSERTID[level]
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -1155,8 +1193,16 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
isLoadingLoadInterstitialAd = true
let item = LoadINSERTID[level]
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -1281,7 +1327,15 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
if let first = LibraryNATIVEID.first, first.type == .Native {
libraryAdLoader = GADAdLoader(adUnitID: first.identifier, rootViewController: vc, adTypes: [.native], options: [multipleAdOptions,imageAdOptions,videoAdOptions])
libraryAdLoader?.delegate = self
libraryAdLoader?.load(GADRequest())
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
libraryAdLoader?.load(request)
libraryNativeAds = []
}
}
@ -1399,8 +1453,16 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
isLoadingLibraryInterstitialAd = true
let item = LibraryINSERTID[level]
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {
@ -1500,8 +1562,16 @@ class MP_AdMobManager: NSObject, GADAudioVideoManagerDelegate, GADFullScreenCont
}
isLoadingGlobalInterstitialAd = true
let item = GlobalINSERTID[level]
let request = GADRequest()
//广-Mintegral,Pangle,Liftoff,ironsource
let mintegralExtra = GADMAdapterMintegralExtras()
mintegralExtra.muteVideoAudio = true
let appLovinExtra = GADMAdapterAppLovinExtras()
appLovinExtra.muteAudio = true
request.register(appLovinExtra)
request.register(mintegralExtra)
//广
GADInterstitialAd.load(withAdUnitID: item.identifier, request: GADRequest()) { ad, error in
GADInterstitialAd.load(withAdUnitID: item.identifier, request: request) { ad, error in
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
if let error = error {