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
25 changes: 19 additions & 6 deletions AG/generate_swiftinterface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ filepath() {
}

SCRIPT_DIR="$(dirname "$(filepath "$0")")"
PACKAGE_DIR="$(dirname "${SCRIPT_DIR}")"
VERSION=${DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE:-2024}
FRAMEWORK_ROOT="${SCRIPT_DIR}/${VERSION}"
SHIMS_DIR="${SCRIPT_DIR}/DeviceSwiftShims"
Expand All @@ -26,16 +27,27 @@ if [ "${SWIFT_VERSION}" != "${EXPECTED_SWIFT_VERSION}" ]; then
exit 1
fi

# Build package dependencies via SPM
swift build --package-path "${PACKAGE_DIR}" --target _AttributeGraphDeviceSwiftShims 2>/dev/null
if [ $? -ne 0 ]; then
echo "Error: failed to build package dependencies"
exit 1
fi

# Locate the SPM modules directory for import search paths
BUILD_BIN_PATH=$(swift build --package-path "${PACKAGE_DIR}" --show-bin-path 2>/dev/null)
MODULES_DIR="${BUILD_BIN_PATH}/Modules"

TMPDIR_WORK=$(mktemp -d)
trap "rm -rf ${TMPDIR_WORK}" EXIT

GENERATED="${TMPDIR_WORK}/generated.swiftinterface"

# Resolve the iOS Simulator SDK version for the -target flag
IOS_SDK_VERSION=$(xcrun --sdk iphonesimulator --show-sdk-version)
# Use macOS SDK to match the host-built SPM modules
MACOS_SDK_VERSION=$(xcrun --sdk macosx --show-sdk-version)

# Compile DeviceSwiftShims against the simulator xcframework to emit a swiftinterface
xcrun --sdk iphonesimulator swiftc \
# Compile DeviceSwiftShims against the macOS xcframework to emit a swiftinterface
xcrun --sdk macosx swiftc \
-emit-module-interface-path "${GENERATED}" \
-emit-module-path "${TMPDIR_WORK}/module.swiftmodule" \
-module-name AttributeGraph \
Expand All @@ -44,8 +56,9 @@ xcrun --sdk iphonesimulator swiftc \
-Osize \
-enable-upcoming-feature InternalImportsByDefault \
-enable-experimental-feature Extern \
-target "arm64-apple-ios${IOS_SDK_VERSION}-simulator" \
-F "${FRAMEWORK_ROOT}/AttributeGraph.xcframework/ios-arm64-x86_64-simulator/" \
-target "arm64-apple-macos${MACOS_SDK_VERSION}" \
-F "${FRAMEWORK_ROOT}/AttributeGraph.xcframework/macos-arm64e-arm64-x86_64/" \
-I "${MODULES_DIR}" \
$(find "${SHIMS_DIR}" -name '*.swift') \
2>/dev/null

