fix:1、删除部分不用的资源代码。2、a面修复bug

This commit is contained in:
barry
2026-04-28 18:42:00 +08:00
parent 70d45d4705
commit cc12dffbaa
417 changed files with 36736 additions and 40575 deletions
@@ -1,2 +1,11 @@
fileFormatVersion: 2
guid: efc4511f2eea8034ca3a0a29cac8f554
guid: efc4511f2eea8034ca3a0a29cac8f554
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,2 +1,11 @@
fileFormatVersion: 2
guid: b014aa072d9631848babd5dafb325d3d
guid: b014aa072d9631848babd5dafb325d3d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because one or more lines are too long
+63 -64
View File
@@ -1,91 +1,90 @@
#import <Photos/Photos.h>
//#import <Photos/Photos.h>
extern "C" {
#import "Winter.h"
#import "UnityAppController.h"
#import "iOSBridgePlugin.h"
#import <DataEyeSDK.h>
//#import <DataEyeSDK.h>
NSString *stringFromChar(const char *input) {
return [NSString stringWithUTF8String: input];
}
void ShezhiACT(bool act){
[iOSBridgePlugin ShezhiACT: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];
// 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 SaveVideoWithCustomDate(const char* videoPathCStr)
{
@autoreleasepool {
NSString *videoPath = [NSString stringWithUTF8String:videoPathCStr];
NSURL *videoURL = [NSURL fileURLWithPath:videoPath];
// 使用当前时间作为创建时间
NSDate *currentDate = [NSDate date];
[[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);
}
}];
}
// @autoreleasepool {
// NSString *videoPath = [NSString stringWithUTF8String:videoPathCStr];
// NSURL *videoURL = [NSURL fileURLWithPath:videoPath];
//
// // 使用当前时间作为创建时间
// NSDate *currentDate = [NSDate date];
//
// [[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]);
}
}];
}
// @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];
}
// 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];
// }
}
}