diff --git a/.gitignore b/.gitignore index 097c03715..49855e34f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,11 @@ Example/ReferenceImages/**/*.png .docs gh-pages .swift_pd_guess -/.augments \ No newline at end of file +/.augments + +# Tuist +Derived/ +Tuist/.build/ +*.xcodeproj +*.xcworkspace +*.xcframework \ No newline at end of file diff --git a/Project.swift b/Project.swift new file mode 100644 index 000000000..cf0568582 --- /dev/null +++ b/Project.swift @@ -0,0 +1,272 @@ +import ProjectDescription + +// MARK: - Constants + +let releaseVersion = 2024 +let destinations: Destinations = [.iPhone, .iPad, .mac, .macCatalyst, .appleTv, .appleWatch, .appleVision] + +// MARK: - Shared Settings + +let releaseYearDefines: [String] = { + var defines: [String] = ["OPENSWIFTUI_RELEASE_\(releaseVersion)"] + if releaseVersion >= 2021 { + for year in 2021...releaseVersion { + defines.append("OPENSWIFTUI_SUPPORT_\(year)_API") + } + } + return defines +}() + +let availabilityMacroFlags: [String] = { + let minimumPlatforms = ["iOS 13.0", "macOS 10.15", "tvOS 13.0", "watchOS 6.0", "visionOS 1.0"] + let distantPlatforms = ["iOS 99.0", "macOS 99.0", "tvOS 99.0", "watchOS 99.0", "visionOS 99.0"] + let macros: [(String, [String])] = [ + ("OpenSwiftUI_v1_0", minimumPlatforms), + ("OpenSwiftUI_v1_4", minimumPlatforms), + ("OpenSwiftUI_v2_0", minimumPlatforms), + ("OpenSwiftUI_macOS_v2_0", minimumPlatforms), + ("OpenSwiftUI_v2_1", minimumPlatforms), + ("OpenSwiftUI_v2_3", minimumPlatforms), + ("OpenSwiftUI_v3_0", minimumPlatforms), + ("OpenSwiftUI_v3_2", minimumPlatforms), + ("OpenSwiftUI_v3_4", minimumPlatforms), + ("OpenSwiftUI_v4_0", minimumPlatforms), + ("OpenSwiftUI_v4_1", minimumPlatforms), + ("OpenSwiftUI_v4_4", minimumPlatforms), + ("OpenSwiftUI_v5_0", minimumPlatforms), + ("OpenSwiftUI_v5_1", minimumPlatforms), + ("OpenSwiftUI_v5_2", minimumPlatforms), + ("OpenSwiftUI_v5_4", minimumPlatforms), + ("OpenSwiftUI_v5_5", minimumPlatforms), + ("OpenSwiftUI_v6_0", minimumPlatforms), + ("OpenSwiftUI_v7_0", minimumPlatforms), + ("_distantFuture", distantPlatforms), + ] + return macros.flatMap { name, platforms in + platforms.flatMap { platform in + ["-Xfrontend", "-enable-experimental-feature", "-Xfrontend", "AvailabilityMacro=\(name):\(platform)"] + } + } +}() + +let sharedSwiftFlags: [String] = { + var flags: [String] = [ + "-package-name", "OpenSwiftUI", + "-enable-library-evolution", + "-no-verify-emitted-module-interface", + "-Xfrontend", "-experimental-spi-only-imports", + "-Xfrontend", "-enable-private-imports", + "-unavailable-decl-optimization=stub", + "-Xfrontend", "-enable-upcoming-feature", "-Xfrontend", "BareSlashRegexLiterals", + "-Xfrontend", "-enable-upcoming-feature", "-Xfrontend", "InternalImportsByDefault", + "-Xfrontend", "-enable-upcoming-feature", "-Xfrontend", "InferSendableFromCaptures", + "-Xfrontend", "-enable-experimental-feature", "-Xfrontend", "Extern", + ] + return flags +}() + +let swiftActiveCompilationConditions: [String] = { + var conditions = [ + "OPENSWIFTUI", + "OPENSWIFTUI_CF_CGTYPES", + "OPENRENDERBOX_CF_CGTYPES", + "OPENSWIFTUI_LINK_COREUI", + "_OPENSWIFTUI_SWIFTUI_RENDER", + "OPENSWIFTUI_ENABLE_PRIVATE_IMPORTS", + ] + conditions += releaseYearDefines + return conditions +}() + +let sharedCDefines: [String] = [ + "OPENSWIFTUI=1", + "NDEBUG=1", + "OPENSWIFTUI_CF_CGTYPES=1", + "OPENRENDERBOX_CF_CGTYPES=1", + "OPENSWIFTUI_LINK_COREUI=1", + "OPENSWIFTUI_LINK_BACKLIGHTSERVICES=0", + "_OPENSWIFTUI_SWIFTUI_RENDER=1", + "OPENSWIFTUI_INTERNAL_XR_SDK=0", +] + +let renderBoxSwiftConditions = swiftActiveCompilationConditions + ["OPENSWIFTUI_RENDERBOX"] +let renderBoxCDefines = sharedCDefines + ["OPENSWIFTUI_RENDERBOX=1"] + +let darwinPrivateFrameworksPath = "Tuist/.build/checkouts/DarwinPrivateFrameworks" + +func sharedSettings() -> SettingsDictionary { + [ + "SWIFT_VERSION": "5", + "OTHER_SWIFT_FLAGS": .array(sharedSwiftFlags + ["$(inherited)"]), + "SWIFT_ACTIVE_COMPILATION_CONDITIONS": .array(swiftActiveCompilationConditions + ["$(inherited)"]), + "GCC_PREPROCESSOR_DEFINITIONS": .array(sharedCDefines + ["$(inherited)"]), + "CLANG_ENABLE_MODULES": "YES", + "OTHER_CFLAGS": .array(["-Wno-error=return-type", "$(inherited)"]), + "OTHER_CPLUSPLUSFLAGS": .array(["-fcxx-modules", "$(inherited)"]), + "IPHONEOS_DEPLOYMENT_TARGET": "18.0", + "MACOSX_DEPLOYMENT_TARGET": "15.0", + "TVOS_DEPLOYMENT_TARGET": "18.0", + "WATCHOS_DEPLOYMENT_TARGET": "10.0", + "XROS_DEPLOYMENT_TARGET": "2.0", + ] +} + +// MARK: - Project + +let project = Project( + name: "OpenSwiftUI", + settings: .settings( + base: sharedSettings(), + configurations: [ + .debug(name: "Debug", xcconfig: "availability-macros.xcconfig"), + .release(name: "Release", xcconfig: "availability-macros.xcconfig"), + ] + ), + targets: [ + // OpenSwiftUIMacros - macro target (macOS only) + .target( + name: "OpenSwiftUIMacros", + destinations: [.mac], + product: .macro, + bundleId: "org.openswiftui.OpenSwiftUIMacros", + sources: "Sources/OpenSwiftUIMacros/**", + dependencies: [ + .external(name: "SwiftSyntaxMacros"), + .external(name: "SwiftCompilerPlugin"), + ], + settings: .settings(base: [ + "SWIFT_VERSION": "5", + "OTHER_SWIFT_FLAGS": .array(sharedSwiftFlags + ["-package-name", "OpenSwiftUI", "$(inherited)"]), + ]) + ), + + // OpenSwiftUI_SPI - static framework + .target( + name: "OpenSwiftUI_SPI", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.OpenSwiftUI-SPI", + sources: "Sources/OpenSwiftUI_SPI/**", + headers: .headers(public: "Sources/OpenSwiftUI_SPI/**/*.h"), + dependencies: [ + .external(name: "CoreUI"), + .external(name: "OpenRenderBox"), + ], + settings: .settings(base: sharedSettings().merging([ + "OTHER_LDFLAGS": .array(["-lMobileGestalt", "$(inherited)"]), + "MODULEMAP_FILE": "$(SRCROOT)/Sources/OpenSwiftUI_SPI/module.modulemap", + "HEADER_SEARCH_PATHS": .array([ + "$(SRCROOT)/Sources/OpenSwiftUI_SPI", + "$(SRCROOT)/Tuist/.build/checkouts/OpenRenderBox/Sources/OpenRenderBoxCxx/include", + "$(inherited)", + ]), + ]) { _, new in new }) + ), + + // COpenSwiftUI - static framework + .target( + name: "COpenSwiftUI", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.COpenSwiftUI", + sources: "Sources/COpenSwiftUI/**", + headers: .headers(public: "Sources/COpenSwiftUI/**/*.h"), + dependencies: [], + settings: .settings(base: sharedSettings().merging([ + "HEADER_SEARCH_PATHS": .array(["$(SRCROOT)/Sources/OpenSwiftUI_SPI", "$(SRCROOT)/Sources/COpenSwiftUI", "$(inherited)"]), + "MODULEMAP_FILE": "$(SRCROOT)/Sources/COpenSwiftUI/module.modulemap", + ]) { _, new in new }) + ), + + // OpenSwiftUICore - static framework + .target( + name: "OpenSwiftUICore", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.OpenSwiftUICore", + sources: "Sources/OpenSwiftUICore/**", + dependencies: [ + .target(name: "OpenSwiftUI_SPI"), + .target(name: "OpenSwiftUIMacros"), + .external(name: "OpenCoreGraphicsShims"), + .external(name: "OpenQuartzCoreShims"), + .external(name: "OpenAttributeGraphShims"), + .external(name: "OpenRenderBoxShims"), + .external(name: "OpenObservation"), + ], + settings: .settings(base: sharedSettings().merging([ + "SWIFT_ACTIVE_COMPILATION_CONDITIONS": .array(renderBoxSwiftConditions + ["$(inherited)"]), + "GCC_PREPROCESSOR_DEFINITIONS": .array(renderBoxCDefines + ["$(inherited)"]), + ]) { _, new in new }) + ), + + // OpenSwiftUI - dynamic framework (the XCFramework product) + .target( + name: "OpenSwiftUI", + destinations: destinations, + product: .framework, + bundleId: "org.openswiftui.OpenSwiftUI", + sources: "Sources/OpenSwiftUI/**", + dependencies: [ + .target(name: "OpenSwiftUICore"), + .target(name: "COpenSwiftUI"), + .target(name: "OpenSwiftUISymbolDualTestsSupport"), + .external(name: "OpenCoreGraphicsShims"), + .external(name: "OpenQuartzCoreShims"), + .external(name: "OpenAttributeGraphShims"), + .external(name: "OpenRenderBoxShims"), + ], + settings: .settings(base: sharedSettings().merging([ + "OTHER_LDFLAGS": .array(["-framework", "CoreServices", "-lMobileGestalt", "$(inherited)"]), + "SWIFT_ACTIVE_COMPILATION_CONDITIONS": .array(renderBoxSwiftConditions + ["$(inherited)"]), + "GCC_PREPROCESSOR_DEFINITIONS": .array(renderBoxCDefines + ["$(inherited)"]), + "BUILD_LIBRARY_FOR_DISTRIBUTION": "YES", + ]) { _, new in new }) + ), + + // OpenSwiftUIExtension - static framework + .target( + name: "OpenSwiftUIExtension", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.OpenSwiftUIExtension", + sources: "Sources/OpenSwiftUIExtension/**", + dependencies: [ + .target(name: "OpenSwiftUI"), + ], + settings: .settings(base: sharedSettings()) + ), + + // OpenSwiftUIBridge - static framework + .target( + name: "OpenSwiftUIBridge", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.OpenSwiftUIBridge", + sources: [ + "Sources/OpenSwiftUIBridge/Bridgeable.swift", + "Sources/OpenSwiftUIBridge/SwiftUI/**", + ], + dependencies: [ + .target(name: "OpenSwiftUI"), + ], + settings: .settings(base: sharedSettings()) + ), + + // OpenSwiftUISymbolDualTestsSupport - static framework + .target( + name: "OpenSwiftUISymbolDualTestsSupport", + destinations: destinations, + product: .staticFramework, + bundleId: "org.openswiftui.OpenSwiftUISymbolDualTestsSupport", + sources: "Sources/OpenSwiftUISymbolDualTestsSupport/**", + dependencies: [ + .external(name: "SymbolLocator"), + ], + settings: .settings(base: sharedSettings().merging([ + "HEADER_SEARCH_PATHS": .array(["$(SRCROOT)/Sources/OpenSwiftUI_SPI", "$(inherited)"]), + "MODULEMAP_FILE": "$(SRCROOT)/Sources/OpenSwiftUISymbolDualTestsSupport/module.modulemap", + ]) { _, new in new }) + ), + ] +) diff --git a/Sources/COpenSwiftUI/module.modulemap b/Sources/COpenSwiftUI/module.modulemap new file mode 100644 index 000000000..077b8f255 --- /dev/null +++ b/Sources/COpenSwiftUI/module.modulemap @@ -0,0 +1,4 @@ +module COpenSwiftUI { + umbrella "." + export * +} diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift index 74c45b262..a5a37db25 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift @@ -8,7 +8,9 @@ public import UIKit open class UIHostingController: UIViewController where Content : View { var host: _UIHostingView + #if OPENSWIFTUI_LINK_BACKLIGHTSERVICES var alwaysOnBridge: AlwaysOnBridge? + #endif override open dynamic var keyCommands: [UIKeyCommand]? { // TODO diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift index cf98671db..823a95eab 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift @@ -284,9 +284,11 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con if shouldDisableUIKitAnimations, Semantics.TraitCollectionAnimations.isEnabled, var transaction = Transaction.currentUIViewTransaction(canDisableAnimations: true) { + #if OPENSWIFTUI_LINK_BACKLIGHTSERVICES if let viewController, let alwaysOnBridge = viewController.alwaysOnBridge { alwaysOnBridge.configureTransaction(&transaction) } + #endif viewGraph.emptyTransaction(transaction) } } @@ -567,7 +569,9 @@ extension _UIHostingView { let box: WeakBox = WeakBox(host) let boxAttr = Attribute(value: box) // inputs[UIKitHostContainerFocusItemInput.self] = boxAttr + #if OPENSWIFTUI_LINK_BACKLIGHTSERVICES inputs.textAlwaysOnProvider = OpenSwiftUITextAlwaysOnProvider.self + #endif // navigationBridge?.updateViewInputs(&inputs) } } diff --git a/Sources/OpenSwiftUICore/Shape/Path.swift b/Sources/OpenSwiftUICore/Shape/Path.swift index 790e37720..6befcb6e3 100644 --- a/Sources/OpenSwiftUICore/Shape/Path.swift +++ b/Sources/OpenSwiftUICore/Shape/Path.swift @@ -12,6 +12,8 @@ package import OpenRenderBoxShims import OpenSwiftUI_SPI public import OpenCoreGraphicsShims +package typealias ORBPath = OpenRenderBoxShims.ORBPath + // MARK: - Path [WIP] /// The outline of a 2D shape. diff --git a/Sources/OpenSwiftUICore/Shape/PathData.swift b/Sources/OpenSwiftUICore/Shape/PathData.swift index 69d0de6aa..83358e817 100644 --- a/Sources/OpenSwiftUICore/Shape/PathData.swift +++ b/Sources/OpenSwiftUICore/Shape/PathData.swift @@ -7,6 +7,8 @@ package import OpenCoreGraphicsShims package import OpenRenderBoxShims +// ORBPath typealias is defined in Path.swift to resolve Xcode module ambiguity + // MARK: - PathData /// A union-like structure matching the C PathData union layout. diff --git a/Sources/OpenSwiftUICore/Shape/RoundedCornerStyle.swift b/Sources/OpenSwiftUICore/Shape/RoundedCornerStyle.swift index 91d49768e..a82dca76f 100644 --- a/Sources/OpenSwiftUICore/Shape/RoundedCornerStyle.swift +++ b/Sources/OpenSwiftUICore/Shape/RoundedCornerStyle.swift @@ -10,6 +10,8 @@ package import OpenCoreGraphicsShims import OpenSwiftUI_SPI package import OpenRenderBoxShims +// ORBPath typealias is defined in Path.swift to resolve Xcode module ambiguity + // MARK: - RoundedCornerStyle /// Defines the shape of a rounded rectangle's corners. diff --git a/Sources/OpenSwiftUISymbolDualTestsSupport/module.modulemap b/Sources/OpenSwiftUISymbolDualTestsSupport/module.modulemap new file mode 100644 index 000000000..6aed561a7 --- /dev/null +++ b/Sources/OpenSwiftUISymbolDualTestsSupport/module.modulemap @@ -0,0 +1,3 @@ +module OpenSwiftUISymbolDualTestsSupport { + export * +} diff --git a/Tuist.swift b/Tuist.swift new file mode 100644 index 000000000..bd75e2704 --- /dev/null +++ b/Tuist.swift @@ -0,0 +1,3 @@ +import ProjectDescription + +let config = Tuist() diff --git a/Tuist/Package.swift b/Tuist/Package.swift new file mode 100644 index 000000000..c00ed58b5 --- /dev/null +++ b/Tuist/Package.swift @@ -0,0 +1,45 @@ +// swift-tools-version: 6.1 +import PackageDescription + +#if TUIST +import ProjectDescription + +let packageSettings = PackageSettings( + productTypes: [ + "OpenRenderBox": .staticFramework, + "OpenCoreGraphicsShims": .staticFramework, + "OpenQuartzCoreShims": .staticFramework, + "OpenAttributeGraphShims": .staticFramework, + "OpenRenderBoxShims": .staticFramework, + "OpenObservation": .staticFramework, + "SwiftSyntaxMacros": .staticFramework, + "SwiftCompilerPlugin": .staticFramework, + "Numerics": .staticFramework, + "RealModule": .staticFramework, + "ComplexModule": .staticFramework, + "SymbolLocator": .staticFramework, + "AttributeGraph": .staticFramework, + "CoreUI": .staticFramework, + "BacklightServices": .staticFramework, + ], + targetSettings: [ + "OpenRenderBoxCxx": .settings(base: [ + "DEFINES_MODULE": "NO", + ]), + ] +) +#endif + +let package = Package( + name: "OpenSwiftUIDeps", + dependencies: [ + .package(url: "https://github.com/apple/swift-numerics", from: "1.0.3"), + .package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.0"), + .package(url: "https://github.com/OpenSwiftUIProject/OpenCoreGraphics", branch: "main"), + .package(url: "https://github.com/OpenSwiftUIProject/OpenAttributeGraph", branch: "main"), + .package(url: "https://github.com/OpenSwiftUIProject/OpenRenderBox", branch: "main"), + .package(url: "https://github.com/OpenSwiftUIProject/OpenObservation", branch: "main"), + .package(url: "https://github.com/OpenSwiftUIProject/DarwinPrivateFrameworks.git", branch: "main"), + .package(url: "https://github.com/OpenSwiftUIProject/SymbolLocator.git", from: "0.2.0"), + ] +) diff --git a/availability-macros.resp b/availability-macros.resp new file mode 100644 index 000000000..717493141 --- /dev/null +++ b/availability-macros.resp @@ -0,0 +1,80 @@ +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v1_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v1_4:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v2_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_macOS_v2_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v2_1:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v2_3:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v3_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v3_2:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v3_4:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v4_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v4_1:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v4_4:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v5_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v5_1:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v5_2:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v5_4:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v5_5:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v6_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=OpenSwiftUI_v7_0:iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0 +-Xfrontend +-enable-experimental-feature +-Xfrontend +AvailabilityMacro=_distantFuture:iOS 99.0, macOS 99.0, tvOS 99.0, watchOS 99.0, visionOS 99.0 diff --git a/availability-macros.xcconfig b/availability-macros.xcconfig new file mode 100644 index 000000000..c896c563a --- /dev/null +++ b/availability-macros.xcconfig @@ -0,0 +1 @@ +OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v1_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v1_4:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v2_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_macOS_v2_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v2_1:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v2_3:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v3_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v3_2:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v3_4:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v4_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v4_1:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v4_4:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v5_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v5_1:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v5_2:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v5_4:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v5_5:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v6_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=OpenSwiftUI_v7_0:iOS\ 13.0,\ macOS\ 10.15,\ tvOS\ 13.0,\ watchOS\ 6.0,\ visionOS\ 1.0 -Xfrontend -enable-experimental-feature -Xfrontend AvailabilityMacro=_distantFuture:iOS\ 99.0,\ macOS\ 99.0,\ tvOS\ 99.0,\ watchOS\ 99.0,\ visionOS\ 99.0