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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,39 @@ jobs:
- if: ${{ matrix.platform[0] != 'watchOS' }}
name: Run Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectTests configuration:Debug

framework-archiving:
name: Archive Framework (${{ matrix.platform }})
runs-on: macos-15
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS, visionOS, macCatalyst]
include:
- platform: iOS
destination: "generic/platform=iOS"
- platform: macOS
destination: "generic/platform=macOS"
- platform: tvOS
destination: "generic/platform=tvOS"
- platform: watchOS
destination: "generic/platform=watchOS"
- platform: visionOS
destination: "generic/platform=visionOS"
- platform: macCatalyst
destination: "platform=macOS,variant=Mac Catalyst"
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Select Xcode version
run: sudo xcodes select 16.4

- name: Archive Framework
run: |
xcodebuild archive \
-scheme "SwiftUIIntrospectTestFramework" \
-destination "${{ matrix.destination }}" \
-archivePath .build/archiving/${{ matrix.platform }} \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
7 changes: 6 additions & 1 deletion Sources/IntrospectionSelector.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#if !os(watchOS)
@_spi(Advanced)
#if os(iOS) || os(tvOS) || os(visionOS)
public import UIKit
#elseif os(macOS)
public import AppKit
#endif

@_spi(Advanced)
@MainActor
public struct IntrospectionSelector<Target: PlatformEntity> {
@_spi(Advanced)
Expand Down
9 changes: 9 additions & 0 deletions Tests/TestFramework/TestFramework.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// TestFramework.swift
// TestFramework
//
// Created by David Roman on 30/07/2025.
//

import Foundation

233 changes: 231 additions & 2 deletions Tests/Tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objectVersion = 70;
objects = {

/* Begin PBXBuildFile section */
D503B2AC2A49BFE300027F5F /* VideoPlayerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D503B2AB2A49BFE300027F5F /* VideoPlayerTests.swift */; };
D50556532E3A6F5A00312263 /* SwiftUIIntrospect in Frameworks */ = {isa = PBXBuildFile; productRef = D50556522E3A6F5A00312263 /* SwiftUIIntrospect */; };
D50FFE8E2A17E2A400C32641 /* ScrollViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D50FFE8D2A17E2A400C32641 /* ScrollViewTests.swift */; };
D534D4DC2A4A596200218BFB /* WindowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D534D4DB2A4A596200218BFB /* WindowTests.swift */; };
D55BAD142DFF2B050038443E /* WebViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55BAD132DFF2B050038443E /* WebViewTests.swift */; };
Expand Down Expand Up @@ -78,6 +79,7 @@

