fix:1、修复bug
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyCZVIGmtasQ-G-TbK-jhn0CV5lQR8glUes</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>658415934998</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.candydoggame.arrowgamebeattap</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>arrow-game--beat-tap</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>arrow-game--beat-tap.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:658415934998:ios:a75b358d563d165d6a1f37</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0a48fe231f0e4f76888b461fbe47d78
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,4 @@
|
||||
#import <Photos/Photos.h>
|
||||
//#import <Photos/Photos.h>
|
||||
extern "C" {
|
||||
#import "UnityAppController.h"
|
||||
#import "iOSBridgePlugin.h"
|
||||
@@ -9,54 +9,54 @@ extern "C" {
|
||||
return [NSString stringWithUTF8String: input];
|
||||
}
|
||||
|
||||
// 保存视频到相册并设置自定义创建日期
|
||||
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);
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
// 保存图片到相册并设置自定义创建日期
|
||||
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 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);
|
||||
// }
|
||||
// }];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 保存图片到相册并设置自定义创建日期
|
||||
// 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];
|
||||
|
||||
Reference in New Issue
Block a user