Skip to content

Commit

Permalink
Merge pull request #9 from Recouse/visionos-fix
Browse files Browse the repository at this point in the history
visionOS builds fix
  • Loading branch information
Recouse authored Jan 30, 2024
2 parents 122e8fb + e16171d commit e0654f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-async-algorithms.git",
"state" : {
"revision" : "9cfed92b026c524674ed869a4ff2dcfdeedf8a2a",
"version" : "0.1.0"
"revision" : "da4e36f86544cdf733a40d59b3a2267e3a7bbf36",
"version" : "1.0.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
targets: ["EventSource"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "0.1.0")
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0")
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
targets: ["EventSource"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "0.1.0")
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0")
],
targets: [
.target(
Expand Down
3 changes: 2 additions & 1 deletion Sources/EventSource/MeesageParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class MessageParser {
public func parsed(from data: Data) -> [ServerMessage] {
// Split message with double newline
let rawMessages: [Data]
if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) {
if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, visionOS 1.0, *) {
rawMessages = data.split(separator: [Self.lf, Self.lf])
} else {
rawMessages = data.split(by: [Self.lf, Self.lf])
Expand All @@ -48,6 +48,7 @@ fileprivate extension Data {
@available(iOS, deprecated: 16.0, obsoleted: 16.0, message: "This method is not recommended on iOS 16.0+")
@available(watchOS, deprecated: 9.0, obsoleted: 9.0, message: "This method is not recommended on watchOS 9.0+")
@available(tvOS, deprecated: 16.0, obsoleted: 16.0, message: "This method is not recommended on tvOS 16.0+")
@available(visionOS, deprecated: 1.0, obsoleted: 1.1, message: "This method is not recommended on visionOS 1.0+")
func split(by separator: [UInt8]) -> [Data] {
let doubleNewline = Data(separator)
var splits: [Data] = []
Expand Down

0 comments on commit e0654f8

Please sign in to comment.