diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c92a2ee..b948ea83c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: branches: '*' env: - CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer' + CI_XCODE_VER: '/Applications/Xcode_12.5.1.app/Contents/Developer' CI_XCODE_13: '/Applications/Xcode_13.3.app/Contents/Developer' jobs: @@ -165,11 +165,11 @@ jobs: uses: codecov/codecov-action@v2 with: files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}} - env_vars: IOS5_2 + env_vars: IOS_Earliest fail_ci_if_error: true env: DEVELOPER_DIR: ${{ env.CI_XCODE_VER }} - + linux: runs-on: ubuntu-18.04 steps: @@ -239,6 +239,6 @@ jobs: - name: Use multiple cores run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1 - name: Carthage - run: ./carthage.sh build --no-skip-current --use-xcframeworks + run: ./Scripts/carthage.sh build --no-skip-current --use-xcframeworks env: DEVELOPER_DIR: ${{ env.CI_XCODE_13 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 418ac379c..1df5fc712 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,6 @@ on: release: types: [published] env: - CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer' CI_XCODE_13: '/Applications/Xcode_13.3.app/Contents/Developer' jobs: diff --git a/.swiftlint.yml b/.swiftlint.yml index eeb9be32c..67ac4f0e5 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -9,3 +9,4 @@ excluded: # paths to ignore during linting. Takes precedence over `included`. - Tests/ParseSwiftTests/ParseEncoderTests - DerivedData - .build + - .dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a140236d..85bc560d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,15 @@ ### main -[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.1...main) +[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.4.0...main) * _Contributing to this repo? Add info about your change here to be included in the next release_ +### 4.4.0 +[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.1...4.4.0) + +__Improvements__ +- Drop support for Swift 5.2 as App Store requires apps to be built in Xcode 12 ([#356](https://github.com/parse-community/Parse-Swift/pull/356)), thanks to [Corey Baker](https://github.com/cbaker6). + ### 4.3.1 [Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.0...4.3.1) @@ -15,7 +21,7 @@ __Fixes__ [Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.2.0...4.3.0) __Improvements__ -- Use DocC for documentation instead of jazzy. Improved documentation. ([#350](https://github.com/parse-community/Parse-Swift/pull/350)), thanks to [Corey Baker](https://github.com/cbaker6). +- Use DocC for documentation instead of jazzy. Improved documentation ([#350](https://github.com/parse-community/Parse-Swift/pull/350)), thanks to [Corey Baker](https://github.com/cbaker6). ### 4.2.0 [Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.1.0...4.2.0) diff --git a/ParseSwift.podtemplate b/ParseSwift.podtemplate index 652a393f5..d10c76163 100644 --- a/ParseSwift.podtemplate +++ b/ParseSwift.podtemplate @@ -14,12 +14,12 @@ Pod::Spec.new do |s| s.osx.deployment_target = "10.15" s.tvos.deployment_target = "13.0" s.watchos.deployment_target = "6.0" - s.swift_versions = ['5.1', '5.2', '5.3', '5.4', '5.5'] + s.swift_versions = ['5.3', '5.4', '5.5', '5.6'] s.source_files = "Sources/ParseSwift/**/*.swift" s.license = { :type => "MIT", :text => <<-LICENSE - Copyright (c) 2021 parse-community + Copyright (c) 2022 parse-community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/carthage.sh b/Scripts/carthage.sh similarity index 100% rename from carthage.sh rename to Scripts/carthage.sh diff --git a/Sources/ParseSwift/Documentation.docc/Your First Object.tutorial b/Sources/ParseSwift/Documentation.docc/Your First Object.tutorial index 0d49c625c..3560bbe51 100644 --- a/Sources/ParseSwift/Documentation.docc/Your First Object.tutorial +++ b/Sources/ParseSwift/Documentation.docc/Your First Object.tutorial @@ -1,4 +1,4 @@ -@Tutorial(time: 15) { +@Tutorial(time: 1) { @Intro(title: "Your First Object") { } diff --git a/Sources/ParseSwift/Extensions/Data.swift b/Sources/ParseSwift/Extensions/Data.swift index 3a2a13703..9f7c9df0f 100644 --- a/Sources/ParseSwift/Extensions/Data.swift +++ b/Sources/ParseSwift/Extensions/Data.swift @@ -17,7 +17,6 @@ internal extension Data { func hexEncodedString(options: HexEncodingOptions = []) -> String { let hexDigits = options.contains(.upperCase) ? "0123456789ABCDEF" : "0123456789abcdef" - #if swift(>=5.3) if #available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) { let utf8Digits = Array(hexDigits.utf8) return String(unsafeUninitializedCapacity: 2 * count) { (ptr) -> Int in @@ -39,15 +38,5 @@ internal extension Data { } return String(utf16CodeUnits: chars, count: chars.count) } - #else - let utf16Digits = Array(hexDigits.utf16) - var chars: [unichar] = [] - chars.reserveCapacity(2 * count) - for byte in self { - chars.append(utf16Digits[Int(byte / 16)]) - chars.append(utf16Digits[Int(byte % 16)]) - } - return String(utf16CodeUnits: chars, count: chars.count) - #endif } } diff --git a/Sources/ParseSwift/Objects/ParseUser+async.swift b/Sources/ParseSwift/Objects/ParseUser+async.swift index 4360b51a1..affd9040f 100644 --- a/Sources/ParseSwift/Objects/ParseUser+async.swift +++ b/Sources/ParseSwift/Objects/ParseUser+async.swift @@ -143,16 +143,17 @@ public extension ParseUser { - parameter password: The password to be verified. - parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET** - otherwise. Defaults to **true**. + otherwise. Defaults to **false**. - parameter options: A set of header options sent to the server. Defaults to an empty set. - throws: An error of type `ParseError`. - note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer desires a different policy, it should be inserted in `options`. - - warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set - `usingPost = false`. + - warning: `usingPost == true` requires the + [issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on + the Parse Server, othewise you should set `usingPost = false`. */ static func verifyPassword(password: String, - usingPost: Bool = true, + usingPost: Bool = false, options: API.Options = []) async throws -> Self { try await withCheckedThrowingContinuation { continuation in Self.verifyPassword(password: password, diff --git a/Sources/ParseSwift/Objects/ParseUser+combine.swift b/Sources/ParseSwift/Objects/ParseUser+combine.swift index 278a9b984..7a6188649 100644 --- a/Sources/ParseSwift/Objects/ParseUser+combine.swift +++ b/Sources/ParseSwift/Objects/ParseUser+combine.swift @@ -134,16 +134,17 @@ public extension ParseUser { Publishes when complete. - parameter password: The password to be verified. - parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET** - otherwise. Defaults to **true**. + otherwise. Defaults to **false**. - parameter options: A set of header options sent to the server. Defaults to an empty set. - returns: A publisher that eventually produces a single value and then finishes or fails. - - warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set - `usingPost = false`. - note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer desires a different policy, it should be inserted in `options`. + - warning: `usingPost == true` requires the + [issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on + the Parse Server, othewise you should set `usingPost = false`. */ static func verifyPasswordPublisher(password: String, - usingPost: Bool = true, + usingPost: Bool = false, options: API.Options = []) -> Future { Future { promise in Self.verifyPassword(password: password, diff --git a/Sources/ParseSwift/Objects/ParseUser.swift b/Sources/ParseSwift/Objects/ParseUser.swift index be9c648cf..603fb521a 100644 --- a/Sources/ParseSwift/Objects/ParseUser.swift +++ b/Sources/ParseSwift/Objects/ParseUser.swift @@ -478,17 +478,18 @@ extension ParseUser { Verifies *asynchronously* whether the specified password associated with the user account is valid. - parameter password: The password to be verified. - parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET** - otherwise. Defaults to **true**. + otherwise. Defaults to **false**. - parameter options: A set of header options sent to the server. Defaults to an empty set. - parameter callbackQueue: The queue to return to after completion. Default value of .main. - parameter completion: A block that will be called when the verification request completes or fails. - note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer desires a different policy, it should be inserted in `options`. - - warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set - `usingPost = false`. + - warning: `usingPost == true` requires the + [issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on + the Parse Server, othewise you should set `usingPost = false`. */ public static func verifyPassword(password: String, - usingPost: Bool = true, + usingPost: Bool = false, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result) -> Void) { diff --git a/Sources/ParseSwift/ParseConstants.swift b/Sources/ParseSwift/ParseConstants.swift index 70e3b017d..567d2540b 100644 --- a/Sources/ParseSwift/ParseConstants.swift +++ b/Sources/ParseSwift/ParseConstants.swift @@ -10,7 +10,7 @@ import Foundation enum ParseConstants { static let sdk = "swift" - static let version = "4.3.1" + static let version = "4.4.0" static let fileManagementDirectory = "parse/" static let fileManagementPrivateDocumentsDirectory = "Private Documents/" static let fileManagementLibraryDirectory = "Library/"