/* Begin PBXFileReference section */
D503B2AB2A49BFE300027F5F /* VideoPlayerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPlayerTests.swift; sourceTree = "<group>"; };
D505564B2E3A6F2700312263 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D50FFE8D2A17E2A400C32641 /* ScrollViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollViewTests.swift; sourceTree = "<group>"; };
D534D4DB2A4A596200218BFB /* WindowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowTests.swift; sourceTree = "<group>"; };
D55BAD132DFF2B050038443E /* WebViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -137,7 +139,19 @@
D5F8D5EE2A1E87950054E9AB /* NavigationViewWithColumnsStyleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationViewWithColumnsStyleTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
D505564C2E3A6F2700312263 /* TestFramework */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = TestFramework; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
D50556482E3A6F2700312263 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D50556532E3A6F5A00312263 /* SwiftUIIntrospect in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F0BE4629C0DBE800AD95AB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -220,6 +234,7 @@
children = (
D5F0BE4B29C0DBE800AD95AB /* TestsHostApp */,
D5F0BE5E29C0DC0000AD95AB /* Tests */,
D505564C2E3A6F2700312263 /* TestFramework */,
D5F0BE4A29C0DBE800AD95AB /* Products */,
D5F0BE7029C0E12300AD95AB /* Frameworks */,
);
Expand All @@ -230,6 +245,7 @@
children = (
D5F0BE4929C0DBE800AD95AB /* TestsHostApp.app */,
D5F0BE5D29C0DC0000AD95AB /* Tests.xctest */,
D505564B2E3A6F2700312263 /* TestFramework.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -262,7 +278,41 @@
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
D50556462E3A6F2700312263 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
D505564A2E3A6F2700312263 /* TestFramework */ = {
isa = PBXNativeTarget;
buildConfigurationList = D50556512E3A6F2700312263 /* Build configuration list for PBXNativeTarget "TestFramework" */;
buildPhases = (
D50556462E3A6F2700312263 /* Headers */,
D50556472E3A6F2700312263 /* Sources */,
D50556482E3A6F2700312263 /* Frameworks */,
D50556492E3A6F2700312263 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
D505564C2E3A6F2700312263 /* TestFramework */,
);
name = TestFramework;
packageProductDependencies = (
D50556522E3A6F5A00312263 /* SwiftUIIntrospect */,
);
productName = TestFramework;
productReference = D505564B2E3A6F2700312263 /* TestFramework.framework */;
productType = "com.apple.product-type.framework";
};
D5F0BE4829C0DBE800AD95AB /* TestsHostApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = D5F0BE5829C0DBE900AD95AB /* Build configuration list for PBXNativeTarget "TestsHostApp" */;
Expand Down Expand Up @@ -308,9 +358,12 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1500;
LastSwiftUpdateCheck = 2600;
LastUpgradeCheck = 1500;
TargetAttributes = {
D505564A2E3A6F2700312263 = {
CreatedOnToolsVersion = 26.0;
};
D5F0BE4829C0DBE800AD95AB = {
CreatedOnToolsVersion = 14.2;
};
Expand Down Expand Up @@ -338,11 +391,19 @@
targets = (
D5F0BE4829C0DBE800AD95AB /* TestsHostApp */,
D5F0BE5C29C0DC0000AD95AB /* Tests */,
D505564A2E3A6F2700312263 /* TestFramework */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
D50556492E3A6F2700312263 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F0BE4729C0DBE800AD95AB /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -360,6 +421,13 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
D50556472E3A6F2700312263 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F0BE4529C0DBE800AD95AB /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -441,6 +509,154 @@
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
D505564F2E3A6F2700312263 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.siteline.TestFramework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
SUPPORTS_MACCATALYST = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_APPROACHABLE_CONCURRENCY = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_INSTALL_MODULE = YES;
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4,7";
TVOS_DEPLOYMENT_TARGET = 14.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
WATCHOS_DEPLOYMENT_TARGET = 6;
XROS_DEPLOYMENT_TARGET = 1.0;
};
name = Debug;
};
D50556502E3A6F2700312263 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.siteline.TestFramework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
SUPPORTS_MACCATALYST = YES;
SWIFT_APPROACHABLE_CONCURRENCY = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_INSTALL_MODULE = YES;
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4,7";
TVOS_DEPLOYMENT_TARGET = 14.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
WATCHOS_DEPLOYMENT_TARGET = 6;
XROS_DEPLOYMENT_TARGET = 1.0;
};
name = Release;
};
D5F0BE4329C0DB9700AD95AB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -866,6 +1082,15 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
D50556512E3A6F2700312263 /* Build configuration list for PBXNativeTarget "TestFramework" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D505564F2E3A6F2700312263 /* Debug */,
D50556502E3A6F2700312263 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D5F0BE4229C0DB9700AD95AB /* Build configuration list for PBXProject "Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down Expand Up @@ -896,6 +1121,10 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
D50556522E3A6F5A00312263 /* SwiftUIIntrospect */ = {
isa = XCSwiftPackageProductDependency;
productName = SwiftUIIntrospect;
};
D58CE15529C621B30081BFB0 /* SwiftUIIntrospect */ = {
isa = XCSwiftPackageProductDependency;
productName = SwiftUIIntrospect;
Expand Down
Loading