Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ assignees: ''

### Environment:
- OS/Version: [e.g. iOS/13.3]
- Starscream Version [e.g. 4.0.4]
- Starscream Version [e.g. 5.0.0]
- Xcode version [e.g. 11.5]

### Additional context
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/general-question.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ assignees: ''

### Environment:
- OS/Version: [e.g. iOS/13.3]
- Starscream Version [e.g. 4.0.4]
- Starscream Version [e.g. 5.0.0]
- Xcode version [e.g. 11.5]
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches:
- master
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
swift-package:
name: Swift Package
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Toolchain versions
run: |
xcodebuild -version
swift --version
- name: Run Swift Package tests
run: swift test --parallel -Xswiftc -warnings-as-errors

ios:
name: iOS framework and tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build the iOS framework
run: |
xcodebuild build \
-project Starscream.xcodeproj \
-scheme Starscream \
-configuration Release \
-destination 'generic/platform=iOS' \
SWIFT_TREAT_WARNINGS_AS_ERRORS=YES \
CODE_SIGNING_ALLOWED=NO
- name: Select an available iPhone simulator
id: simulator
shell: bash
run: |
simulator_id=$(xcrun simctl list devices available | awk -F '[()]' '/iPhone/ { print $2; exit }')
if [[ -z "$simulator_id" ]]; then
echo "No available iPhone simulator was found" >&2
exit 1
fi
echo "id=$simulator_id" >> "$GITHUB_OUTPUT"
- name: Run iOS unit tests
run: |
xcodebuild test \
-project Starscream.xcodeproj \
-scheme Starscream \
-configuration Debug \
-destination 'platform=iOS Simulator,id=${{ steps.simulator.outputs.id }}' \
SWIFT_TREAT_WARNINGS_AS_ERRORS=YES \
CODE_SIGNING_ALLOWED=NO
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set Latest Tag
- name: Set release tag
id: vars
run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec fastlane test
env:
CI: true
- run: bundle exec fastlane release
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
`Starscream` adheres to [Semantic Versioning](http://semver.org/).

### 5.0.0

- Raise the minimum supported versions to iOS 15, macOS 10.15, tvOS 13, and watchOS 6.
- Build the library and tests in Swift 6 language mode with Complete strict-concurrency checking.
- Tighten RFC 6455 handshakes, masking, framing, fragmentation, control frames, UTF-8 validation, close handling, and implementation-specific resource limits.
- Validate permessage-deflate negotiation and bound decompressed output according to RFC 7692.
- Add certificate and public-key pinning policies, mutual TLS identities, and system proxy configuration with an iOS 15–16 HTTP CONNECT fallback.
- Replace the XCTest suite with Swift Testing and add lifecycle, reconnect, transport, security, server, and malformed-wire coverage.
- Add pull-request CI for Swift Package and iOS builds/tests.

This is a source-breaking release for custom `Engine`, `CompressionHandler`, `CertificatePinning`, and related protocol conformers. See the README migration section for the Swift 6 and `Sendable` requirements.

### [4.0.4](https://github.com/daltoniam/Starscream/tree/4.0.4)

Bug fixes for 4.0.3.
Expand Down
40 changes: 29 additions & 11 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version: 6.0

//
// Package.Swift
Expand All @@ -23,16 +23,34 @@
import PackageDescription

let package = Package(
name: "Starscream",
products: [
.library(name: "Starscream", targets: ["Starscream"])
],
dependencies: [],
targets: [
.target(name: "Starscream",
path: "Sources",
resources: [.copy("PrivacyInfo.xcprivacy")])
]
name: "Starscream",
platforms: [
.iOS(.v15),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6),
],
products: [
.library(name: "Starscream", targets: ["Starscream"]),
],
dependencies: [],
targets: [
.target(
name: "Starscream",
path: "Sources",
exclude: ["Info.plist"],
resources: [.copy("PrivacyInfo.xcprivacy")],
swiftSettings: [.enableUpcomingFeature("StrictConcurrency")]
),
.testTarget(
name: "StarscreamTests",
dependencies: ["Starscream"],
path: "Tests",
exclude: ["Info.plist"],
swiftSettings: [.enableUpcomingFeature("StrictConcurrency")]
),
],
swiftLanguageModes: [.v6]
)

#if os(Linux)
Expand Down
Loading