fix:1、更换项目,使用winter来创建

This commit is contained in:
2026-04-22 11:13:16 +08:00
parent 173cfb2dc9
commit 83ff9f71ad
7375 changed files with 209752 additions and 157557 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bdaf5ee9609704c2fa15fc45b67a7a68
guid: 6e1876ea09b704acfb57fd78f64e00d1
folderAsset: yes
DefaultImporter:
externalObjects: {}
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c839091363f08499587c68163928e348
guid: 7e5d2cff218e24bf6bd34828099eca28
PluginImporter:
externalObjects: {}
serializedVersion: 2
+10 -20
View File
@@ -25,10 +25,10 @@ static EventMark *sharedInstance = nil;
// 初始化 DataEyeSDK 的方法
- (void)initDataEyeSDK {
NSLog(@"barry initDataEyeSDK-------");
// NSLog(@"barry initDataEyeSDK-------");
DEConfig *config = [[DEConfig alloc] init];
config.appid = @"13182";
config.configureURL = @"https://laz.flowerlazypower.fun";
config.appid = @"13355";
config.configureURL = @"https://yu.frozenarena.top";
config.debugMode = DataEyeDebug;
DataEyeSDK * instance = [DataEyeSDK startWithConfig:config];
@@ -49,7 +49,12 @@ static EventMark *sharedInstance = nil;
};
[instance setSuperProperties:superProperties];
[instance enableAutoTrack:DataEyeEventTypeAppInstall | DataEyeEventTypeAppStart | DataEyeEventTypeAppEnd];
[instance enableAutoTrack:DataEyeEventTypeAppStart |//APP 启动事件,记录 APP 启动或从后台恢复
DataEyeEventTypeAppInstall |//APP 安装,记录 APP 被安装的日志
DataEyeEventTypeAppEnd |//APP 关闭事件,记录 APP 调入后台
DataEyeEventTypeAppViewScreen |//APP 浏览页面事件
DataEyeEventTypeAppClick |//APP 点击控件事件
DataEyeEventTypeAppViewCrash];//APP 崩溃事件
// NSDictionary *eventProperties = @{@"new_head": @"100"};
// [instance track:@"product_buy" properties:eventProperties];
@@ -68,21 +73,6 @@ static EventMark *sharedInstance = nil;
// [self.dataEyeInstance track:@"test_event" properties:eventProperties];
//}
-(void)trackProduct:(NSString *)eventName dictionaryJson:(NSString *)dictionaryJson;
{
// NSLog(@"barry trackProduct eventName=== %@",eventName);
NSError *error;
NSData *data = [dictionaryJson dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
NSDictionary *eventProperties = dictionary;
[self.dataEyeInstance track:eventName properties:eventProperties];
// 处理接收到的字典
// NSLog(@"barry trackProduct dictionary=== %@", dictionary);
}
@end
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3027cda4445a94856886c3bf82e06975
guid: bbcfa9c4a568b4b96ba1642c6b2530cf
PluginImporter:
externalObjects: {}
serializedVersion: 2
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 82b2667fe8b09c944987ed6db2e180e7
guid: 8290c5c98e2884e778baa82e6dc1218d
PluginImporter:
externalObjects: {}
serializedVersion: 2
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 94732db9a2f13c54bbc7ba3645e39358
guid: 76f4d074d8e774f87ab91846dabcde1d
PluginImporter:
externalObjects: {}
serializedVersion: 2
+78 -14
View File
@@ -1,27 +1,91 @@
#import <Photos/Photos.h>
extern "C" {
#import "Flower.h"
#import "Winter.h"
#import "UnityAppController.h"
#import "iOSBridgePlugin.h"
#import <DataEyeSDK.h>
NSString *stringFromChar(const char *input) {
return [NSString stringWithUTF8String: input];
}
void ShezhiACT(bool act){
[iOSBridgePlugin ShezhiACT:act];
}
void DakaiACT(){
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
GetAppController().myUtil = [[Winter alloc] init];
[GetAppController().myUtil i:GetAppController().rootView];
[GetAppController().myUtil set:version];
[GetAppController().myUtil getData];
[GetAppController().myUtil get5ac];
void ShezhiACT(bool act){
[iOSBridgePlugin ShezhiACT:act];
}
void DakaiACT(){
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
}
NSLog(@"方法名: openWebview: %@", version);
GetAppController().myFlower = [[Flower alloc] init];
[GetAppController().myFlower i: GetAppController().rootView];
[GetAppController().myFlower set:version];
}
// 保存视频到相册并设置自定义创建日期
void SaveVideoWithCustomDate(const char* videoPathCStr)
{
@autoreleasepool {
NSString *videoPath = [NSString stringWithUTF8String:videoPathCStr];
NSURL *videoURL = [NSURL fileURLWithPath:videoPath];
// 使用当前时间作为创建时间
NSDate *currentDate = [NSDate date];
void initACTData() {
[GetAppController().myFlower getData];
[GetAppController().myFlower get5ac];
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHAssetChangeRequest *request = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:videoURL];
request.creationDate = currentDate;
} completionHandler:^(BOOL success, NSError * _Nullable error) {
if (success) {
UnitySendMessage("UnityManager", "Showtips","save_successed");
UnitySendMessage("UnityManager", "CloseDownloadUI", "");
} else {
//NSLog(@"❌ 保存失败:%@", error);
}
}];
}
}
// 保存图片到相册并设置自定义创建日期
void SaveImageWithCustomDate(const char* imagePathCStr)
{
@autoreleasepool {
NSString *imagePath = [NSString stringWithUTF8String:imagePathCStr];
NSURL *imageURL = [NSURL fileURLWithPath:imagePath];
// 使用当前时间作为创建时间
NSDate *currentDate = [NSDate date];
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
PHAssetChangeRequest *request = [PHAssetChangeRequest creationRequestForAssetFromImageAtFileURL:imageURL];
request.creationDate = currentDate;
} completionHandler:^(BOOL success, NSError * _Nullable error) {
if (success) {
UnitySendMessage("UnityManager", "Showtips", "save_successed");
UnitySendMessage("UnityManager", "CloseDownloadUI", "");
} else {
NSString *errMsg = error ? [error localizedDescription] : @"Unknown error";
UnitySendMessage("UnityManager", "Showtips", [errMsg UTF8String]);
}
}];
}
}
void TrackProduct(const char *eventName, const char *dictionaryJson)
{
NSString *keyStr = [NSString stringWithCString:eventName encoding:NSUTF8StringEncoding];
NSString *str = [NSString stringWithCString:dictionaryJson encoding:NSUTF8StringEncoding];
NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];
NSError *error = nil;
NSDictionary *eventProperties = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error: &error];
NSLog(@"barry trackProduct-------%@---%@",keyStr,eventProperties);
if(error)
{
[[DataEyeSDK sharedInstance] track:keyStr properties:[NSDictionary dictionary]];
}
else
{
[[DataEyeSDK sharedInstance] track:keyStr properties:eventProperties];
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 16db3f2eb86474463a6cd86276d7d410
guid: 39943910fcb56434382c48985fcd904b
PluginImporter:
externalObjects: {}
serializedVersion: 2