处理上架的问题

1:处理了openurl 拉起问题
2:去掉了http
3 隐私等等
This commit is contained in:
2026-03-05 14:30:07 +08:00
parent 8cc484edcb
commit d8a84dc478
34 changed files with 506 additions and 511 deletions

View File

@@ -6,6 +6,7 @@
//
#import "NetworkStreamHandler.h"
#import <Security/Security.h>
@interface NetworkStreamHandler ()
@@ -243,8 +244,26 @@ didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
// SSL
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
SecTrustRef trust = challenge.protectionSpace.serverTrust;
if (!trust) {
completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
return;
}
BOOL ok = NO;
if (@available(iOS 13.0, *)) {
ok = SecTrustEvaluateWithError(trust, nil);
} else {
SecTrustResultType result = kSecTrustResultInvalid;
OSStatus status = SecTrustEvaluate(trust, &result);
ok = (status == errSecSuccess) &&
(result == kSecTrustResultUnspecified || result == kSecTrustResultProceed);
}
if (ok) {
NSURLCredential *credential = [NSURLCredential credentialForTrust:trust];
completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
} else {
completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
}
} else {
completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
}