From 926344b17eb5e0ff68598ab399d06d8b20cb9340 Mon Sep 17 00:00:00 2001 From: Darktt Date: Wed, 16 Oct 2024 16:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E6=8F=B4=20Swift6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 6 +++--- JsonDecodeProtection.xcodeproj/project.pbxproj | 8 ++++---- README.md | 4 ++-- SourceCode/JsonProtection/DTAES.swift | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eff0e97..4312bf9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,10 +8,10 @@ on: jobs: build: - runs-on: macos-12 + runs-on: macos-14.5 steps: - uses: actions/checkout@v1 - name: Select Xcode - run: sudo xcode-select -switch /Applications/Xcode_14.1.app && /usr/bin/xcodebuild -version + run: sudo xcode-select -switch /Applications/Xcode_16.0.app && /usr/bin/xcodebuild -version - name: Run tests - run: xcodebuild test -scheme JsonDecodeProtection -project JsonDecodeProtection.xcodeproj -destination 'platform=iOS Simulator,name=iPhone 13,OS=16.1' | xcpretty && exit ${PIPESTATUS[0]} + run: xcodebuild test -scheme JsonDecodeProtection -project JsonDecodeProtection.xcodeproj -destination 'platform=iOS Simulator,name=iPhone 13,OS=18.0' | xcpretty && exit ${PIPESTATUS[0]} diff --git a/JsonDecodeProtection.xcodeproj/project.pbxproj b/JsonDecodeProtection.xcodeproj/project.pbxproj index 5275175..16dc9f7 100644 --- a/JsonDecodeProtection.xcodeproj/project.pbxproj +++ b/JsonDecodeProtection.xcodeproj/project.pbxproj @@ -494,7 +494,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -527,7 +527,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -548,7 +548,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.JsonDecodeProtectionTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JsonDecodeProtection.app/JsonDecodeProtection"; TVOS_DEPLOYMENT_TARGET = 14.0; @@ -572,7 +572,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.JsonDecodeProtectionTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JsonDecodeProtection.app/JsonDecodeProtection"; TVOS_DEPLOYMENT_TARGET = 14.0; diff --git a/README.md b/README.md index 8f22e4e..a22f684 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # JsonProtection -[![Swift-5.8](https://img.shields.io/badge/Swift-5.8-red.svg?style=plastic&logo=Swift&logoColor=white&link=)](https://developer.apple.com/swift/) +[![Swift-6.0](https://img.shields.io/badge/Swift-6.0-red.svg?style=plastic&logo=Swift&logoColor=white&link=)](https://developer.apple.com/swift/) [![example workflow](https://github.com/Darktt/JsonProtection/actions/workflows/main.yml/badge.svg)]() 處理後端提供各種神奇 Json 資料,而做的解析保護 @@ -10,7 +10,7 @@ * File > Swift Packages > Add Package Dependency * Add https://github.com/Darktt/JsonProtection -* Select "Up to Next Major" with "1.1.0" +* Select "Up to Next Major" with "1.2.0" ## 功能說明 diff --git a/SourceCode/JsonProtection/DTAES.swift b/SourceCode/JsonProtection/DTAES.swift index c0a9829..c2dbd67 100644 --- a/SourceCode/JsonProtection/DTAES.swift +++ b/SourceCode/JsonProtection/DTAES.swift @@ -219,7 +219,7 @@ extension DTAES } public - struct Options: OptionSet + struct Options: OptionSet, Sendable { public typealias RawValue = UInt8