// 1. Add the xcstrings-tool Package dependency .package(url: "https://github.com/liamnichols/xcstrings-tool.git", from: "0.1.0") // 2. Or use the repo is essentially a mirror of the main repository however the xcstrings-tool command line interface is a binary dependency that significantly simplifies your build graph and improves compile times. .package(url: "https://github.com/liamnichols/xcstrings-tool-plugin.git", from: "0.1.0")
Printing description of error: ▿ AFError ▿ serverTrustEvaluationFailed : 1 element ▿ reason : ServerTrustFailureReason ▿ noRequiredEvaluator : 1 element - host : "***" (lldb) po error.debugDescription "Server trust evaluation failed due to reason: A ServerTrustEvaluating value is required for host *** but none was found."
原因是配置了白名单
1 2 3 4 5 6 7 8 9 10 11
var evaluators: [String: ServerTrustEvaluating] = [:]
let evaluators: [String: ServerTrustEvaluating] = [ "*.yourdomain.com": PinnedCertificatesTrustEvaluator() ] // 白名单 allHostsMustBeEvaluated: true let serverTrust =ServerTrustManager(allHostsMustBeEvaluated: true, evaluators: evaluators)
// 从给定的文件名创建证书:SecCertificate对象。 staticfunccertificate(filename: String) -> SecCertificate { let filePath =Bundle.test.path(forResource: filename, ofType: "cer")! let data =try!Data(contentsOf: URL(fileURLWithPath: filePath)) let certificate =SecCertificateCreateWithData(nil, data asCFData)!
return certificate } }
functestThatExpiredCertificateRequestFailsWhenPinningLeafPublicKeyWithCertificateChainValidation() { // Given // 这里直接从证书提取公钥 let keys = [TestCertificates.leaf].af.publicKeys let evaluators = [expiredHost: PublicKeysTrustEvaluator(keys: keys)]
let manager =Session(configuration: configuration, serverTrustManager: ServerTrustManager(evaluators: evaluators))
let expectation = expectation(description: "\(expiredURLString)") var error: AFError?
// When manager.request(expiredURLString) .response { resp in error = resp.error expectation.fulfill() }
waitForExpectations(timeout: timeout)
// Then XCTAssertNotNil(error, "error should not be nil") XCTAssertEqual(error?.isServerTrustEvaluationError, true)
ifcaselet .serverTrustEvaluationFailed(reason)?= error { if#available(iOS12, macOS10.14, tvOS12, watchOS5, *) { XCTAssertTrue(reason.isTrustEvaluationFailed, "should be .trustEvaluationFailed") } else { XCTAssertTrue(reason.isDefaultEvaluationFailed, "should be .defaultEvaluationFailed") } } else { XCTFail("error should be .serverTrustEvaluationFailed") } }
task: name: hello macos_instance: # can be a remote or a local virtual machine # image: ghcr.io/cirruslabs/macos-sonoma-base:latest image: sonoma-xcode hello_script: - echo"Hello from within a Tart VM!" - echo"Here is my CPU info:" - sysctl -n machdep.cpu.brand_string - sleep 15
运行该task
将上述 .cirrus.yml 文件放入存储库的根目录中,并使用以下命令运行它:
1 2
brew install cirruslabs/cli/cirrus cirrus run
从 Tart VM 中检索工件
在许多情况下,需要从 Tart 虚拟机中检索特定文件或文件夹。例如,以下 .cirrus.yml 配置定义了一个任务,该任务构建二进制 tart 文件并通过 artifacts 指令公开它:
1 2 3 4 5 6 7
task: name: Build macos_instance: image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest build_script: swift build --product tart binary_artifacts: path: .build/debug/tart
task: name: xcode test macos_instance: # can be a remote or a local virtual machine # image: ghcr.io/cirruslabs/macos-sonoma-base:latest image: sonoma-xcode hello_script: - echo"Hello from within a Tart VM!" - echo"Here is my CPU info:" - sysctl -n machdep.cpu.brand_string build_script: xcodebuild -scheme DemoApp -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' clean test binary_artifacts: path: .build/debug/tart
GitHub Actions 部分log
1 2 3 4 5 6 7 8 9 10
Run cirrus run 'xcode test' task pull virtual machine clone virtual machine boot virtual machine syncing working directory 'hello' script 'build' script 'binary' artifacts 'xcode test' task succeeded in 03:17!
Open Chinese Convert (OpenCC, 開放中文轉換) is an opensource project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai). It supports character-level and phrase-level conversion, character variant conversion and regional idioms among Mainland China, Taiwan and Hong Kong. This is not translation tool between Mandarin and Cantonese, etc.
Features
Strictly differentiate between 「one simplified to many traditionals」 and 「one simplified to many variants」. Completely compatible with different variants and can realize dynamic substitution. Strictly scrutinize one-simplified-to-multiple-traditional entries, and the principle is 「if it can be divided, then it will be divided」. Support Mainland China, Taiwan, Hong Kong, different variants and regional customary word conversion, such as 「裏」「裡」、「鼠標」「滑鼠」.
If you have any questions or suggestions, you can contact them through Email.
Clickman is a small and practical auxiliary tool software.
It can automatically click the left mouse button at the set time interval to achieve the effect of automatic consecutive clicks.
Up to about 110 clicks per second.
The main application scenarios are as follows:
Automatically repeat clicking skills in online games. Especially for clicking-type air combat or tower defense games, repeat clicking attacks to achieve higher damage output.
Webpage auto-refresh or scroll. By setting a proper click interval and location, achieve the effect of the mouse automatically scrolling up and down the webpage, equivalent to manually dragging the mouse scroll wheel.
For any questions or suggestions, please feel free to contact us via email at 531sunlight@gmail.com.