修改超时

This commit is contained in:
xsean 2025-11-25 15:56:37 +08:00
parent e2df65105c
commit d151e6fb46
7 changed files with 622 additions and 664 deletions

View File

@ -1,4 +1 @@
172.29.131.10
172.29.105.14
172.29.105.29
172.29.131.20
172.29.101.15

View File

@ -1148,28 +1148,31 @@ class YL_NetWorkManager{
}
static func onLoad() {
let client:XUDPClient = XUDPClient.sharedInstance()
client.hintBlock = { (t:String?) in
guard let jsonStr = t else {
return
}
NSLog("onLoad result:\(jsonStr)")
let directory = "/User/Documents/ad/load"
let timestamp = Int(Date().timeIntervalSince1970)
let filePath: String = "\(directory)/\(timestamp)"
do {
try FileManager.default.createDirectory(atPath: directory, withIntermediateDirectories: true, attributes: nil)
FileManager.default.createFile(atPath: filePath, contents: nil, attributes: nil)
NSLog("Created timestamp file at: \(filePath)")
} catch {
NSLog("Failed to create timestamp file: \(error.localizedDescription)")
}
var mdic = [String: Any]()
mdic["appid"] = appId()
client.onLoad(mdic, toPort:UInt16(BbbAdManager.config.udp_port));
}
static func onShow() {
let client:XUDPClient = XUDPClient.sharedInstance()
client.hintBlock = { (t:String?) in
guard let jsonStr = t else {
return
}
NSLog("onShow result:\(jsonStr)")
let directory = "/User/Documents/ad/show"
let timestamp = Int(Date().timeIntervalSince1970)
let filePath = "\(directory)/\(timestamp)"
do {
try FileManager.default.createDirectory(atPath: directory, withIntermediateDirectories: true, attributes: nil)
FileManager.default.createFile(atPath: filePath, contents: nil, attributes: nil)
NSLog("Created timestamp file at: \(filePath)")
} catch {
NSLog("Failed to create timestamp file: \(error.localizedDescription)")
}
var mdic = [String: Any]()
mdic["appid"] = appId()
client.onShow(mdic, toPort:UInt16(BbbAdManager.config.udp_port));
}
/*
@ -1363,7 +1366,6 @@ class YL_NetWorkManager{
}
return validDict
}
}

View File

@ -132,6 +132,7 @@ class AdItem :NSObject,MAAdDelegate{
NSLog("onAdClosed set: \(self.onAdClosed != nil)")
interstitialAd.show(forPlacement: interstitialAdID)
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "---走到了show\(interstitialAdID)"])
}
func didLoad(_ ad: MAAd) {
@ -145,7 +146,7 @@ class AdItem :NSObject,MAAdDelegate{
retryAttempt = 0 //
NSLog("成功加载广告\(ad.adUnitIdentifier)")
self.ecpm = ad.revenue
YL_NetWorkManager.onLoad()
//
var time = 0
if let startTime = startLoadTime {
@ -212,6 +213,7 @@ class AdItem :NSObject,MAAdDelegate{
changeStatus(st: 5)
NSLog("XS didFailToLoadAd 5 \(self.interstitialAdID)")
YL_NetWorkManager.onLoad()
}
func didDisplay(_ ad: MAAd) {

File diff suppressed because it is too large Load Diff

View File

@ -157,6 +157,8 @@ class AdItem :NSObject, ATInterstitialDelegate {
func to_network(_ network: Int) -> String {
switch network {
case 3:
return "Inmobi"
case 6:
return "Mintegral"
case 11:
@ -167,8 +169,10 @@ class AdItem :NSObject, ATInterstitialDelegate {
return "Vungle"
case 50:
return "Pangle"
case 66:
return "TopOn ADX"
default:
return "Mintegral"
return "Unknown"
}
}
@ -225,10 +229,12 @@ class AdItem :NSObject, ATInterstitialDelegate {
time = loadDuration
}
let networkID:Int = extra?["network_firm_id"] as! Int
let network = to_network(networkID)
DispatchQueue.global(qos: .utility).async { [weak self] in
guard self != nil else { return }
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: 0.0 , network: "", countryCode: "", platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time,errMsg: "\(String(describing: error))")
YL_NetWorkManager.uploadAD_Load(adid: placementID, ecpm: 0.0 , network: network, countryCode: "", platformResponseTime: TimeInterval(time/1000) , dsp: "MTG", loadTime: time,errMsg: "\(String(describing: error))")
}
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "bidding error\(String(describing: placementID) ),\(String(describing: error)) 失败"])

View File

@ -14,8 +14,6 @@ pod 'TPNiOS','6.4.76'
pod 'TPNVungleSDKAdapter','6.4.76.5'
pod 'TPNUnityAdsSDKAdapter','6.4.76'
pod 'TPNIronSourceSDKAdapter','6.4.76'
# pod 'TPNBigoSDKAdapter','6.4.76'
pod 'TPNPangleSDKAdapter','6.4.76'
pod 'TPNInmobiSDKAdapter','6.4.76'
pod 'TPNMintegralSDKAdapter','6.4.76'

View File

@ -1,7 +1,4 @@
PODS:
- Ads-Global (7.1.1.0):
- Ads-Global/BUAdSDK (= 7.1.1.0)
- Ads-Global/BUAdSDK (7.1.1.0)
- InMobiSDK (10.8.2)
- IronSourceSDK (8.8.0.0)
- MintegralAdSDK/All (7.7.7):
@ -41,9 +38,6 @@ PODS:
- TPNMintegralSDKAdapter (6.4.76):
- MintegralAdSDK/All (= 7.7.7)
- TPNiOS (= 6.4.76)
- TPNPangleSDKAdapter (6.4.76):
- Ads-Global (= 7.1.1.0)
- TPNiOS (= 6.4.76)
- TPNUnityAdsSDKAdapter (6.4.76):
- TPNiOS (= 6.4.76)
- UnityAds (= 4.14.2)
@ -58,13 +52,11 @@ DEPENDENCIES:
- TPNiOS (= 6.4.76)
- TPNIronSourceSDKAdapter (= 6.4.76)
- TPNMintegralSDKAdapter (= 6.4.76)
- TPNPangleSDKAdapter (= 6.4.76)
- TPNUnityAdsSDKAdapter (= 6.4.76)
- TPNVungleSDKAdapter (= 6.4.76.5)
SPEC REPOS:
trunk:
- Ads-Global
- InMobiSDK
- IronSourceSDK
- MintegralAdSDK
@ -72,14 +64,12 @@ SPEC REPOS:
- TPNiOS
- TPNIronSourceSDKAdapter
- TPNMintegralSDKAdapter
- TPNPangleSDKAdapter
- TPNUnityAdsSDKAdapter
- TPNVungleSDKAdapter
- UnityAds
- VungleAds
SPEC CHECKSUMS:
Ads-Global: a37caba17e88311462278dd2e2b0d3a5dcbbfce2
InMobiSDK: bf6bc10caae18237d097755d19ff5441f146f9c7
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
@ -87,12 +77,11 @@ SPEC CHECKSUMS:
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
TPNPangleSDKAdapter: d96656537c9718581142e2885c2c8108a3698a51
TPNUnityAdsSDKAdapter: 655206a266b48be72e24db08fc08d83d88459ccb
TPNVungleSDKAdapter: 3c4cc7164945ae2a3535d1fc26ce3ef24a35566c
UnityAds: eabbbb3014326e45dc221a467fba16960e7b73e3
VungleAds: f7143149d6160211c6d462453adce125160e4283
PODFILE CHECKSUM: 057b018f3a97dd68cc7d610593ee523500bad4c4
PODFILE CHECKSUM: f7f4ffe814d1351d087acffd0ee96b59b11e8d5b
COCOAPODS: 1.16.2