Skip to content

Commit c57fc2e

Browse files
authored
refactor: drop support for Swift 5.2 (#356)
* refactor: drop support for Swift 5.2 * remove Xcode 11 from CI * build ealiest supported in CI * fix name * set verifyPassword usingPost default to false * update ci * move carthage script to scripts folder * Bump version
1 parent 2cb662a commit c57fc2e

File tree

12 files changed

+32
-34
lines changed

12 files changed

+32
-34
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: '*'
77
env:
8-
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
8+
CI_XCODE_VER: '/Applications/Xcode_12.5.1.app/Contents/Developer'
99
CI_XCODE_13: '/Applications/Xcode_13.3.app/Contents/Developer'
1010

1111
jobs:
@@ -165,11 +165,11 @@ jobs:
165165
uses: codecov/codecov-action@v2
166166
with:
167167
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
168-
env_vars: IOS5_2
168+
env_vars: IOS_Earliest
169169
fail_ci_if_error: true
170170
env:
171171
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
172-
172+
173173
linux:
174174
runs-on: ubuntu-18.04
175175
steps:
@@ -239,6 +239,6 @@ jobs:
239239
- name: Use multiple cores
240240
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
241241
- name: Carthage
242-
run: ./carthage.sh build --no-skip-current --use-xcframeworks
242+
run: ./Scripts/carthage.sh build --no-skip-current --use-xcframeworks
243243
env:
244244
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
release:
44
types: [published]
55
env:
6-
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
76
CI_XCODE_13: '/Applications/Xcode_13.3.app/Contents/Developer'
87

98
jobs:

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ excluded: # paths to ignore during linting. Takes precedence over `included`.
99
- Tests/ParseSwiftTests/ParseEncoderTests
1010
- DerivedData
1111
- .build
12+
- .dependencies

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
### main
44

5-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.1...main)
5+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.4.0...main)
66
* _Contributing to this repo? Add info about your change here to be included in the next release_
77

8+
### 4.4.0
9+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.1...4.4.0)
10+
11+
__Improvements__
12+
- 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).
13+
814
### 4.3.1
915
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.3.0...4.3.1)
1016

@@ -15,7 +21,7 @@ __Fixes__
1521
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.2.0...4.3.0)
1622

1723
__Improvements__
18-
- 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).
24+
- 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).
1925

2026
### 4.2.0
2127
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.1.0...4.2.0)

