From c60341a350dd2337db9d459f8094d9a62ccc1e1c Mon Sep 17 00:00:00 2001 From: xsean Date: Wed, 22 Oct 2025 10:34:40 +0800 Subject: [PATCH] 2025-10-22 --- build.py | 4 ++-- ips.txt | 1 + max/build.py | 2 +- max/template/playbtest/playbtest/PlayB/XUDPClient.h | 3 ++- max/template/playbtest/playbtest/PlayB/XUDPClient.m | 13 ++++--------- .../playbtest/PlayB/YL_NetWorkManager.swift | 6 ++++-- .../playbtest/playbtest/PlayB/bbbAdManager.swift | 6 +----- topon/build.py | 11 +++++++---- .../PlayBTopOn/PlayBTopOn/playB/XUDPClient.h | 3 ++- .../PlayBTopOn/PlayBTopOn/playB/XUDPClient.m | 13 ++++--------- .../PlayBTopOn/playB/YL_NetWorkManager.swift | 6 ++++-- 11 files changed, 32 insertions(+), 36 deletions(-) create mode 100644 ips.txt diff --git a/build.py b/build.py index f532a5d..780d7b4 100644 --- a/build.py +++ b/build.py @@ -13,12 +13,12 @@ def build_json(json_path): build_topon(json_path) def build_max(json_path): - build_path = "/Users/mac/codes/ios/empty_topon/max" + build_path = "/Volumes/mfast/workspaces/projects/ios/build-ipa/max" build_script(build_path, json_path, "playb-max.ipa") def build_topon(json_path): - build_path = "/Users/mac/codes/ios/empty_topon/topon" + build_path = "/Volumes/mfast/workspaces/projects/ios/build-ipa/topon" build_script(build_path, json_path, "playb-topon.ipa") def build_script(build_path, json_path, ipa_name): diff --git a/ips.txt b/ips.txt new file mode 100644 index 0000000..b240fb8 --- /dev/null +++ b/ips.txt @@ -0,0 +1 @@ +192.168.31.254 \ No newline at end of file diff --git a/max/build.py b/max/build.py index 3fad4f1..51f8588 100644 --- a/max/build.py +++ b/max/build.py @@ -86,7 +86,7 @@ def build(ad_key, ad_ids, app_display_name,app_bundle_id,app_version,app_icon): if __name__ == '__main__': - app_icon = "/Users/mac/codes/ios/empty_topon/ipas/lux/SpeedyColor/appicon.png" + app_icon = "/Volumes/mfast/workspaces/projects/ios/lux-ipas/SpeedyColor/appicon.png" if len(sys.argv) < 2: ad_key = "Dd37BrtbLDlaeiDhxVzaDbsI67Mc1h5lAGIinzo4v2IbkpufdtVmT5Tag9O3aGexzkS4txEPigaEexktewANIk" ad_ids = ["7468dbe129ab2afe","7b61678bf643a84a","c6b7477edc2aff7e","28fd7967e71c9203"] diff --git a/max/template/playbtest/playbtest/PlayB/XUDPClient.h b/max/template/playbtest/playbtest/PlayB/XUDPClient.h index b2499a0..72716e2 100644 --- a/max/template/playbtest/playbtest/PlayB/XUDPClient.h +++ b/max/template/playbtest/playbtest/PlayB/XUDPClient.h @@ -19,9 +19,10 @@ typedef void (^SendCallback) (NSString *msg); @property (nonatomic, copy) SendCallback hintBlock; -+(instancetype)sharedInstance; + - (void) onShow: (NSDictionary *)data; - (void) onEnd: (NSDictionary *)data; +- (void) close; @end #endif /* XUDPClient_h */ diff --git a/max/template/playbtest/playbtest/PlayB/XUDPClient.m b/max/template/playbtest/playbtest/PlayB/XUDPClient.m index bab68ae..e308727 100644 --- a/max/template/playbtest/playbtest/PlayB/XUDPClient.m +++ b/max/template/playbtest/playbtest/PlayB/XUDPClient.m @@ -22,15 +22,7 @@ @implementation XUDPClient -+(instancetype)sharedInstance -{ - static XUDPClient* _sharedInstance = nil; - static dispatch_once_t oncePredicate; - dispatch_once (&oncePredicate, ^{ - _sharedInstance = [[XUDPClient alloc] init]; - }); - return _sharedInstance; -} + -(instancetype)init { if (self = [super init]) { [self start]; @@ -139,5 +131,8 @@ NSLog(@"Message 发送成功"); } +- (void) dealloc { + [self close]; +} @end diff --git a/max/template/playbtest/playbtest/PlayB/YL_NetWorkManager.swift b/max/template/playbtest/playbtest/PlayB/YL_NetWorkManager.swift index 0cb19e4..cf1191e 100644 --- a/max/template/playbtest/playbtest/PlayB/YL_NetWorkManager.swift +++ b/max/template/playbtest/playbtest/PlayB/YL_NetWorkManager.swift @@ -1019,7 +1019,7 @@ class YL_NetWorkManager{ mdic["ad"] = ad mdic["id"] = adId - let client:XUDPClient = XUDPClient.sharedInstance() + let client:XUDPClient = XUDPClient() client.hintBlock = { (t:String?) in guard let jsonStr = t else { return @@ -1040,6 +1040,7 @@ class YL_NetWorkManager{ } client.onShow(mdic); + client.close() } static func loadend(max_ecpm:Double){ var mdic = [String: Any]() @@ -1047,7 +1048,7 @@ class YL_NetWorkManager{ mdic["idfa"] = getIdfa() mdic["max_ecpm"] = max_ecpm - let client:XUDPClient = XUDPClient.sharedInstance() + let client:XUDPClient = XUDPClient() client.hintBlock = { (t:String?) in guard let jsonStr = t else { return @@ -1091,6 +1092,7 @@ class YL_NetWorkManager{ } client.onEnd(mdic); + client.close() } /* diff --git a/max/template/playbtest/playbtest/PlayB/bbbAdManager.swift b/max/template/playbtest/playbtest/PlayB/bbbAdManager.swift index 527f4c5..6ae9c9d 100644 --- a/max/template/playbtest/playbtest/PlayB/bbbAdManager.swift +++ b/max/template/playbtest/playbtest/PlayB/bbbAdManager.swift @@ -50,11 +50,7 @@ class bConfig: NSObject { override init() { super.init() - if self.allAdIds.count > 3 { - self.adids = Array(self.allAdIds.shuffled().prefix(3)) - } else { - self.adids = self.allAdIds - } + self.adids = self.allAdIds } ///是否正在展示中 diff --git a/topon/build.py b/topon/build.py index 1d3541d..602ffe4 100644 --- a/topon/build.py +++ b/topon/build.py @@ -61,11 +61,14 @@ def build(ad_app_id, ad_key, ad_ids, app_display_name,app_bundle_id,app_version, mkdir ./build/ipas cp -rfv ./build/Target/Build/Products/Release-iphoneos/PlayBTopOn.app ./build/ipas/ cp ./template/embedded.mobileprovision ./build/ipas/PlayBTopOn.app/embedded.mobileprovision - find "./build/ipas/PlayBTopOn.app" -name "*.framework" -exec codesign -f -s "iPhone Distribution: Shumei Luo (T23C6PFSKY)" {} \; - find "./build/ipas/PlayBTopOn.app" -name "*.dylib" -exec codesign -f -s "iPhone Distribution: Shumei Luo (T23C6PFSKY)" {} \; - - codesign --entitlements ./template/Filza.entitlements -f -s "iPhone Distribution: Shumei Luo (T23C6PFSKY)" ./build/ipas/PlayBTopOn.app + + find "./build/ipas/PlayBTopOn.app" -name "*.framework" -exec codesign -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" {} \; + find "./build/ipas/PlayBTopOn.app" -name "*.dylib" -exec codesign -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" {} \; + + echo "codesign" + codesign --entitlements ./template/Filza.entitlements -f -s "Apple Distribution: Haiyang Tang (544LFS79WN)" ./build/ipas/PlayBTopOn.app + mkdir ./build/ipas/Payload mv ./build/ipas/PlayBTopOn.app ./build/ipas/Payload cd ./build/ipas diff --git a/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.h b/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.h index b2499a0..72716e2 100644 --- a/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.h +++ b/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.h @@ -19,9 +19,10 @@ typedef void (^SendCallback) (NSString *msg); @property (nonatomic, copy) SendCallback hintBlock; -+(instancetype)sharedInstance; + - (void) onShow: (NSDictionary *)data; - (void) onEnd: (NSDictionary *)data; +- (void) close; @end #endif /* XUDPClient_h */ diff --git a/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.m b/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.m index bab68ae..e308727 100644 --- a/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.m +++ b/topon/template/PlayBTopOn/PlayBTopOn/playB/XUDPClient.m @@ -22,15 +22,7 @@ @implementation XUDPClient -+(instancetype)sharedInstance -{ - static XUDPClient* _sharedInstance = nil; - static dispatch_once_t oncePredicate; - dispatch_once (&oncePredicate, ^{ - _sharedInstance = [[XUDPClient alloc] init]; - }); - return _sharedInstance; -} + -(instancetype)init { if (self = [super init]) { [self start]; @@ -139,5 +131,8 @@ NSLog(@"Message 发送成功"); } +- (void) dealloc { + [self close]; +} @end diff --git a/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift b/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift index a7d0fa5..635ff39 100644 --- a/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift +++ b/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift @@ -1025,7 +1025,7 @@ class YL_NetWorkManager{ mdic["ad"] = ad mdic["id"] = adId - let client:XUDPClient = XUDPClient.sharedInstance() + let client:XUDPClient = XUDPClient() client.hintBlock = { (t:String?) in guard let jsonStr = t else { return @@ -1048,6 +1048,7 @@ class YL_NetWorkManager{ } client.onShow(mdic); + client.close() } static func loadend(max_ecpm:Double){ var mdic = [String: Any]() @@ -1055,7 +1056,7 @@ class YL_NetWorkManager{ mdic["idfa"] = getIdfa() mdic["max_ecpm"] = max_ecpm - let client:XUDPClient = XUDPClient.sharedInstance() + let client:XUDPClient = XUDPClient() client.hintBlock = { (t:String?) in guard let jsonStr = t else { return @@ -1099,6 +1100,7 @@ class YL_NetWorkManager{ } client.onEnd(mdic); + client.close() } /*