Skip to content
Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-15
- os: macos-26
xcode-version: "26.3" # Swift 6.2
runs-on: ${{ matrix.os }}
env:
Expand All @@ -39,8 +39,7 @@ jobs:
- name: Run tests against Gestures.framework on macOS via Xcode
run: |
xcodebuild test \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenGestures-Package \
-scheme OpenGestures \
-sdk macosx \
-destination "platform=macOS" \
-skipPackagePluginValidation \
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,35 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15]
os: [macos-26]
xcode-version: ["26.3"] # Swift 6.2
ios-version: ["26.2"]
include:
- ios-version: "26.2"
ios-simulator-name: "iPhone 16 Pro"
ios-simulator-name: "iPhone 17 Pro"
runs-on: ${{ matrix.os }}
env:
OPENGESTURES_WERROR: 1
OPENGESTURES_USE_LOCAL_DEPS: 1
OPENGESTURES_TARGET_RELEASE: 2025
DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE: 2025
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Build in debug mode on iOS
run: |
xcodebuild build \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenGestures-Package \
-scheme OpenGestures \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-derivedDataPath .build-debug \
-skipMacroValidation \
-skipPackagePluginValidation \
OTHER_SWIFT_FLAGS="-warnings-as-errors"
-skipPackagePluginValidation
- name: Build and run tests in debug mode with coverage on iOS Simulator
run: |
xcodebuild test \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenGestures-Package \
-scheme OpenGestures \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-enableCodeCoverage=YES \
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-15]
os: [macos-26]
xcode-version: ["26.3"] # Swift 6.2
runs-on: ${{ matrix.os }}
env:
OPENGESTURES_WERROR: 1
OPENGESTURES_USE_LOCAL_DEPS: 1
OPENGESTURES_TARGET_RELEASE: 2025
DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE: 2025
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Build and run tests in debug mode with coverage
run: |
swift test \
Expand Down
15 changes: 15 additions & 0 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,18 @@ let compatibilityTestCondition = envBoolValue("COMPATIBILITY_TEST", default: fal
let gesturesCondition = envBoolValue("OPENGESTURESSHIMS_GESTURES", default: false)
let useLocalDeps = envBoolValue("USE_LOCAL_DEPS")

let swiftCorelibsPath = envStringValue("LIB_SWIFT_PATH") ?? "\(Context.packageDirectory)/Sources/SwiftCorelibs/include"

// MARK: - Shared Settings

var sharedCSettings: [CSetting] = []
sharedCSettings.append(
.unsafeFlags(
["-isystem", swiftCorelibsPath],
.when(platforms: .nonDarwinPlatforms)
)
)

var sharedSwiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("InternalImportsByDefault"),
.enableExperimentalFeature("Extern"),
Expand Down Expand Up @@ -186,13 +196,15 @@ extension Target {
// MARK: - Targets

let cOpenGesturesTarget = Target.target(
name: "COpenGestures"
name: "COpenGestures",
cSettings: sharedCSettings
)

let openGesturesTarget = Target.target(
name: "OpenGestures",
dependencies: [
.target(name: cOpenGesturesTarget.name),
.product(name: "OpenCoreGraphicsShims", package: "OpenCoreGraphics"),
],
swiftSettings: sharedSwiftSettings
)
Expand Down Expand Up @@ -222,6 +234,9 @@ let package = Package(
products: [
.library(name: "OpenGesturesShims", targets: [openGesturesShimsTarget.name]),
],
dependencies: [
.package(url: "https://github.com/OpenSwiftUIProject/OpenCoreGraphics.git", branch: "main"),
],
targets: [
cOpenGesturesTarget,
openGesturesTarget,
Expand Down
7 changes: 5 additions & 2 deletions Scripts/CI/gf_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ clone_checkout_gf() {
}

update_gf() {
cd $REPO_ROOT/../DarwinPrivateFrameworks
swift package update-xcframeworks --allow-writing-to-package-directory
cd $REPO_ROOT/../DarwinPrivateFrameworks/GF
# GF/update.sh uses DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE to pick the
# version directory (GF/2025/). The CI workflow may set a different value
# for DPF's Package.swift evaluation, so we pin 2025 here explicitly.
DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE=2025 bash update.sh
}

clone_checkout_gf
Expand Down
5 changes: 5 additions & 0 deletions Sources/COpenGestures/include/OpenGestures/OGFBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@
#define OGF_OBJC_FOUNDATION 0
#endif /* OGF_TARGET_OS_DARWIN && __OBJC__ */

#if !OGF_TARGET_OS_DARWIN
typedef long NSInteger;
typedef unsigned long NSUInteger;
#endif

#endif /* OGFBase_h */
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ open class AnyGestureComponentController: @unchecked Sendable {
// MARK: - GestureComponentController

/// Concrete controller wrapping a specific GestureComponent.
public final class GestureComponentController<C: GestureComponent>: AnyGestureComponentController {
public final class GestureComponentController<C: GestureComponent>: AnyGestureComponentController, @unchecked Sendable {

public var component: C
private let timeSource: any TimeSource
Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenGestures/Component/PanComponent.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public import CoreGraphics
public import OpenCoreGraphicsShims

// MARK: - PanComponent

Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenGestures/Event/Event.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public import CoreGraphics
public import OpenCoreGraphicsShims

// MARK: - Event

Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenGestures/Event/MouseEvent.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public import CoreGraphics
public import OpenCoreGraphicsShims

// MARK: - MouseEvent

Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenGestures/Event/TouchEvent.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public import CoreGraphics
public import OpenCoreGraphicsShims

// MARK: - TouchEvent

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class GestureNodeCoordinator: @unchecked Sendable {

deinit {
// Clear coordinator back-refs on all managed nodes
for node in _nodeRefs {
for _ in _nodeRefs {
// node's coordinator back-ref would be cleared here
}
}
Expand Down
5 changes: 4 additions & 1 deletion Sources/OpenGestures/Update/RunLoopUpdateDriver.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
public import Foundation
#if canImport(Darwin)
import Foundation

// MARK: - RunLoopUpdateDriver

Expand Down Expand Up @@ -53,3 +54,5 @@ public final class RunLoopUpdateDriver: GestureUpdateDriver, @unchecked Sendable
}
}
}

#endif
Loading
Loading