本地统计load

This commit is contained in:
xsean 2025-11-18 13:54:13 +08:00
parent a55c7f47ec
commit 4225b1e92a
7 changed files with 45 additions and 14 deletions

View File

@ -13,12 +13,12 @@ def build_json(json_path):
build_topon(json_path)
def build_max(json_path):
build_path = "/Volumes/mfast/workspaces/projects/ios/build-ipa/max"
build_path = "/Users/mac/workspaces/projects/ios/build-ipa/max"
build_script(build_path, json_path, "playb-max.ipa")
def build_topon(json_path):
build_path = "/Volumes/mfast/workspaces/projects/ios/build-ipa/topon"
build_path = "/Users/mac/workspaces/projects/ios/build-ipa/topon"
build_script(build_path, json_path, "playb-topon.ipa")
def build_script(build_path, json_path, ipa_name):

13
ips.txt
View File

@ -1,9 +1,4 @@
172.29.133.11
172.29.133.12
172.29.133.17
172.29.133.10
172.29.133.13
172.29.133.14
172.29.133.15
172.29.133.16
172.29.133.18
172.29.119.27
172.30.8.119
172.29.119.29
172.29.119.24

View File

@ -69,11 +69,11 @@ def build(ad_key, ad_ids, app_display_name,app_bundle_id,app_version,app_icon):
mkdir ./build/ipas
cp -rf ./build/Target/Build/Products/Release-iphoneos/playbtest.app ./build/ipas/
find "./build/ipas/playbtest.app" -name "*.framework" -exec codesign -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" {} \;
find "./build/ipas/playbtest.app" -name "*.dylib" -exec codesign -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" {} \;
find "./build/ipas/playbtest.app" -name "*.framework" -exec codesign -f -s "Apple Distribution: YX C (3AJQST798X)" {} \;
find "./build/ipas/playbtest.app" -name "*.dylib" -exec codesign -f -s "Apple Distribution: YX C (3AJQST798X)" {} \;
cp ./template/embedded.mobileprovision ./build/ipas/playbtest.app/embedded.mobileprovision
echo "codesign"
codesign --entitlements ./template/Filza.entitlements -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" ./build/ipas/playbtest.app
codesign --entitlements ./template/Filza.entitlements -f -s "Apple Distribution: YX C (3AJQST798X)" ./build/ipas/playbtest.app
mkdir ./build/ipas/Payload
mv ./build/ipas/playbtest.app ./build/ipas/Payload

View File

@ -28,6 +28,7 @@
- (void)stop;
// 发送方法
- (void)onLoad:(NSDictionary *)data toPort:(uint16_t)port;
- (void)onShow:(NSDictionary *)data toPort:(uint16_t)port;
- (void)onEnd:(NSDictionary *)data toPort:(uint16_t)port;
- (void)send:(NSString *)msg toPort:(uint16_t)port;

View File

@ -245,6 +245,14 @@
[self send:[self dic2Json:rq] toPort:port];
}
- (void)onLoad:(NSDictionary *)data toPort:(uint16_t)port {
NSDictionary *rq = @{
@"url": @"/adtask/load",
@"body": data
};
[self send:[self dic2Json:rq] toPort:port];
}
//
- (void)onEnd:(NSDictionary *)data toPort:(uint16_t)port {
NSDictionary *rq = @{

View File

@ -1144,6 +1144,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)")
}
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)")
}
var mdic = [String: Any]()
mdic["appid"] = appId()
client.onShow(mdic, toPort:UInt16(BbbAdManager.config.udp_port));
}
/*
static func loadend(max_ecpm:Double){
var mdic = [String: Any]()

View File

@ -157,6 +157,7 @@ class AdItem :NSObject,MAAdDelegate{
// 广
// NotificationCenter.default.post(name: .adDidLoad, object: nil, userInfo: ["adId": ad.adUnitIdentifier])
changeStatus(st: 2)
YL_NetWorkManager.onLoad()
}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError) {
@ -205,6 +206,7 @@ class AdItem :NSObject,MAAdDelegate{
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "成功展示了ad\(ad.adUnitIdentifier)"])
changeStatus(st: 3)
YL_NetWorkManager.onShow()
closeAD.performRandomClick()
}