新api配置
This commit is contained in:
parent
ce087ab67c
commit
666ed69389
44
ips.txt
44
ips.txt
@ -1,4 +1,40 @@
|
|||||||
172.29.119.27
|
172.29.107.21
|
||||||
172.30.8.119
|
172.29.109.20
|
||||||
172.29.119.29
|
172.29.109.12
|
||||||
172.29.119.24
|
172.29.107.28
|
||||||
|
172.29.109.19
|
||||||
|
172.30.8.124
|
||||||
|
172.29.107.14
|
||||||
|
172.29.107.15
|
||||||
|
172.29.109.22
|
||||||
|
172.29.107.22
|
||||||
|
172.29.107.27
|
||||||
|
172.29.107.24
|
||||||
|
172.29.107.29
|
||||||
|
172.29.109.15
|
||||||
|
172.29.109.28
|
||||||
|
172.29.107.11
|
||||||
|
172.29.107.23
|
||||||
|
172.29.107.13
|
||||||
|
172.29.107.16
|
||||||
|
172.29.109.27
|
||||||
|
172.29.107.18
|
||||||
|
172.29.109.21
|
||||||
|
172.29.109.14
|
||||||
|
172.29.109.33
|
||||||
|
172.29.109.31
|
||||||
|
172.29.107.32
|
||||||
|
172.29.109.16
|
||||||
|
172.29.107.20
|
||||||
|
172.29.109.13
|
||||||
|
172.29.109.25
|
||||||
|
172.29.107.30
|
||||||
|
172.29.107.26
|
||||||
|
172.29.109.18
|
||||||
|
172.29.107.17
|
||||||
|
172.29.107.12
|
||||||
|
172.29.107.25
|
||||||
|
172.29.109.32
|
||||||
|
172.30.8.125
|
||||||
|
172.29.109.17
|
||||||
|
172.29.109.24
|
||||||
@ -49,6 +49,9 @@ def build(ad_app_id, ad_key, ad_ids, app_display_name,app_bundle_id,app_version,
|
|||||||
print("\n开始编译\n")
|
print("\n开始编译\n")
|
||||||
cmd = """
|
cmd = """
|
||||||
cd ./build/PlayBTopOn
|
cd ./build/PlayBTopOn
|
||||||
|
|
||||||
|
pod install --repo-update
|
||||||
|
|
||||||
xcodebuild clean build -workspace PlayBTopOn.xcworkspace -configuration Release -scheme PlayBTopOn -derivedDataPath "../Target" -destination "platform=iOS,id=00008110-000815AE1179801E"
|
xcodebuild clean build -workspace PlayBTopOn.xcworkspace -configuration Release -scheme PlayBTopOn -derivedDataPath "../Target" -destination "platform=iOS,id=00008110-000815AE1179801E"
|
||||||
cd ../../
|
cd ../../
|
||||||
"""
|
"""
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ class YL_NetWorkManager{
|
|||||||
static var kBaseUrl = YL_NetWorkManager.bFaceLocalUrl()
|
static var kBaseUrl = YL_NetWorkManager.bFaceLocalUrl()
|
||||||
|
|
||||||
static var kURL_AD_Start = "/top_selection/save_app_start_log"
|
static var kURL_AD_Start = "/top_selection/save_app_start_log"
|
||||||
static var kURL_AD_Load = "/ios/ad_report/save_ad_show_log"
|
static var kURL_AD_Load = "/ios/ad_report/save_ad_load_log"
|
||||||
static var kURL_AD_Show = "/ios/ad_report/save_ad_show_log"
|
static var kURL_AD_Show = "/ios/ad_report/save_ad_show_log"
|
||||||
static var kURL_save_logs = "/ios/top_selection/save_iphone_logs"
|
static var kURL_save_logs = "/ios/top_selection/save_iphone_logs"
|
||||||
static var isloadend = false
|
static var isloadend = false
|
||||||
@ -852,6 +852,7 @@ class YL_NetWorkManager{
|
|||||||
mdic["localIp"] = BbbAdManager.config.adbrush_localip
|
mdic["localIp"] = BbbAdManager.config.adbrush_localip
|
||||||
mdic["remoteIp"] = BbbAdManager.config.remoteIp
|
mdic["remoteIp"] = BbbAdManager.config.remoteIp
|
||||||
mdic["packageName"] = appId()
|
mdic["packageName"] = appId()
|
||||||
|
mdic["packageVersion"] = getappVersion()
|
||||||
mdic["adPlatform"] = "TopOn"
|
mdic["adPlatform"] = "TopOn"
|
||||||
mdic["countryCode"] = countryCode
|
mdic["countryCode"] = countryCode
|
||||||
mdic["adId"] = adid
|
mdic["adId"] = adid
|
||||||
@ -869,8 +870,12 @@ class YL_NetWorkManager{
|
|||||||
mdic["washParam"] = BbbAdManager.config.washParam
|
mdic["washParam"] = BbbAdManager.config.washParam
|
||||||
if !errMsg.isEmpty {
|
if !errMsg.isEmpty {
|
||||||
mdic["succeed"] = false
|
mdic["succeed"] = false
|
||||||
mdic["errorMsg"] = errMsg
|
mdic["errorData"] = errMsg
|
||||||
}
|
}
|
||||||
|
let carrierId:Int = UserDefaults.standard.integer(forKey: "lux-carrier-id")
|
||||||
|
mdic["carrierId"] = carrierId
|
||||||
|
// mdic["phoneVersion"] = getIpne.shard.getIPhoneModel()
|
||||||
|
mdic["phoneVersion"] = BbbAdManager.config.device_model
|
||||||
|
|
||||||
// Log the JSON data to verify it's correctly formatted
|
// Log the JSON data to verify it's correctly formatted
|
||||||
do {
|
do {
|
||||||
@ -926,6 +931,7 @@ class YL_NetWorkManager{
|
|||||||
mdic["remoteIp"] = BbbAdManager.config.remoteIp
|
mdic["remoteIp"] = BbbAdManager.config.remoteIp
|
||||||
|
|
||||||
mdic["packageName"] = appId()
|
mdic["packageName"] = appId()
|
||||||
|
mdic["packageVersion"] = getappVersion()
|
||||||
mdic["adPlatform"] = "TopOn"
|
mdic["adPlatform"] = "TopOn"
|
||||||
mdic["countryCode"] = countryCode
|
mdic["countryCode"] = countryCode
|
||||||
mdic["adId"] = adid
|
mdic["adId"] = adid
|
||||||
@ -940,6 +946,10 @@ class YL_NetWorkManager{
|
|||||||
mdic["succeed"] = true
|
mdic["succeed"] = true
|
||||||
mdic["network"] = network
|
mdic["network"] = network
|
||||||
mdic["online"] = false
|
mdic["online"] = false
|
||||||
|
// mdic["phoneVersion"] = getIpne.shard.getIPhoneModel()
|
||||||
|
mdic["phoneVersion"] = BbbAdManager.config.device_model
|
||||||
|
let carrierId:Int = UserDefaults.standard.integer(forKey: "lux-carrier-id")
|
||||||
|
mdic["carrierId"] = carrierId
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Log the JSON data to verify it's correctly formatted
|
// Log the JSON data to verify it's correctly formatted
|
||||||
@ -1165,6 +1175,54 @@ class YL_NetWorkManager{
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static func performGetRequest(url: String, parameters: [String: String], completion: @escaping (Error?, [String: Any]?) -> Void) {
|
||||||
|
guard var urlComponents = URLComponents(string: url) else {
|
||||||
|
print("Invalid URL")
|
||||||
|
completion(NSError(domain: "Invalid URL", code: 400, userInfo: nil), nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加 URL 参数
|
||||||
|
urlComponents.queryItems = parameters.map { URLQueryItem(name: $0.key, value: $0.value) }
|
||||||
|
|
||||||
|
guard let finalURL = urlComponents.url else {
|
||||||
|
print("Failed to construct URL with parameters")
|
||||||
|
completion(NSError(domain: "URL Construction Error", code: 400, userInfo: nil), nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = URLRequest(url: finalURL)
|
||||||
|
request.httpMethod = "GET"
|
||||||
|
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||||
|
|
||||||
|
let task = URLSession.shared.dataTask(with: request) { data, response, error in
|
||||||
|
if let error = error {
|
||||||
|
print("HTTP GET Request Error: \(error.localizedDescription)")
|
||||||
|
completion(error, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
guard let data = data else {
|
||||||
|
print("No data received")
|
||||||
|
completion(NSError(domain: "No Data", code: 204, userInfo: nil), nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
|
||||||
|
completion(nil, json)
|
||||||
|
} else {
|
||||||
|
print("Failed to parse JSON")
|
||||||
|
completion(NSError(domain: "JSON Parsing Error", code: 500, userInfo: nil), nil)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
print("Error parsing JSON: \(error.localizedDescription)")
|
||||||
|
completion(error, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task.resume()
|
||||||
|
}
|
||||||
|
|
||||||
static func saveIphonelogs() {
|
static func saveIphonelogs() {
|
||||||
let processInfo = ProcessInfo.processInfo
|
let processInfo = ProcessInfo.processInfo
|
||||||
|
|||||||
@ -43,6 +43,7 @@ class bConfig: NSObject {
|
|||||||
var washParam:Bool = false
|
var washParam:Bool = false
|
||||||
///
|
///
|
||||||
var linkId:String = ""
|
var linkId:String = ""
|
||||||
|
var device_model:String = ""
|
||||||
|
|
||||||
///load次数
|
///load次数
|
||||||
var loadcount:Int = 0
|
var loadcount:Int = 0
|
||||||
@ -446,12 +447,29 @@ class BbbAdManager: NSObject {
|
|||||||
BbbAdManager.config.dataId = bfaceDict["dataId"] as? String ?? ""
|
BbbAdManager.config.dataId = bfaceDict["dataId"] as? String ?? ""
|
||||||
|
|
||||||
|
|
||||||
BbbAdManager.config.adbrush_ecpm = bfaceDict["adbrush_ecpm"] as? Double ?? 0.005
|
BbbAdManager.config.adbrush_ecpm = 0.0005
|
||||||
BbbAdManager.config.linkId = bfaceDict["linkId"] as? String ?? ""
|
BbbAdManager.config.linkId = bfaceDict["linkId"] as? String ?? ""
|
||||||
BbbAdManager.config.washParam = bfaceDict["washParam"] as? Bool ?? false
|
BbbAdManager.config.washParam = bfaceDict["washParam"] as? Bool ?? false
|
||||||
|
BbbAdManager.config.device_model = bfaceDict["device_model"] as? String ?? ""
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "获取字典失败"])
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "获取字典失败"])
|
||||||
}
|
}
|
||||||
|
let pkg = Bundle.main.bundleIdentifier ?? ""
|
||||||
|
YL_NetWorkManager.performGetRequest(url: "\(BbbAdManager.config.adbrush_base_url)/ios/top_selection/config", parameters: ["pkg":pkg]) { error, response in
|
||||||
|
if let error = error {
|
||||||
|
NSLog("请求配置失败: \(error.localizedDescription)")
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "请求配置失败: \(error.localizedDescription)"])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if let response = response {
|
||||||
|
NSLog("请求配置成功: \(response)")
|
||||||
|
let data = response["data"] as? [String: Any]
|
||||||
|
BbbAdManager.config.adbrush_ecpm = data?["ecpmLow"] as? Double ?? 0.001
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func initAd() {
|
func initAd() {
|
||||||
|
|||||||
@ -11,8 +11,13 @@ target 'PlayBTopOn' do
|
|||||||
# pod 'TPNMintegralSDKAdapter','6.3.66'
|
# pod 'TPNMintegralSDKAdapter','6.3.66'
|
||||||
|
|
||||||
pod 'TPNiOS','6.4.76'
|
pod 'TPNiOS','6.4.76'
|
||||||
pod 'TPNVungleSDKAdapter','6.4.76'
|
pod 'TPNVungleSDKAdapter','6.4.76.5'
|
||||||
|
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 'TPNMintegralSDKAdapter','6.4.76'
|
pod 'TPNMintegralSDKAdapter','6.4.76'
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
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)
|
||||||
- IronSourceSDK (8.8.0.0)
|
- IronSourceSDK (8.8.0.0)
|
||||||
- MintegralAdSDK/All (7.7.7):
|
- MintegralAdSDK/All (7.7.7):
|
||||||
- MintegralAdSDK/BannerAd
|
- MintegralAdSDK/BannerAd
|
||||||
@ -25,6 +29,9 @@ PODS:
|
|||||||
- MintegralAdSDK/NativeAd
|
- MintegralAdSDK/NativeAd
|
||||||
- MintegralAdSDK/SplashAd (7.7.7):
|
- MintegralAdSDK/SplashAd (7.7.7):
|
||||||
- MintegralAdSDK/NativeAd
|
- MintegralAdSDK/NativeAd
|
||||||
|
- TPNInmobiSDKAdapter (6.4.76):
|
||||||
|
- InMobiSDK (= 10.8.2)
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
- TPNiOS (6.4.76):
|
- TPNiOS (6.4.76):
|
||||||
- TPNiOS/TPNSDK (= 6.4.76)
|
- TPNiOS/TPNSDK (= 6.4.76)
|
||||||
- TPNiOS/TPNSDK (6.4.76)
|
- TPNiOS/TPNSDK (6.4.76)
|
||||||
@ -34,36 +41,58 @@ 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)
|
||||||
- TPNVungleSDKAdapter (6.4.76):
|
- TPNPangleSDKAdapter (6.4.76):
|
||||||
|
- Ads-Global (= 7.1.1.0)
|
||||||
- TPNiOS (= 6.4.76)
|
- TPNiOS (= 6.4.76)
|
||||||
- VungleAds (= 7.5.0)
|
- TPNUnityAdsSDKAdapter (6.4.76):
|
||||||
- VungleAds (7.5.0)
|
- TPNiOS (= 6.4.76)
|
||||||
|
- UnityAds (= 4.14.2)
|
||||||
|
- TPNVungleSDKAdapter (6.4.76.5):
|
||||||
|
- TPNiOS (= 6.4.76)
|
||||||
|
- VungleAds (= 7.5.1)
|
||||||
|
- UnityAds (4.14.2)
|
||||||
|
- VungleAds (7.5.1)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- TPNInmobiSDKAdapter (= 6.4.76)
|
||||||
- TPNiOS (= 6.4.76)
|
- TPNiOS (= 6.4.76)
|
||||||
- TPNIronSourceSDKAdapter (= 6.4.76)
|
- TPNIronSourceSDKAdapter (= 6.4.76)
|
||||||
- TPNMintegralSDKAdapter (= 6.4.76)
|
- TPNMintegralSDKAdapter (= 6.4.76)
|
||||||
- TPNVungleSDKAdapter (= 6.4.76)
|
- TPNPangleSDKAdapter (= 6.4.76)
|
||||||
|
- TPNUnityAdsSDKAdapter (= 6.4.76)
|
||||||
|
- TPNVungleSDKAdapter (= 6.4.76.5)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
- Ads-Global
|
||||||
|
- InMobiSDK
|
||||||
- IronSourceSDK
|
- IronSourceSDK
|
||||||
- MintegralAdSDK
|
- MintegralAdSDK
|
||||||
|
- TPNInmobiSDKAdapter
|
||||||
- TPNiOS
|
- TPNiOS
|
||||||
- TPNIronSourceSDKAdapter
|
- TPNIronSourceSDKAdapter
|
||||||
- TPNMintegralSDKAdapter
|
- TPNMintegralSDKAdapter
|
||||||
|
- TPNPangleSDKAdapter
|
||||||
|
- TPNUnityAdsSDKAdapter
|
||||||
- TPNVungleSDKAdapter
|
- TPNVungleSDKAdapter
|
||||||
|
- UnityAds
|
||||||
- VungleAds
|
- VungleAds
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
|
Ads-Global: a37caba17e88311462278dd2e2b0d3a5dcbbfce2
|
||||||
|
InMobiSDK: bf6bc10caae18237d097755d19ff5441f146f9c7
|
||||||
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
|
IronSourceSDK: ff0b14630899756847f7608a75182f10f022e5ef
|
||||||
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
|
MintegralAdSDK: 190c6cd3d83b31b51833e3341857c58dc430da2e
|
||||||
|
TPNInmobiSDKAdapter: fcd08f55875faa220a21b5d920445ec500f06276
|
||||||
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
|
TPNiOS: 1b19f54b097912acf89dd41821605cc366432756
|
||||||
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
|
TPNIronSourceSDKAdapter: 632739c889c7a52174c8e3f5e912b99a2db489c0
|
||||||
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
|
TPNMintegralSDKAdapter: 67df075118c7268031c545b62e2216bba569cb22
|
||||||
TPNVungleSDKAdapter: 15aa9b622b4ab59eb7a9f95d5c052d674483b585
|
TPNPangleSDKAdapter: d96656537c9718581142e2885c2c8108a3698a51
|
||||||
VungleAds: cb2aa4791ba4f341c6c026d44cc43eabe258890f
|
TPNUnityAdsSDKAdapter: 655206a266b48be72e24db08fc08d83d88459ccb
|
||||||
|
TPNVungleSDKAdapter: 3c4cc7164945ae2a3535d1fc26ce3ef24a35566c
|
||||||
|
UnityAds: eabbbb3014326e45dc221a467fba16960e7b73e3
|
||||||
|
VungleAds: f7143149d6160211c6d462453adce125160e4283
|
||||||
|
|
||||||
PODFILE CHECKSUM: c9db2b56d9c1cce1499e833f0872906ef776ba87
|
PODFILE CHECKSUM: 057b018f3a97dd68cc7d610593ee523500bad4c4
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user