ParseSwift.podtemplate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Pod::Spec.new do |s|
1414
s.osx.deployment_target = "10.15"
1515
s.tvos.deployment_target = "13.0"
1616
s.watchos.deployment_target = "6.0"
17-
s.swift_versions = ['5.1', '5.2', '5.3', '5.4', '5.5']
17+
s.swift_versions = ['5.3', '5.4', '5.5', '5.6']
1818
s.source_files = "Sources/ParseSwift/**/*.swift"
1919
s.license = {
2020
:type => "MIT",
2121
:text => <<-LICENSE
22-
Copyright (c) 2021 parse-community
22+
Copyright (c) 2022 parse-community
2323
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:
2424
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2525
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.
File renamed without changes.

Sources/ParseSwift/Documentation.docc/Your First Object.tutorial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Tutorial(time: 15) {
1+
@Tutorial(time: 1) {
22
@Intro(title: "Your First Object") {
33

44
}

Sources/ParseSwift/Extensions/Data.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal extension Data {
1717

1818
func hexEncodedString(options: HexEncodingOptions = []) -> String {
1919
let hexDigits = options.contains(.upperCase) ? "0123456789ABCDEF" : "0123456789abcdef"
20-
#if swift(>=5.3)
2120
if #available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
2221
let utf8Digits = Array(hexDigits.utf8)
2322
return String(unsafeUninitializedCapacity: 2 * count) { (ptr) -> Int in
@@ -39,15 +38,5 @@ internal extension Data {
3938
}
4039
return String(utf16CodeUnits: chars, count: chars.count)
4140
}
42-
#else
43-
let utf16Digits = Array(hexDigits.utf16)
44-
var chars: [unichar] = []
45-
chars.reserveCapacity(2 * count)
46-
for byte in self {
47-
chars.append(utf16Digits[Int(byte / 16)])
48-
chars.append(utf16Digits[Int(byte % 16)])
49-
}
50-
return String(utf16CodeUnits: chars, count: chars.count)
51-
#endif
5241
}
5342
}

Sources/ParseSwift/Objects/ParseUser+async.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,17 @@ public extension ParseUser {
143143

144144
- parameter password: The password to be verified.
145145
- parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET**
146-
otherwise. Defaults to **true**.
146+
otherwise. Defaults to **false**.
147147
- parameter options: A set of header options sent to the server. Defaults to an empty set.
148148
- throws: An error of type `ParseError`.
149149
- note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer
150150
desires a different policy, it should be inserted in `options`.
151-
- warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set
152-
`usingPost = false`.
151+
- warning: `usingPost == true` requires the
152+
[issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on
153+
the Parse Server, othewise you should set `usingPost = false`.
153154
*/
154155
static func verifyPassword(password: String,
155-
usingPost: Bool = true,
156+
usingPost: Bool = false,
156157
options: API.Options = []) async throws -> Self {
157158
try await withCheckedThrowingContinuation { continuation in
158159
Self.verifyPassword(password: password,

Sources/ParseSwift/Objects/ParseUser+combine.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,17 @@ public extension ParseUser {
134134
Publishes when complete.
135135
- parameter password: The password to be verified.
136136
- parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET**
137-
otherwise. Defaults to **true**.
137+
otherwise. Defaults to **false**.
138138
- parameter options: A set of header options sent to the server. Defaults to an empty set.
139139
- returns: A publisher that eventually produces a single value and then finishes or fails.
140-
- warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set
141-
`usingPost = false`.
142140
- note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer
143141
desires a different policy, it should be inserted in `options`.
142+
- warning: `usingPost == true` requires the
143+
[issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on
144+
the Parse Server, othewise you should set `usingPost = false`.
144145
*/
145146
static func verifyPasswordPublisher(password: String,
146-
usingPost: Bool = true,
147+
usingPost: Bool = false,
147148
options: API.Options = []) -> Future<Self, ParseError> {
148149
Future { promise in
149150
Self.verifyPassword(password: password,

Sources/ParseSwift/Objects/ParseUser.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,17 +478,18 @@ extension ParseUser {
478478
Verifies *asynchronously* whether the specified password associated with the user account is valid.
479479
- parameter password: The password to be verified.
480480
- parameter usingPost: Set to **true** to use **POST** for sending. Will use **GET**
481-
otherwise. Defaults to **true**.
481+
otherwise. Defaults to **false**.
482482
- parameter options: A set of header options sent to the server. Defaults to an empty set.
483483
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
484484
- parameter completion: A block that will be called when the verification request completes or fails.
485485
- note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer
486486
desires a different policy, it should be inserted in `options`.
487-
- warning: `usingPost == true` requires Parse Server > 5.0.0. Othewise you should set
488-
`usingPost = false`.
487+
- warning: `usingPost == true` requires the
488+
[issue](https://github.com/parse-community/parse-server/issues/7784) to be addressed on
489+
the Parse Server, othewise you should set `usingPost = false`.
489490
*/
490491
public static func verifyPassword(password: String,
491-
usingPost: Bool = true,
492+
usingPost: Bool = false,
492493
options: API.Options = [],
493494
callbackQueue: DispatchQueue = .main,
494495
completion: @escaping (Result<Self, ParseError>) -> Void) {

Sources/ParseSwift/ParseConstants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
enum ParseConstants {
1212
static let sdk = "swift"
13-
static let version = "4.3.1"
13+
static let version = "4.4.0"
1414
static let fileManagementDirectory = "parse/"
1515
static let fileManagementPrivateDocumentsDirectory = "Private Documents/"
1616
static let fileManagementLibraryDirectory = "Library/"

0 commit comments

Comments
 (0)