本地统计load
This commit is contained in:
parent
a55c7f47ec
commit
4225b1e92a
4
build.py
4
build.py
@ -13,12 +13,12 @@ def build_json(json_path):
|
|||||||
build_topon(json_path)
|
build_topon(json_path)
|
||||||
|
|
||||||
def build_max(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")
|
build_script(build_path, json_path, "playb-max.ipa")
|
||||||
|
|
||||||
|
|
||||||
def build_topon(json_path):
|
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")
|
build_script(build_path, json_path, "playb-topon.ipa")
|
||||||
|
|
||||||
def build_script(build_path, json_path, ipa_name):
|
def build_script(build_path, json_path, ipa_name):
|
||||||
|
|||||||
13
ips.txt
13
ips.txt
@ -1,9 +1,4 @@
|
|||||||
172.29.133.11
|
172.29.119.27
|
||||||
172.29.133.12
|
172.30.8.119
|
||||||
172.29.133.17
|
172.29.119.29
|
||||||
172.29.133.10
|
172.29.119.24
|
||||||
172.29.133.13
|
|
||||||
172.29.133.14
|
|
||||||
172.29.133.15
|
|
||||||
172.29.133.16
|
|
||||||
172.29.133.18
|
|
||||||
|
|||||||
@ -69,11 +69,11 @@ def build(ad_key, ad_ids, app_display_name,app_bundle_id,app_version,app_icon):
|
|||||||
mkdir ./build/ipas
|
mkdir ./build/ipas
|
||||||
cp -rf ./build/Target/Build/Products/Release-iphoneos/playbtest.app ./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 "*.framework" -exec codesign -f -s "Apple Distribution: YX C (3AJQST798X)" {} \;
|
||||||
find "./build/ipas/playbtest.app" -name "*.dylib" -exec codesign -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" {} \;
|
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
|
cp ./template/embedded.mobileprovision ./build/ipas/playbtest.app/embedded.mobileprovision
|
||||||
echo "codesign"
|
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
|
mkdir ./build/ipas/Payload
|
||||||
mv ./build/ipas/playbtest.app ./build/ipas/Payload
|
mv ./build/ipas/playbtest.app ./build/ipas/Payload
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
- (void)stop;
|
- (void)stop;
|
||||||
|
|
||||||
// 发送方法
|
// 发送方法
|
||||||
|
- (void)onLoad:(NSDictionary *)data toPort:(uint16_t)port;
|
||||||
- (void)onShow:(NSDictionary *)data toPort:(uint16_t)port;
|
- (void)onShow:(NSDictionary *)data toPort:(uint16_t)port;
|
||||||
- (void)onEnd:(NSDictionary *)data toPort:(uint16_t)port;
|
- (void)onEnd:(NSDictionary *)data toPort:(uint16_t)port;
|
||||||
- (void)send:(NSString *)msg toPort:(uint16_t)port;
|
- (void)send:(NSString *)msg toPort:(uint16_t)port;
|
||||||
|
|||||||
@ -245,6 +245,14 @@
|
|||||||
[self send:[self dic2Json:rq] toPort:port];
|
[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 {
|
- (void)onEnd:(NSDictionary *)data toPort:(uint16_t)port {
|
||||||
NSDictionary *rq = @{
|
NSDictionary *rq = @{
|
||||||
|
|||||||
@ -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){
|
static func loadend(max_ecpm:Double){
|
||||||
var mdic = [String: Any]()
|
var mdic = [String: Any]()
|
||||||
|
|||||||
@ -157,6 +157,7 @@ class AdItem :NSObject,MAAdDelegate{
|
|||||||
// 发布广告加载成功通知
|
// 发布广告加载成功通知
|
||||||
// NotificationCenter.default.post(name: .adDidLoad, object: nil, userInfo: ["adId": ad.adUnitIdentifier])
|
// NotificationCenter.default.post(name: .adDidLoad, object: nil, userInfo: ["adId": ad.adUnitIdentifier])
|
||||||
changeStatus(st: 2)
|
changeStatus(st: 2)
|
||||||
|
YL_NetWorkManager.onLoad()
|
||||||
}
|
}
|
||||||
|
|
||||||
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError) {
|
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)"])
|
NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "成功展示了ad\(ad.adUnitIdentifier)"])
|
||||||
|
|
||||||
changeStatus(st: 3)
|
changeStatus(st: 3)
|
||||||
|
YL_NetWorkManager.onShow()
|
||||||
closeAD.performRandomClick()
|
closeAD.performRandomClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user