Expand Down
15 changes: 15 additions & 0 deletions Example/Tuist/Package.resolved

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

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public struct GestureTrait : Swift.Hashable, Swift.Identifiable, Swift.Sendable
get
}
}
extension Gestures.GestureTrait {
public var label: Swift.String {
get
}
}
public struct GestureTraitID : Swift.Hashable, Swift.Sendable {
public let rawValue: Swift.Int
public init(_ label: Swift.String)
Expand All @@ -79,6 +84,73 @@ public struct GestureTraitCollection : Swift.Hashable, Swift.Sendable {
get
}
}
public enum GestureRelationType : Swift.Hashable, Swift.Sendable {
case exclusion
case activeExclusion
case failureRequirement
public static func == (a: Gestures.GestureRelationType, b: Gestures.GestureRelationType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum GestureRelationRole : Swift.Hashable, Swift.Sendable {
case regular
case blocking
public static func == (a: Gestures.GestureRelationRole, b: Gestures.GestureRelationRole) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum GestureRelationDirection : Swift.Hashable, Swift.Sendable {
case outgoing
case incoming
public static func == (a: Gestures.GestureRelationDirection, b: Gestures.GestureRelationDirection) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public struct GestureRelation : Swift.Equatable, Swift.Sendable {
public var type: Gestures.GestureRelationType
public var direction: Gestures.GestureRelationDirection
public var role: Gestures.GestureRelationRole?
public var target: Gestures.GestureNodeMatcher
#if compiler(>=5.3) && $NonescapableTypes
public init(type: Gestures.GestureRelationType, direction: Gestures.GestureRelationDirection, role: Gestures.GestureRelationRole?, target: Gestures.GestureNodeMatcher)
#endif
public static func == (a: Gestures.GestureRelation, b: Gestures.GestureRelation) -> Swift.Bool
}
extension Swift.Array where Element == Gestures.GestureRelation {
public static var `default`: [Gestures.GestureRelation] {
get
}
}
public enum GestureNodeMatcher : Swift.Hashable, Swift.Sendable {
case id(Gestures.GestureNodeID)
case tag(Gestures.GestureTag)
case traits(Gestures.GestureTraitCollection, position: Gestures.GestureNodeMatcher.RelativePosition)
case any(position: Gestures.GestureNodeMatcher.RelativePosition)
public enum RelativePosition : Swift.Hashable, Swift.Sendable {
case any
case above
case below
public static func == (a: Gestures.GestureNodeMatcher.RelativePosition, b: Gestures.GestureNodeMatcher.RelativePosition) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public static func == (a: Gestures.GestureNodeMatcher, b: Gestures.GestureNodeMatcher) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
extension Gestures.GestureNodeMatcher : Swift.Comparable {
public static func < (lhs: Gestures.GestureNodeMatcher, rhs: Gestures.GestureNodeMatcher) -> Swift.Bool
}
@frozen public struct GestureTag : Swift.Hashable, Swift.Sendable, Swift.ExpressibleByStringLiteral, Swift.CustomStringConvertible {
public let rawValue: Swift.String
public init(rawValue: Swift.String)
Expand All @@ -95,17 +167,17 @@ public struct GestureTraitCollection : Swift.Hashable, Swift.Sendable {
get
}
}
extension GFGesturePhase : Swift.CustomStringConvertible {
extension Gestures.GFGesturePhase : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GFGestureRelationType : Swift.CustomStringConvertible {
extension Gestures.GFGestureRelationType : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GFGestureRelationRole : Swift.CustomStringConvertible {
extension Gestures.GFGestureRelationRole : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
Expand All @@ -132,9 +204,15 @@ public struct GestureNodeOptions : Swift.OptionSet, Swift.Sendable {
public typealias Element = Gestures.GestureNodeOptions
public typealias RawValue = Swift.Int
}
extension GestureNodeOptions : Swift.CustomStringConvertible {
extension Gestures.GestureNodeOptions : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GestureNodeID : Swift.BitwiseCopyable {}
extension Gestures.GestureTrait : Swift.CustomStringConvertible {}
extension Gestures.GestureTrait : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureTraitCollection : Swift.CustomStringConvertible {}
extension Gestures.GestureTraitCollection : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureNodeMatcher : Swift.CustomStringConvertible {}
extension Gestures.GestureNodeMatcher : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureNodeID : Swift.BitwiseCopyable {}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public struct GestureTrait : Swift.Hashable, Swift.Identifiable, Swift.Sendable
get
}
}
extension Gestures.GestureTrait {
public var label: Swift.String {
get
}
}
public struct GestureTraitID : Swift.Hashable, Swift.Sendable {
public let rawValue: Swift.Int
public init(_ label: Swift.String)
Expand All @@ -79,6 +84,73 @@ public struct GestureTraitCollection : Swift.Hashable, Swift.Sendable {
get
}
}
public enum GestureRelationType : Swift.Hashable, Swift.Sendable {
case exclusion
case activeExclusion
case failureRequirement
public static func == (a: Gestures.GestureRelationType, b: Gestures.GestureRelationType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum GestureRelationRole : Swift.Hashable, Swift.Sendable {
case regular
case blocking
public static func == (a: Gestures.GestureRelationRole, b: Gestures.GestureRelationRole) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public enum GestureRelationDirection : Swift.Hashable, Swift.Sendable {
case outgoing
case incoming
public static func == (a: Gestures.GestureRelationDirection, b: Gestures.GestureRelationDirection) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public struct GestureRelation : Swift.Equatable, Swift.Sendable {
public var type: Gestures.GestureRelationType
public var direction: Gestures.GestureRelationDirection
public var role: Gestures.GestureRelationRole?
public var target: Gestures.GestureNodeMatcher
#if compiler(>=5.3) && $NonescapableTypes
public init(type: Gestures.GestureRelationType, direction: Gestures.GestureRelationDirection, role: Gestures.GestureRelationRole?, target: Gestures.GestureNodeMatcher)
#endif
public static func == (a: Gestures.GestureRelation, b: Gestures.GestureRelation) -> Swift.Bool
}
extension Swift.Array where Element == Gestures.GestureRelation {
public static var `default`: [Gestures.GestureRelation] {
get
}
}
public enum GestureNodeMatcher : Swift.Hashable, Swift.Sendable {
case id(Gestures.GestureNodeID)
case tag(Gestures.GestureTag)
case traits(Gestures.GestureTraitCollection, position: Gestures.GestureNodeMatcher.RelativePosition)
case any(position: Gestures.GestureNodeMatcher.RelativePosition)
public enum RelativePosition : Swift.Hashable, Swift.Sendable {
case any
case above
case below
public static func == (a: Gestures.GestureNodeMatcher.RelativePosition, b: Gestures.GestureNodeMatcher.RelativePosition) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
public static func == (a: Gestures.GestureNodeMatcher, b: Gestures.GestureNodeMatcher) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
extension Gestures.GestureNodeMatcher : Swift.Comparable {
public static func < (lhs: Gestures.GestureNodeMatcher, rhs: Gestures.GestureNodeMatcher) -> Swift.Bool
}
@frozen public struct GestureTag : Swift.Hashable, Swift.Sendable, Swift.ExpressibleByStringLiteral, Swift.CustomStringConvertible {
public let rawValue: Swift.String
public init(rawValue: Swift.String)
Expand All @@ -95,17 +167,17 @@ public struct GestureTraitCollection : Swift.Hashable, Swift.Sendable {
get
}
}
extension GFGesturePhase : Swift.CustomStringConvertible {
extension Gestures.GFGesturePhase : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GFGestureRelationType : Swift.CustomStringConvertible {
extension Gestures.GFGestureRelationType : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GFGestureRelationRole : Swift.CustomStringConvertible {
extension Gestures.GFGestureRelationRole : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
Expand All @@ -132,9 +204,15 @@ public struct GestureNodeOptions : Swift.OptionSet, Swift.Sendable {
public typealias Element = Gestures.GestureNodeOptions
public typealias RawValue = Swift.Int
}
extension GestureNodeOptions : Swift.CustomStringConvertible {
extension Gestures.GestureNodeOptions : Swift.CustomStringConvertible {
public var description: Swift.String {
get
}
}
extension GestureNodeID : Swift.BitwiseCopyable {}
extension Gestures.GestureTrait : Swift.CustomStringConvertible {}
extension Gestures.GestureTrait : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureTraitCollection : Swift.CustomStringConvertible {}
extension Gestures.GestureTraitCollection : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureNodeMatcher : Swift.CustomStringConvertible {}
extension Gestures.GestureNodeMatcher : Swift.CustomDebugStringConvertible {}
extension Gestures.GestureNodeID : Swift.BitwiseCopyable {}
Loading
Loading