Skip to content

Commit

Permalink
bump swift requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jul 20, 2024
1 parent be99fa1 commit 7a8fcc8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ main ]

env:
CI_XCODE_OLDEST: '/Applications/Xcode_13.3.1.app/Contents/Developer'
CI_XCODE_OLDEST: '/Applications/Xcode_14.2.app/Contents/Developer'
CI_XCODE_14: '/Applications/Xcode_14.3.1.app/Contents/Developer'
CI_XCODE_LATEST: '/Applications/Xcode_15.4.app/Contents/Developer'

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.10.3...5.11.0), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/5.11.0/documentation/parseswift)

__New features__
* Allow hook triggers on ParseConfig and improve SDK ability to throw errors when the developer uses unsupported trigger combinations ([#179](https://github.com/netreconlab/Parse-Swift/pull/179)), thanks to [Corey Baker](https://github.com/cbaker6).
* Allow hook triggers on ParseConfig and improve SDK ability to throw errors when the developer uses unsupported trigger combinations. Also changes lowest requirements to be Swift 5.7 and Xcode 14.0 which aligns with other Swift Packages ([#179](https://github.com/netreconlab/Parse-Swift/pull/179)), thanks to [Corey Baker](https://github.com/cbaker6).

### 5.10.3
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.10.2...5.10.3), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/5.10.3/documentation/parseswift)
Expand Down
23 changes: 14 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
// swift-tools-version:5.5.2
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "ParseSwift",
platforms: [.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6)],
platforms: [
.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6)
],
products: [
.library(
name: "ParseSwift",
targets: ["ParseSwift"])
targets: ["ParseSwift"]
)
],
targets: [
.target(
name: "ParseSwift",
dependencies: []),
dependencies: []
),
.testTarget(
name: "ParseSwiftTests",
dependencies: ["ParseSwift"],
exclude: ["Info.plist"])
exclude: ["Info.plist"]
)
]
)
6 changes: 2 additions & 4 deletions Sources/ParseSwift/Protocols/ParseHookTriggerable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ public extension ParseHookTriggerable {
case .objectType(let parseObject):
switch trigger {
case .beforeLogin, .afterLogin, .afterLogout:
// BAKER: Handled this way to preserve Swift backwards compatability.
guard parseObject.className == BaseParseUser.className else {
guard parseObject is (any ParseUser.Type) else {
throw notSupportedError

Check warning on line 125 in Sources/ParseSwift/Protocols/ParseHookTriggerable.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseSwift/Protocols/ParseHookTriggerable.swift#L125

Added line #L125 was not covered by tests
}
case .beforeSave, .afterSave, .beforeDelete,
Expand All @@ -140,8 +139,7 @@ public extension ParseHookTriggerable {
case .object(let parseObject):
switch trigger {
case .beforeLogin, .afterLogin, .afterLogout:
// BAKER: Handled this way to preserve Swift backwards compatability.
guard parseObject.className == BaseParseUser.className else {
guard parseObject is (any ParseUser) else {
throw notSupportedError
}
case .beforeSave, .afterSave, .beforeDelete,
Expand Down

0 comments on commit 7a8fcc8

Please sign in to comment.