修改超时
This commit is contained in:
parent
e2df65105c
commit
d151e6fb46
5
ips.txt
5
ips.txt
@ -1,4 +1 @@
|
|||||||
172.29.131.10
|
172.29.101.15
|
||||||
172.29.105.14
|
|
||||||
172.29.105.29
|
|
||||||
172.29.131.20
|
|
||||||
@ -1148,28 +1148,31 @@ class YL_NetWorkManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
static func onLoad() {
|
static func onLoad() {
|
||||||
let client:XUDPClient = XUDPClient.sharedInstance()
|
let directory = "/User/Documents/ad/load"
|
||||||
client.hintBlock = { (t:String?) in
|
let timestamp = Int(Date().timeIntervalSince1970)
|
||||||
guard let jsonStr = t else {
|
let filePath: String = "\(directory)/\(timestamp)"
|
||||||
return
|
|
||||||
}
|
do {
|
||||||
NSLog("onLoad result:\(jsonStr)")
|
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() {
|
static func onShow() {
|
||||||
let client:XUDPClient = XUDPClient.sharedInstance()
|
let directory = "/User/Documents/ad/show"
|
||||||
client.hintBlock = { (t:String?) in
|
let timestamp = Int(Date().timeIntervalSince1970)
|
||||||
guard let jsonStr = t else {
|
let filePath = "\(directory)/\(timestamp)"
|
||||||
return
|
|
||||||
}
|
do {
|
||||||
NSLog("onShow result:\(jsonStr)")
|
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
|
return validDict
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -132,6 +132,7 @@ class AdItem :NSObject,MAAdDelegate{
|
|||||||
NSLog("onAdClosed set: \(self.onAdClosed != nil)")
|
NSLog("onAdClosed set: \(self.onAdClosed != nil)")
|
||||||
interstitialAd.show(forPlacement: interstitialAdID)
|
interstitialAd.show(forPlacement: interstitialAdID)
|
||||||
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "---走到了show:\(interstitialAdID)"])
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "---走到了show:\(interstitialAdID)"])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func didLoad(_ ad: MAAd) {
|
func didLoad(_ ad: MAAd) {
|
||||||
@ -145,7 +146,7 @@ class AdItem :NSObject,MAAdDelegate{
|
|||||||
retryAttempt = 0 // 重置重试次数
|
retryAttempt = 0 // 重置重试次数
|
||||||
NSLog("成功加载广告\(ad.adUnitIdentifier)")
|
NSLog("成功加载广告\(ad.adUnitIdentifier)")
|
||||||
self.ecpm = ad.revenue
|
self.ecpm = ad.revenue
|
||||||
|
YL_NetWorkManager.onLoad()
|
||||||
// 计算并打印加载时间
|
// 计算并打印加载时间
|
||||||
var time = 0
|
var time = 0
|
||||||
if let startTime = startLoadTime {
|
if let startTime = startLoadTime {
|
||||||
@ -212,6 +213,7 @@ class AdItem :NSObject,MAAdDelegate{
|
|||||||
|
|
||||||
changeStatus(st: 5)
|
changeStatus(st: 5)
|
||||||
NSLog("XS didFailToLoadAd 5 \(self.interstitialAdID)")
|
NSLog("XS didFailToLoadAd 5 \(self.interstitialAdID)")
|
||||||
|
YL_NetWorkManager.onLoad()
|
||||||
}
|
}
|
||||||
|
|
||||||
func didDisplay(_ ad: MAAd) {
|
func didDisplay(_ ad: MAAd) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -157,6 +157,8 @@ class AdItem :NSObject, ATInterstitialDelegate {
|
|||||||
|
|
||||||
func to_network(_ network: Int) -> String {
|
func to_network(_ network: Int) -> String {
|
||||||
switch network {
|
switch network {
|
||||||
|
case 3:
|
||||||
|
return "Inmobi"
|
||||||
case 6:
|
case 6:
|
||||||
return "Mintegral"
|
return "Mintegral"
|
||||||
case 11:
|
case 11:
|
||||||
@ -167,8 +169,10 @@ class AdItem :NSObject, ATInterstitialDelegate {
|
|||||||
return "Vungle"
|
return "Vungle"
|
||||||
case 50:
|
case 50:
|
||||||
return "Pangle"
|
return "Pangle"
|
||||||
|
case 66:
|
||||||
|
return "TopOn ADX"
|
||||||
default:
|
default:
|
||||||
return "Mintegral"
|
return "Unknown"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,10 +229,12 @@ class AdItem :NSObject, ATInterstitialDelegate {
|
|||||||
time = loadDuration
|
time = loadDuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let networkID:Int = extra?["network_firm_id"] as! Int
|
||||||
|
let network = to_network(networkID)
|
||||||
|
|
||||||
DispatchQueue.global(qos: .utility).async { [weak self] in
|
DispatchQueue.global(qos: .utility).async { [weak self] in
|
||||||
guard self != nil else { return }
|
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)) 失败"])
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "bidding error:\(String(describing: placementID) ),\(String(describing: error)) 失败"])
|
||||||
|
|||||||
@ -14,8 +14,6 @@ pod 'TPNiOS','6.4.76'
|
|||||||
pod 'TPNVungleSDKAdapter','6.4.76.5'
|
pod 'TPNVungleSDKAdapter','6.4.76.5'
|
||||||
pod 'TPNUnityAdsSDKAdapter','6.4.76'
|
pod 'TPNUnityAdsSDKAdapter','6.4.76'
|
||||||
pod 'TPNIronSourceSDKAdapter','6.4.76'
|
pod 'TPNIronSourceSDKAdapter','6.4.76'
|
||||||
# pod 'TPNBigoSDKAdapter','6.4.76'
|
|
||||||
pod 'TPNPangleSDKAdapter','6.4.76'
|
|
||||||
pod 'TPNInmobiSDKAdapter','6.4.76'
|
pod 'TPNInmobiSDKAdapter','6.4.76'
|
||||||
pod 'TPNMintegralSDKAdapter','6.4.76'
|
pod 'TPNMintegralSDKAdapter','6.4.76'
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
PODS:
|
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)
|
- InMobiSDK (10.8.2)
|
||||||
- IronSourceSDK (8.8.0.0)
|
- IronSourceSDK (8.8.0.0)
|
||||||
- MintegralAdSDK/All (7.7.7):
|
- MintegralAdSDK/All (7.7.7):
|
||||||
@ -41,9 +38,6 @@ PODS:
|
|||||||
- TPNMintegralSDKAdapter (6.4.76):
|
- TPNMintegralSDKAdapter (6.4.76):
|
||||||
- MintegralAdSDK/All (= 7.7.7)
|
- MintegralAdSDK/All (= 7.7.7)
|
||||||
- TPNiOS (= 6.4.76)
|
- TPNiOS (= 6.4.76)
|
||||||
- TPNPangleSDKAdapter (6.4.76):
|
|
||||||
- Ads-Global (= 7.1.1.0)
|
|
||||||
- TPNiOS (= 6.4.76)
|
|
||||||
- TPNUnityAdsSDKAdapter (6.4.76):
|
- TPNUnityAdsSDKAdapter (6.4.76):
|
||||||
- TPNiOS (= 6.4.76)
|
- TPNiOS (= 6.4.76)
|
||||||
- UnityAds (= 4.14.2)
|
- UnityAds (= 4.14.2)
|
||||||
@ -58,13 +52,11 @@ DEPENDENCIES:
|
|||||||
- TPNiOS (= 6.4.76)
|
- TPNiOS (= 6.4.76)
|
||||||
- TPNIronSourceSDKAdapter (= 6.4.76)
|
- TPNIronSourceSDKAdapter (= 6.4.76)
|
||||||
- TPNMintegralSDKAdapter (= 6.4.76)
|
- TPNMintegralSDKAdapter (= 6.4.76)
|
||||||
- TPNPangleSDKAdapter (= 6.4.76)
|
|
||||||
- TPNUnityAdsSDKAdapter (= 6.4.76)
|
- TPNUnityAdsSDKAdapter (= 6.4.76)
|
||||||
- TPNVungleSDKAdapter (= 6.4.76.5)
|
- TPNVungleSDKAdapter (= 6.4.76.5)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- Ads-Global
|
|
||||||
- InMobiSDK
|
- InMobiSDK
|
||||||
- IronSourceSDK
|
- IronSourceSDK
|
||||||
- MintegralAdSDK
|
- MintegralAdSDK
|
||||||
@ -72,14 +64,12 @@ SPEC REPOS:
|
|||||||
- TPNiOS
|
- TPNiOS
|
||||||
- TPNIronSourceSDKAdapter
|
- TPNIronSourceSDKAdapter
|
||||||
- TPNMintegralSDKAdapter
|
- TPNMintegralSDKAdapter
|
||||||
- TPNPangleSDKAdapter
|
|
||||||
- TPNUnityAdsSDKAdapter
|
- TPNUnityAdsSDKAdapter
|
||||||
- TPNVungleSDKAdapter
|
- TPNVungleSDKAdapter
|
||||||
- UnityAds
|
- UnityAds
|
||||||
- VungleAds
|
- VungleAds
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Ads-Global: a37caba17e88311462278dd2e2b0d3a5dcbbfce2
|
|
||||||
InMobiSDK: bf6bc10caae18237d097755d19ff5441f146f9c7
|
InMobiSDK: bf6bc10caae18237d097755d19ff5441f146f9c7
|
||||||
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
|
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
|
||||||
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
|
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
|
||||||
@ -87,12 +77,11 @@ SPEC CHECKSUMS:
|
|||||||
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
|
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
|
||||||
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
|
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
|
||||||
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
|
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
|
||||||
TPNPangleSDKAdapter: d96656537c9718581142e2885c2c8108a3698a51
|
|
||||||
TPNUnityAdsSDKAdapter: 655206a266b48be72e24db08fc08d83d88459ccb
|
TPNUnityAdsSDKAdapter: 655206a266b48be72e24db08fc08d83d88459ccb
|
||||||
TPNVungleSDKAdapter: 3c4cc7164945ae2a3535d1fc26ce3ef24a35566c
|
TPNVungleSDKAdapter: 3c4cc7164945ae2a3535d1fc26ce3ef24a35566c
|
||||||
UnityAds: eabbbb3014326e45dc221a467fba16960e7b73e3
|
UnityAds: eabbbb3014326e45dc221a467fba16960e7b73e3
|
||||||
VungleAds: f7143149d6160211c6d462453adce125160e4283
|
VungleAds: f7143149d6160211c6d462453adce125160e4283
|
||||||
|
|
||||||
PODFILE CHECKSUM: 057b018f3a97dd68cc7d610593ee523500bad4c4
|
PODFILE CHECKSUM: f7f4ffe814d1351d087acffd0ee96b59b11e8d5b
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user