Commit 2426dcda6cf77a2ad85b7e4155ce0075c2a3f55f

Authored by 权海
1 parent 95526ecb

feat(ui):更新OBS.framework

... ... @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 77;
objects = {
/* Begin PBXBuildFile section */
... ... @@ -342,10 +342,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
... ... @@ -416,10 +420,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
... ... @@ -652,7 +660,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Runner Watch App/Runner Watch AppDebug.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 80;
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
... ... @@ -666,7 +674,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 2.5.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.luiz.doublefeel.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
... ... @@ -690,7 +698,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Runner Watch App/Runner Watch App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 23;
CURRENT_PROJECT_VERSION = 80;
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
... ... @@ -704,7 +712,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 2.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.luiz.doublefeel.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
... ... @@ -729,7 +737,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Runner/Runner-Debug.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = " 80";
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
... ... @@ -808,7 +816,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = " 80";
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
... ...
... ... @@ -35,17 +35,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
AppShared.shared.agent.genUA()
AppShared.shared.payment.delegate = self
_ = AppShared.shared.payment.listenForTransactions()
UIApplication.shared.registerForRemoteNotifications()
UNUserNotificationCenter.current().setBadgeCount(0)
UNUserNotificationCenter.current().delegate = self
requestIDFAAuthorization()
WatchConnectivityService.shared.activate()
HealthKitService.shared.startBackgroundObserversIfNeeded()
setup()
cacheLaunchURLIfNeeded(launchOptions)
return true
}
... ... @@ -71,6 +61,20 @@ class AppDelegate: NSObject, UIApplicationDelegate {
handleFlutterUrl(urlString)
return true
}
func setup(){
AppShared.shared.agent.genUA()
AppShared.shared.payment.delegate = self
_ = AppShared.shared.payment.listenForTransactions()
UIApplication.shared.registerForRemoteNotifications()
UNUserNotificationCenter.current().setBadgeCount(0)
UNUserNotificationCenter.current().delegate = self
requestIDFAAuthorization()
WatchConnectivityService.shared.activate()
HealthKitService.shared.startBackgroundObserversIfNeeded()
}
func warmUpFlutterEngineIfNeeded() {
guard !isFlutterEngineReady else {
... ...
... ... @@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_END
#import "OBSClient.h"
#import "OBSServiceBaseModel.h"
#import "OBSUtils.h"
#import "OBSLocalTimeUtils.h"
#import "OBSBolts.h"
#import "OBSServiceCredentialProvider.h"
#import "OBSMantle.h"
... ... @@ -120,7 +121,7 @@ NS_ASSUME_NONNULL_END
#import "OBSDeleteObjectModel.h"
#import "OBSDeleteObjectsModel.h"
#pragma mark additional
#pragma mark additional
#import "OBSDownloadFileModel.h"
#import "OBSUploadFileModel.h"
... ...
... ... @@ -10,7 +10,7 @@
#define OBSBaseDefinition_h
static NSString *const OBSSDKVersion =@"3.24.4";
static NSString *const OBSSDKVersion =@"3.25.6";
static NSUInteger const maxConcurrentRequestCountDefault =3;
... ... @@ -26,6 +26,7 @@ static NSString *const OBSClientErrorHTTPRequestIDKey =@"RequestID";
static NSString *const OBSClientErrorHTTPCodeKey =@"HTTPErrorCode";
static NSString *const OBSClientErrorHTTPBodyKey =@"HTTPErrorBody";
static NSString *const OBSClientErrorInvalidParameter =@"InvalidParameter";
static NSString *const OBSRequestTimeTooSkewedError =@"RequestTimeTooSkewed";
static char *const OBSProcessorsQueueName ="com.obs.sdk.processors";
static NSString *const OBSMaxConcurrentCommandRequestCountKey =@"maxConcurrentCommandRequestCount";
... ... @@ -61,6 +62,8 @@ static NSString *const OBSRequestDownloadFilePathKey =@"downloadFileP
static NSString *const OBSRequestBackgroundKey =@"background";
// headesr key;
static NSString *const OBSHeadersUAKey =@"User-Agent";
static NSString *const OBSHeaderErrorCode =@"x-obs-error-code";
static NSString *const OBSHeaderErrorCodeS3 =@"x-amz-error-code";
static NSString *const OBSHeadersHostKey =@"Host";
static NSString *const OBSHeadersContentTypeKey =@"Content-Type";
... ...
... ... @@ -171,6 +171,7 @@
*/
@property (nonatomic, assign) OBSProtocolType protocolType;
@property (nonatomic, strong, nullable) OBSWeakMutableArray *networkingRequestList;
/**
取消请求
... ... @@ -207,6 +208,10 @@
请求ID
*/
@property (nonatomic, strong, nullable) NSString *requestID;
/**
响应原始数据
*/
@property (nonatomic, strong, nullable) NSMutableData *responseRawData;
@end
... ...
... ... @@ -14,6 +14,7 @@
#define OBSBaseNetworking_h
#import "OBSBaseConstDefinition.h"
#import "OBSBaseModel.h"
#import "OBSCallback.h"
@class OBSBFTaskCompletionSource;
@class OBSBFTask;
@class OBSBaseRequest;
... ... @@ -67,6 +68,14 @@
#pragma mark - Networking Manager
@interface OBSNetworkingManager :NSObject<NSURLSessionDelegate, NSURLSessionTaskDelegate,NSURLSessionDataDelegate,NSURLSessionDownloadDelegate>
@property (nonatomic, readonly, nonnull) OBSBaseConfiguration *configuration;
@property (nonatomic, strong) NSURLSession *commandURLSession;
@property (nonatomic, strong) NSURLSession *uploadURLSession;
@property (nonatomic, strong) NSURLSession *downloadURLSession;
@property (nonatomic, strong) NSURLSession *backgroundUploadURLSession;
@property (nonatomic, strong) NSURLSession *backgroundDownloadURLSession;
@property (nonatomic, strong) NSOperationQueue *commandURLTaskQueue;
@property (nonatomic, strong) NSOperationQueue *uploadURLTaskQueue;
@property (nonatomic, strong) NSOperationQueue *downloadURLTaskQueue;
-(instancetype) initWithConfiguration:(OBSBaseConfiguration*) configuration;
-(OBSBFTask*) sendRequest: (OBSBaseNetworkingRequest*) request;
-(void)releaseSessions;
... ... @@ -103,6 +112,8 @@
@property (nonatomic, weak, nullable) OBSBaseRequest *obsRequest;
@property (readonly, nonatomic, assign) BOOL isCancelled;
-(void)cancel;
-(void)addCallbackHeader:(OBSCallback*) callback protocalType:(OBSProtocolType) protocolType;
-(void)addForbidOverwrite:(NSString*) header protocalType:(OBSProtocolType) protocolType;
@end
@interface OBSNetworkingCommandRequest : OBSBaseNetworkingRequest<OBSNetworkingRequestJSONDataProtocol, OBSGetBodyTypeProtocol>
... ...
//
// OBSCallBack.h
// test
//
// Created by ruanhanzhou on 2025/2/14.
// Copyright © 2025 Lprison. All rights reserved.
//
#import "OBSBaseModel.h"
#ifndef OBSCallback_h
#define OBSCallback_h
@interface OBSCallback : OBSBaseEntity
@property (nonatomic, copy, nonnull) NSString * callbackUrl;
@property (nonatomic, copy, nonnull) NSString * callbackBody;
@property (nonatomic, copy, nullable) NSString * callbackHost;
@property (nonatomic, copy, nullable) NSString * callbackBodyType;
-(void) setCallbackUrl:(nonnull NSString * )callbackUrl;
-(void) setCallbackBody:(nonnull NSString * )callbackBody;
- (instancetype) initWithUrl:(nonnull NSString*) callbackUrl
withBody:(nonnull NSString*) callbackBody
withBodyType:(nullable NSString*) callbackBodyType
withHost:(nullable NSString*) callbackHost;
/**
获取编码后的callback
*/
-(nullable NSString*) toBase64EncodedJson;
@end
#endif /* OBSCallback_h */
... ...
... ... @@ -13,6 +13,7 @@
#ifndef OBSClient_h
#define OBSClient_h
#import "OBSLogging.h"
#import "OBSServiceCredentialProvider.h"
@class OBSBaseRequest;
@class OBSBFTask;
... ... @@ -34,6 +35,15 @@
*/
-(instancetype) initWithConfiguration: (__kindof OBSBaseConfiguration*) configuration;
#pragma mark - refresh
/**
client刷新
@param credentialProvider 配置参数
*/
-(void) refresh: (__kindof OBSStaticCredentialProvider*) credentialProvider error:(NSError**) error;
#pragma mark - set logger
/* *Set log level, default level is info.
log levels are:
... ...
... ... @@ -17,6 +17,7 @@
#import "OBSServiceBaseModel.h"
#import "OBSServiceConstDefinition.h"
#import "OBSServiceCommonEntities.h"
#import "OBSCallback.h"
@class OBSAbstractEncryption;
//request
... ... @@ -49,6 +50,15 @@
多段任务列表
*/
@property (nonatomic, strong, nonnull) NSMutableArray<OBSPart*> *partsList;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ... @@ -78,6 +88,15 @@
@property (nonatomic, strong, nonnull) NSMutableArray<OBSPart*> *partsList;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
/**
初始化合并段request
@param bucketName 桶名
... ...
... ... @@ -110,6 +110,10 @@
自定义元数据
*/
@property (nonatomic, strong, nullable) NSDictionary *metaDataDict;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ... @@ -205,6 +209,10 @@
自定义MIME类型
*/
@property (nonatomic, strong, nonnull) NSString *customContentType;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
/**
初始化复制对象request
... ...
... ... @@ -62,6 +62,10 @@
MIME类型
*/
@property (nonatomic, assign) OBSContentType contentType;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ... @@ -121,6 +125,10 @@
最终映射MIME类型
*/
@property (nonatomic, strong, nonnull) NSString *finalContentType;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
/**
初始化多段上传任务request
... ...
//
// LocalTimeUtils.h
// test
//
// Created by ruanhanzhou on 2024/9/12.
// Copyright © 2024 Lprison. All rights reserved.
//
#ifndef OBSLocalTimeUtils_h
#define OBSLocalTimeUtils_h
@interface OBSLocalTimeUtils : NSObject
+ (NSDate*) dateWithTimeDiff: (NSDate*) date;
+ (void) setTimeDiffInSecond:(long) timeDiffSecondsInLong;
+ (void) setTimeDiffInSecondFromServerTime:(NSDictionary *) headers
xmlErrorDict:(NSDictionary *) xmlErrorDict;
+ (Boolean) isAutoRetryEnabled;
+ (void) setIfAutoRetryEnabled:(Boolean) isAutoRetryEnabled;
@end
#endif /* OBSLocalTimeUtils_h */
... ...
... ... @@ -13,6 +13,7 @@
#import "OBSClient.h"
#import "OBSServiceBaseModel.h"
#import "OBSServiceConstDefinition.h"
#import "OBSCallback.h"
//request
@class OBSAbstractEncryption;
... ... @@ -72,6 +73,14 @@
MIME类型
*/
@property (nonatomic, assign) OBSContentType contentType;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ... @@ -171,6 +180,15 @@
上传对象时的回调
*/
@property (nonatomic, copy, nonnull) OBSNetworkingUploadProgressBlock uploadProgressBlock;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ...
... ... @@ -38,6 +38,10 @@ static NSString *const OBSCanonicalDateKey_OBS =@"x-obs-date";
static NSString *const OBSCanonicalContentSha256Key_OBS =@"x-obs-content-sha256";
static NSString *const OBSCanonicalRequestIDKey_OBS =@"x-obs-request-id";
static NSString *const OBSSTSTokenHeaderKey_OBS =@"x-obs-security-token";
static NSString *const OBSCallbackHeaderKey_OBS =@"x-obs-callback";
static NSString *const OBSCallbackHeaderKey_V2 =@"x-amz-callback";
static NSString *const OBSForbidOverwrite_OBS =@"x-obs-forbid-overwrite";
static NSString *const OBSForbidOverwrite_V2 =@"x-amz-forbid-overwrite";
static NSString *const OBSServiceName_OBS =@"s3";
static NSString *const OBSEncryptionKMSKey =@"aws:kms";
... ...
... ... @@ -37,7 +37,8 @@
@property (nonatomic, assign) OBSAuthVersion authVersion;
@property (nonatomic, assign) OBSProtocolType protocolType;
@property (nonatomic, strong, nonnull) NSString *securityToken;
@property (nonatomic,assign) BOOL isGetProtocol;
@property (nonatomic, assign) NSTimeInterval timeOffset;
@property (nonatomic, assign) BOOL isGetProtocol;
/**
使用AccessKey初始化凭证 默认采用V2鉴权
... ...
... ... @@ -13,6 +13,7 @@
#import "OBSClient.h"
#import "OBSServiceBaseModel.h"
#import "OBSServiceConstDefinition.h"
#import "OBSCallback.h"
@class OBSAbstractEncryption;
#pragma mark - request
... ... @@ -98,6 +99,15 @@
*/
@property (nonatomic, assign) OBSContentType contentType;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
@end
... ... @@ -198,6 +208,27 @@
@property (nonatomic, strong, nonnull) NSString *finalContentType;
/**
通过cancel方法暂停上传后,是否自动取消断点续传任务,并且删除本地记录上传进度的文件
*/
@property (nonatomic, assign) BOOL needAbortUploadFileAfterCancel;
/**
断点续传上传中分段上传任务的失败后重试间隔(单位ms)
*/
@property (nonatomic, assign) NSInteger uploadPartRetryIntervalMs;
/**
断点续传上传中每个分段上传任务的最大重试次数
*/
@property (nonatomic, assign) NSInteger maxUploadPartRetryCount;
/**
上传回调
*/
@property (nonatomic, nullable) OBSCallback* callback;
/**
x-obs-forbid-overwrite 头域
*/
@property (nonatomic, nullable) NSString * forbid_overwrite;
/**
初始化断点续传request
@param bucketName 桶名
... ...
framework module OBS {
umbrella header "OBS.h"
export *
module * { export * }
}
... ...
... ... @@ -45,6 +45,9 @@ private struct RunnerLaunchView: View {
SplashView()
.onAppear(perform: startIfNeeded)
}
}
.onAppear {
appDelegate.setup()
}.onOpenURL { url in
appDelegate.handleFlutterUrl(url.absoluteString)
}
... ...