diff --git a/Example/ExampleApp.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj similarity index 70% rename from Example/ExampleApp.xcodeproj/project.pbxproj rename to Example/Example.xcodeproj/project.pbxproj index efe2968b..2c3f5184 100644 --- a/Example/ExampleApp.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -7,119 +7,114 @@ objects = { /* Begin PBXBuildFile section */ - 27403F802ABCB86900E01056 /* ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27403F7F2ABCB86900E01056 /* ExampleApp.swift */; }; - 27403F822ABCB86900E01056 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27403F812ABCB86900E01056 /* ContentView.swift */; }; - 27403F842ABCB86A00E01056 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27403F832ABCB86A00E01056 /* Assets.xcassets */; }; - 27403F882ABCB86A00E01056 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27403F872ABCB86A00E01056 /* Preview Assets.xcassets */; }; - 27965C7B2ABCB8D300BFE858 /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27965C7A2ABCB8D300BFE858 /* OpenSwiftUI */; }; + 27CD0B4D2AFC8D37003665EB /* ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0B4C2AFC8D37003665EB /* ExampleApp.swift */; }; + 27CD0B4F2AFC8D37003665EB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0B4E2AFC8D37003665EB /* ContentView.swift */; }; + 27CD0B512AFC8D38003665EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0B502AFC8D38003665EB /* Assets.xcassets */; }; + 27CD0B552AFC8D38003665EB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */; }; + 27CD0B5D2AFC8DA7003665EB /* OpenGraph in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5C2AFC8DA7003665EB /* OpenGraph */; }; + 27CD0B5F2AFC8DA7003665EB /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 27403F7C2ABCB86900E01056 /* ExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 27403F7F2ABCB86900E01056 /* ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleApp.swift; sourceTree = ""; }; - 27403F812ABCB86900E01056 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 27403F832ABCB86A00E01056 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 27403F852ABCB86A00E01056 /* ExampleApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ExampleApp.entitlements; sourceTree = ""; }; - 27403F872ABCB86A00E01056 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 27965C782ABCB8C900BFE858 /* OpenSwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenSwiftUI; path = ..; sourceTree = ""; }; + 27CD0B492AFC8D37003665EB /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 27CD0B4C2AFC8D37003665EB /* ExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleApp.swift; sourceTree = ""; }; + 27CD0B4E2AFC8D37003665EB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 27CD0B502AFC8D38003665EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 27CD0B522AFC8D38003665EB /* Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Example.entitlements; sourceTree = ""; }; + 27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 27CD0B612AFC8E0E003665EB /* OpenSwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenSwiftUI; path = ..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 27403F792ABCB86900E01056 /* Frameworks */ = { + 27CD0B462AFC8D37003665EB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 27965C7B2ABCB8D300BFE858 /* OpenSwiftUI in Frameworks */, + 27CD0B5F2AFC8DA7003665EB /* OpenSwiftUI in Frameworks */, + 27CD0B5D2AFC8DA7003665EB /* OpenGraph in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 27403F732ABCB86900E01056 = { + 27CD0B402AFC8D37003665EB = { isa = PBXGroup; children = ( - 27965C782ABCB8C900BFE858 /* OpenSwiftUI */, - 27403F7E2ABCB86900E01056 /* ExampleApp */, - 27403F7D2ABCB86900E01056 /* Products */, - 27965C792ABCB8D300BFE858 /* Frameworks */, + 27CD0B612AFC8E0E003665EB /* OpenSwiftUI */, + 27CD0B4B2AFC8D37003665EB /* Example */, + 27CD0B4A2AFC8D37003665EB /* Products */, ); sourceTree = ""; }; - 27403F7D2ABCB86900E01056 /* Products */ = { + 27CD0B4A2AFC8D37003665EB /* Products */ = { isa = PBXGroup; children = ( - 27403F7C2ABCB86900E01056 /* ExampleApp.app */, + 27CD0B492AFC8D37003665EB /* Example.app */, ); name = Products; sourceTree = ""; }; - 27403F7E2ABCB86900E01056 /* ExampleApp */ = { + 27CD0B4B2AFC8D37003665EB /* Example */ = { isa = PBXGroup; children = ( - 27403F7F2ABCB86900E01056 /* ExampleApp.swift */, - 27403F812ABCB86900E01056 /* ContentView.swift */, - 27403F832ABCB86A00E01056 /* Assets.xcassets */, - 27403F852ABCB86A00E01056 /* ExampleApp.entitlements */, - 27403F862ABCB86A00E01056 /* Preview Content */, + 27CD0B4C2AFC8D37003665EB /* ExampleApp.swift */, + 27CD0B4E2AFC8D37003665EB /* ContentView.swift */, + 27CD0B502AFC8D38003665EB /* Assets.xcassets */, + 27CD0B522AFC8D38003665EB /* Example.entitlements */, + 27CD0B532AFC8D38003665EB /* Preview Content */, ); - path = ExampleApp; + path = Example; sourceTree = ""; }; - 27403F862ABCB86A00E01056 /* Preview Content */ = { + 27CD0B532AFC8D38003665EB /* Preview Content */ = { isa = PBXGroup; children = ( - 27403F872ABCB86A00E01056 /* Preview Assets.xcassets */, + 27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */, ); path = "Preview Content"; sourceTree = ""; }; - 27965C792ABCB8D300BFE858 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 27403F7B2ABCB86900E01056 /* ExampleApp */ = { + 27CD0B482AFC8D37003665EB /* Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 27403F8B2ABCB86A00E01056 /* Build configuration list for PBXNativeTarget "ExampleApp" */; + buildConfigurationList = 27CD0B582AFC8D38003665EB /* Build configuration list for PBXNativeTarget "Example" */; buildPhases = ( - 27403F782ABCB86900E01056 /* Sources */, - 27403F792ABCB86900E01056 /* Frameworks */, - 27403F7A2ABCB86900E01056 /* Resources */, + 27CD0B452AFC8D37003665EB /* Sources */, + 27CD0B462AFC8D37003665EB /* Frameworks */, + 27CD0B472AFC8D37003665EB /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = ExampleApp; + name = Example; packageProductDependencies = ( - 27965C7A2ABCB8D300BFE858 /* OpenSwiftUI */, + 27CD0B5C2AFC8DA7003665EB /* OpenGraph */, + 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */, ); - productName = ExampleApp; - productReference = 27403F7C2ABCB86900E01056 /* ExampleApp.app */; + productName = Example; + productReference = 27CD0B492AFC8D37003665EB /* Example.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 27403F742ABCB86900E01056 /* Project object */ = { + 27CD0B412AFC8D37003665EB /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1500; LastUpgradeCheck = 1500; TargetAttributes = { - 27403F7B2ABCB86900E01056 = { + 27CD0B482AFC8D37003665EB = { CreatedOnToolsVersion = 15.0; }; }; }; - buildConfigurationList = 27403F772ABCB86900E01056 /* Build configuration list for PBXProject "ExampleApp" */; + buildConfigurationList = 27CD0B442AFC8D37003665EB /* Build configuration list for PBXProject "Example" */; compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -127,44 +122,44 @@ en, Base, ); - mainGroup = 27403F732ABCB86900E01056; + mainGroup = 27CD0B402AFC8D37003665EB; packageReferences = ( ); - productRefGroup = 27403F7D2ABCB86900E01056 /* Products */; + productRefGroup = 27CD0B4A2AFC8D37003665EB /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 27403F7B2ABCB86900E01056 /* ExampleApp */, + 27CD0B482AFC8D37003665EB /* Example */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 27403F7A2ABCB86900E01056 /* Resources */ = { + 27CD0B472AFC8D37003665EB /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 27403F882ABCB86A00E01056 /* Preview Assets.xcassets in Resources */, - 27403F842ABCB86A00E01056 /* Assets.xcassets in Resources */, + 27CD0B552AFC8D38003665EB /* Preview Assets.xcassets in Resources */, + 27CD0B512AFC8D38003665EB /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 27403F782ABCB86900E01056 /* Sources */ = { + 27CD0B452AFC8D37003665EB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 27403F822ABCB86900E01056 /* ContentView.swift in Sources */, - 27403F802ABCB86900E01056 /* ExampleApp.swift in Sources */, + 27CD0B4F2AFC8D37003665EB /* ContentView.swift in Sources */, + 27CD0B4D2AFC8D37003665EB /* ExampleApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - 27403F892ABCB86A00E01056 /* Debug */ = { + 27CD0B562AFC8D38003665EB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -225,7 +220,7 @@ }; name = Debug; }; - 27403F8A2ABCB86A00E01056 /* Release */ = { + 27CD0B572AFC8D38003665EB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -278,15 +273,15 @@ }; name = Release; }; - 27403F8C2ABCB86A00E01056 /* Debug */ = { + 27CD0B592AFC8D38003665EB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = ExampleApp/ExampleApp.entitlements; + CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"ExampleApp/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; DEVELOPMENT_TEAM = VB7MJ8R223; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -301,12 +296,12 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.openswiftui.exampleapp; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.OpenSwiftUIExample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -316,15 +311,15 @@ }; name = Debug; }; - 27403F8D2ABCB86A00E01056 /* Release */ = { + 27CD0B5A2AFC8D38003665EB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = ExampleApp/ExampleApp.entitlements; + CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"ExampleApp/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; DEVELOPMENT_TEAM = VB7MJ8R223; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; @@ -339,12 +334,12 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.openswiftui.exampleapp; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.OpenSwiftUIExample; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -357,20 +352,20 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 27403F772ABCB86900E01056 /* Build configuration list for PBXProject "ExampleApp" */ = { + 27CD0B442AFC8D37003665EB /* Build configuration list for PBXProject "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 27403F892ABCB86A00E01056 /* Debug */, - 27403F8A2ABCB86A00E01056 /* Release */, + 27CD0B562AFC8D38003665EB /* Debug */, + 27CD0B572AFC8D38003665EB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 27403F8B2ABCB86A00E01056 /* Build configuration list for PBXNativeTarget "ExampleApp" */ = { + 27CD0B582AFC8D38003665EB /* Build configuration list for PBXNativeTarget "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 27403F8C2ABCB86A00E01056 /* Debug */, - 27403F8D2ABCB86A00E01056 /* Release */, + 27CD0B592AFC8D38003665EB /* Debug */, + 27CD0B5A2AFC8D38003665EB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -378,11 +373,15 @@ /* End XCConfigurationList section */ /* Begin XCSwiftPackageProductDependency section */ - 27965C7A2ABCB8D300BFE858 /* OpenSwiftUI */ = { + 27CD0B5C2AFC8DA7003665EB /* OpenGraph */ = { + isa = XCSwiftPackageProductDependency; + productName = OpenGraph; + }; + 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */ = { isa = XCSwiftPackageProductDependency; productName = OpenSwiftUI; }; /* End XCSwiftPackageProductDependency section */ }; - rootObject = 27403F742ABCB86900E01056 /* Project object */; + rootObject = 27CD0B412AFC8D37003665EB /* Project object */; } diff --git a/Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Example/ExampleApp/Assets.xcassets/AccentColor.colorset/Contents.json b/Example/Example/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Example/ExampleApp/Assets.xcassets/AccentColor.colorset/Contents.json rename to Example/Example/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Example/ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Example/ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Example/ExampleApp/Assets.xcassets/Contents.json b/Example/Example/Assets.xcassets/Contents.json similarity index 100% rename from Example/ExampleApp/Assets.xcassets/Contents.json rename to Example/Example/Assets.xcassets/Contents.json diff --git a/Example/ExampleApp/ContentView.swift b/Example/Example/ContentView.swift similarity index 73% rename from Example/ExampleApp/ContentView.swift rename to Example/Example/ContentView.swift index 3ee0fe72..1246bfa9 100644 --- a/Example/ExampleApp/ContentView.swift +++ b/Example/Example/ContentView.swift @@ -1,8 +1,8 @@ // // ContentView.swift -// ExampleApp +// Example // -// Created by Kyle on 2023/9/22. +// Created by Kyle on 2023/11/9. // import OpenSwiftUI diff --git a/Example/ExampleApp/ExampleApp.entitlements b/Example/Example/Example.entitlements similarity index 100% rename from Example/ExampleApp/ExampleApp.entitlements rename to Example/Example/Example.entitlements diff --git a/Example/ExampleApp/ExampleApp.swift b/Example/Example/ExampleApp.swift similarity index 67% rename from Example/ExampleApp/ExampleApp.swift rename to Example/Example/ExampleApp.swift index a5650d81..23303d6e 100644 --- a/Example/ExampleApp/ExampleApp.swift +++ b/Example/Example/ExampleApp.swift @@ -1,8 +1,8 @@ // -// ExampleAppApp.swift -// ExampleApp +// ExampleApp.swift +// Example // -// Created by Kyle on 2023/9/22. +// Created by Kyle on 2023/11/9. // import OpenSwiftUI diff --git a/Example/ExampleApp/Preview Content/Preview Assets.xcassets/Contents.json b/Example/Example/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from Example/ExampleApp/Preview Content/Preview Assets.xcassets/Contents.json rename to Example/Example/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/Example/README.md b/Example/README.md deleted file mode 100644 index c3e8df2d..00000000 --- a/Example/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ExampleApp - -This is an example app demonstrating how to use OpenSwiftUI. diff --git a/Tests/OpenSwiftUI_UITests/ContentView_FB13341321.swift b/Tests/OpenSwiftUIUITests/ContentView_FB13341321.swift similarity index 100% rename from Tests/OpenSwiftUI_UITests/ContentView_FB13341321.swift rename to Tests/OpenSwiftUIUITests/ContentView_FB13341321.swift diff --git a/Tests/OpenSwiftUIUITests/LaunchTests.swift b/Tests/OpenSwiftUIUITests/LaunchTests.swift new file mode 100644 index 00000000..39243978 --- /dev/null +++ b/Tests/OpenSwiftUIUITests/LaunchTests.swift @@ -0,0 +1,23 @@ +// +// UITestsLaunchTests.swift +// OpenSwiftUIUITests +// +// Created by Kyle on 2023/11/9. +// + +import XCTest + +final class UITestsLaunchTests: XCTestCase { + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + } +} diff --git a/Tests/OpenSwiftUIUITests/UITests.swift b/Tests/OpenSwiftUIUITests/UITests.swift new file mode 100644 index 00000000..e7839d22 --- /dev/null +++ b/Tests/OpenSwiftUIUITests/UITests.swift @@ -0,0 +1,20 @@ +// +// UITests.swift +// OpenSwiftUIUITests +// +// Created by Kyle on 2023/11/9. +// + +import XCTest +import Hammer +import UIKit + +final class UITests: XCTestCase { + func testExample() throws { + let app = XCUIApplication() + app.launch() + let eventGenerator = EventGenerator(window: app.windows.firstMatch.value as! UIWindow) + eventGenerator.showTouches = true + try eventGenerator.fingerUp() + } +} diff --git a/TestsHost/TestsHost.xcodeproj/project.pbxproj b/TestsHost/TestsHost.xcodeproj/project.pbxproj new file mode 100644 index 00000000..bdffc0f4 --- /dev/null +++ b/TestsHost/TestsHost.xcodeproj/project.pbxproj @@ -0,0 +1,654 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 27CD0BBF2AFC91FA003665EB /* TestsHostApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0BBE2AFC91FA003665EB /* TestsHostApp.swift */; }; + 27CD0BC12AFC91FA003665EB /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0BC02AFC91FA003665EB /* ContentView.swift */; }; + 27CD0BC32AFC91FB003665EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0BC22AFC91FB003665EB /* Assets.xcassets */; }; + 27CD0BC72AFC91FB003665EB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0BC62AFC91FB003665EB /* Preview Assets.xcassets */; }; + 27CD0BED2AFC92A0003665EB /* OpenSwiftUITests in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0BEC2AFC92A0003665EB /* OpenSwiftUITests */; }; + 27CD0BEF2AFC92AE003665EB /* OpenSwiftUIUITests in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0BEE2AFC92AE003665EB /* OpenSwiftUIUITests */; }; + 27CD0BF32AFC939F003665EB /* Hammer in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0BF22AFC939F003665EB /* Hammer */; }; + 27CD0BF52AFC93A7003665EB /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0BF42AFC93A7003665EB /* OpenSwiftUI */; }; + 27CD0BF72AFC94FF003665EB /* OpenContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27CD0BF62AFC94FF003665EB /* OpenContentView.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 27CD0BD82AFC9238003665EB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 27CD0BB32AFC91FA003665EB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 27CD0BBA2AFC91FA003665EB; + remoteInfo = TestsHost; + }; + 27CD0BE72AFC924A003665EB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 27CD0BB32AFC91FA003665EB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 27CD0BBA2AFC91FA003665EB; + remoteInfo = TestsHost; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 27CD0BBB2AFC91FA003665EB /* TestsHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestsHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 27CD0BBE2AFC91FA003665EB /* TestsHostApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsHostApp.swift; sourceTree = ""; }; + 27CD0BC02AFC91FA003665EB /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 27CD0BC22AFC91FB003665EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 27CD0BC42AFC91FB003665EB /* TestsHost.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TestsHost.entitlements; sourceTree = ""; }; + 27CD0BC62AFC91FB003665EB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 27CD0BD42AFC9238003665EB /* OpenSwiftUI_UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenSwiftUI_UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 27CD0BE12AFC924A003665EB /* OpenSwiftUI_UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenSwiftUI_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 27CD0BEC2AFC92A0003665EB /* OpenSwiftUITests */ = {isa = PBXFileReference; lastKnownFileType = folder; name = OpenSwiftUITests; path = ../Tests/OpenSwiftUITests; sourceTree = ""; }; + 27CD0BEE2AFC92AE003665EB /* OpenSwiftUIUITests */ = {isa = PBXFileReference; lastKnownFileType = folder; name = OpenSwiftUIUITests; path = ../Tests/OpenSwiftUIUITests; sourceTree = ""; }; + 27CD0BF02AFC9347003665EB /* OpenSwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenSwiftUI; path = ..; sourceTree = ""; }; + 27CD0BF62AFC94FF003665EB /* OpenContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenContentView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 27CD0BB82AFC91FA003665EB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BF52AFC93A7003665EB /* OpenSwiftUI in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BD12AFC9238003665EB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BDE2AFC924A003665EB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BF32AFC939F003665EB /* Hammer in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27CD0BB22AFC91FA003665EB = { + isa = PBXGroup; + children = ( + 27CD0BF02AFC9347003665EB /* OpenSwiftUI */, + 27CD0BBD2AFC91FA003665EB /* TestsHost */, + 27CD0BEC2AFC92A0003665EB /* OpenSwiftUITests */, + 27CD0BEE2AFC92AE003665EB /* OpenSwiftUIUITests */, + 27CD0BBC2AFC91FA003665EB /* Products */, + 27CD0BF12AFC939F003665EB /* Frameworks */, + ); + sourceTree = ""; + }; + 27CD0BBC2AFC91FA003665EB /* Products */ = { + isa = PBXGroup; + children = ( + 27CD0BBB2AFC91FA003665EB /* TestsHost.app */, + 27CD0BD42AFC9238003665EB /* OpenSwiftUI_UnitTests.xctest */, + 27CD0BE12AFC924A003665EB /* OpenSwiftUI_UITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 27CD0BBD2AFC91FA003665EB /* TestsHost */ = { + isa = PBXGroup; + children = ( + 27CD0BBE2AFC91FA003665EB /* TestsHostApp.swift */, + 27CD0BC02AFC91FA003665EB /* ContentView.swift */, + 27CD0BF62AFC94FF003665EB /* OpenContentView.swift */, + 27CD0BC22AFC91FB003665EB /* Assets.xcassets */, + 27CD0BC42AFC91FB003665EB /* TestsHost.entitlements */, + 27CD0BC52AFC91FB003665EB /* Preview Content */, + ); + path = TestsHost; + sourceTree = ""; + }; + 27CD0BC52AFC91FB003665EB /* Preview Content */ = { + isa = PBXGroup; + children = ( + 27CD0BC62AFC91FB003665EB /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 27CD0BF12AFC939F003665EB /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 27CD0BBA2AFC91FA003665EB /* TestsHost */ = { + isa = PBXNativeTarget; + buildConfigurationList = 27CD0BCA2AFC91FB003665EB /* Build configuration list for PBXNativeTarget "TestsHost" */; + buildPhases = ( + 27CD0BB72AFC91FA003665EB /* Sources */, + 27CD0BB82AFC91FA003665EB /* Frameworks */, + 27CD0BB92AFC91FA003665EB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestsHost; + packageProductDependencies = ( + 27CD0BF42AFC93A7003665EB /* OpenSwiftUI */, + ); + productName = TestsHost; + productReference = 27CD0BBB2AFC91FA003665EB /* TestsHost.app */; + productType = "com.apple.product-type.application"; + }; + 27CD0BD32AFC9238003665EB /* OpenSwiftUI_UnitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 27CD0BDA2AFC9238003665EB /* Build configuration list for PBXNativeTarget "OpenSwiftUI_UnitTests" */; + buildPhases = ( + 27CD0BD02AFC9238003665EB /* Sources */, + 27CD0BD12AFC9238003665EB /* Frameworks */, + 27CD0BD22AFC9238003665EB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 27CD0BD92AFC9238003665EB /* PBXTargetDependency */, + ); + name = OpenSwiftUI_UnitTests; + productName = OpenSwiftUI_UnitTests; + productReference = 27CD0BD42AFC9238003665EB /* OpenSwiftUI_UnitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 27CD0BE02AFC924A003665EB /* OpenSwiftUI_UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 27CD0BE92AFC924A003665EB /* Build configuration list for PBXNativeTarget "OpenSwiftUI_UITests" */; + buildPhases = ( + 27CD0BDD2AFC924A003665EB /* Sources */, + 27CD0BDE2AFC924A003665EB /* Frameworks */, + 27CD0BDF2AFC924A003665EB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 27CD0BE82AFC924A003665EB /* PBXTargetDependency */, + ); + name = OpenSwiftUI_UITests; + packageProductDependencies = ( + 27CD0BF22AFC939F003665EB /* Hammer */, + ); + productName = OpenSwiftUI_UITests; + productReference = 27CD0BE12AFC924A003665EB /* OpenSwiftUI_UITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 27CD0BB32AFC91FA003665EB /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + TargetAttributes = { + 27CD0BBA2AFC91FA003665EB = { + CreatedOnToolsVersion = 15.0; + }; + 27CD0BD32AFC9238003665EB = { + CreatedOnToolsVersion = 15.0; + TestTargetID = 27CD0BBA2AFC91FA003665EB; + }; + 27CD0BE02AFC924A003665EB = { + CreatedOnToolsVersion = 15.0; + TestTargetID = 27CD0BBA2AFC91FA003665EB; + }; + }; + }; + buildConfigurationList = 27CD0BB62AFC91FA003665EB /* Build configuration list for PBXProject "TestsHost" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 27CD0BB22AFC91FA003665EB; + packageReferences = ( + 27CD0BCD2AFC921C003665EB /* XCRemoteSwiftPackageReference "Hammer" */, + ); + productRefGroup = 27CD0BBC2AFC91FA003665EB /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 27CD0BBA2AFC91FA003665EB /* TestsHost */, + 27CD0BD32AFC9238003665EB /* OpenSwiftUI_UnitTests */, + 27CD0BE02AFC924A003665EB /* OpenSwiftUI_UITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 27CD0BB92AFC91FA003665EB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BC72AFC91FB003665EB /* Preview Assets.xcassets in Resources */, + 27CD0BC32AFC91FB003665EB /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BD22AFC9238003665EB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BED2AFC92A0003665EB /* OpenSwiftUITests in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BDF2AFC924A003665EB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BEF2AFC92AE003665EB /* OpenSwiftUIUITests in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 27CD0BB72AFC91FA003665EB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 27CD0BC12AFC91FA003665EB /* ContentView.swift in Sources */, + 27CD0BBF2AFC91FA003665EB /* TestsHostApp.swift in Sources */, + 27CD0BF72AFC94FF003665EB /* OpenContentView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BD02AFC9238003665EB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 27CD0BDD2AFC924A003665EB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 27CD0BD92AFC9238003665EB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 27CD0BBA2AFC91FA003665EB /* TestsHost */; + targetProxy = 27CD0BD82AFC9238003665EB /* PBXContainerItemProxy */; + }; + 27CD0BE82AFC924A003665EB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 27CD0BBA2AFC91FA003665EB /* TestsHost */; + targetProxy = 27CD0BE72AFC924A003665EB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 27CD0BC82AFC91FB003665EB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = 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_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 27CD0BC92AFC91FB003665EB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = 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_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 27CD0BCB2AFC91FB003665EB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = TestsHost/TestsHost.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"TestsHost/Preview Content\""; + DEVELOPMENT_TEAM = VB7MJ8R223; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.TestsHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 27CD0BCC2AFC91FB003665EB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = TestsHost/TestsHost.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"TestsHost/Preview Content\""; + DEVELOPMENT_TEAM = VB7MJ8R223; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.TestsHost; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 27CD0BDB2AFC9238003665EB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = VB7MJ8R223; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "top.kyleye.OpenSwiftUI-UnitTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestsHost.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/TestsHost"; + }; + name = Debug; + }; + 27CD0BDC2AFC9238003665EB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = VB7MJ8R223; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "top.kyleye.OpenSwiftUI-UnitTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestsHost.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/TestsHost"; + }; + name = Release; + }; + 27CD0BEA2AFC924A003665EB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = VB7MJ8R223; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "top.kyleye.OpenSwiftUI-UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TestsHost; + }; + name = Debug; + }; + 27CD0BEB2AFC924A003665EB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = VB7MJ8R223; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "top.kyleye.OpenSwiftUI-UITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TestsHost; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 27CD0BB62AFC91FA003665EB /* Build configuration list for PBXProject "TestsHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27CD0BC82AFC91FB003665EB /* Debug */, + 27CD0BC92AFC91FB003665EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 27CD0BCA2AFC91FB003665EB /* Build configuration list for PBXNativeTarget "TestsHost" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27CD0BCB2AFC91FB003665EB /* Debug */, + 27CD0BCC2AFC91FB003665EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 27CD0BDA2AFC9238003665EB /* Build configuration list for PBXNativeTarget "OpenSwiftUI_UnitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27CD0BDB2AFC9238003665EB /* Debug */, + 27CD0BDC2AFC9238003665EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 27CD0BE92AFC924A003665EB /* Build configuration list for PBXNativeTarget "OpenSwiftUI_UITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 27CD0BEA2AFC924A003665EB /* Debug */, + 27CD0BEB2AFC924A003665EB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 27CD0BCD2AFC921C003665EB /* XCRemoteSwiftPackageReference "Hammer" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/lyft/Hammer.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.14.3; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 27CD0BF22AFC939F003665EB /* Hammer */ = { + isa = XCSwiftPackageProductDependency; + package = 27CD0BCD2AFC921C003665EB /* XCRemoteSwiftPackageReference "Hammer" */; + productName = Hammer; + }; + 27CD0BF42AFC93A7003665EB /* OpenSwiftUI */ = { + isa = XCSwiftPackageProductDependency; + productName = OpenSwiftUI; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 27CD0BB32AFC91FA003665EB /* Project object */; +} diff --git a/TestsHost/TestsHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TestsHost/TestsHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/TestsHost/TestsHost.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TestsHost/TestsHost/Assets.xcassets/AccentColor.colorset/Contents.json b/TestsHost/TestsHost/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/TestsHost/TestsHost/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TestsHost/TestsHost/Assets.xcassets/AppIcon.appiconset/Contents.json b/TestsHost/TestsHost/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..532cd729 --- /dev/null +++ b/TestsHost/TestsHost/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TestsHost/TestsHost/Assets.xcassets/Contents.json b/TestsHost/TestsHost/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/TestsHost/TestsHost/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TestsHost/TestsHost/ContentView.swift b/TestsHost/TestsHost/ContentView.swift new file mode 100644 index 00000000..3d5d25a9 --- /dev/null +++ b/TestsHost/TestsHost/ContentView.swift @@ -0,0 +1,18 @@ +// +// ContentView.swift +// TestsHost +// +// Created by Kyle on 2023/11/9. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, World!") + } +} + +#Preview { + ContentView() +} diff --git a/TestsHost/TestsHost/OpenContentView.swift b/TestsHost/TestsHost/OpenContentView.swift new file mode 100644 index 00000000..b1be1aac --- /dev/null +++ b/TestsHost/TestsHost/OpenContentView.swift @@ -0,0 +1,14 @@ +// +// OpenContentView.swift +// TestsHost +// +// Created by Kyle on 2023/11/9. +// + +import OpenSwiftUI + +struct OpenContentView: View { + var body: some View { + EmptyView() + } +} diff --git a/TestsHost/TestsHost/Preview Content/Preview Assets.xcassets/Contents.json b/TestsHost/TestsHost/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/TestsHost/TestsHost/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TestsHost/TestsHost/TestsHost.entitlements b/TestsHost/TestsHost/TestsHost.entitlements new file mode 100644 index 00000000..f2ef3ae0 --- /dev/null +++ b/TestsHost/TestsHost/TestsHost.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/TestsHost/TestsHost/TestsHostApp.swift b/TestsHost/TestsHost/TestsHostApp.swift new file mode 100644 index 00000000..228b1441 --- /dev/null +++ b/TestsHost/TestsHost/TestsHostApp.swift @@ -0,0 +1,39 @@ +// +// TestsHostApp.swift +// TestsHost +// +// Created by Kyle on 2023/11/9. +// + +import OpenSwiftUI +import SwiftUI + +@main +enum TestHostApp { + static func main() { + let useSwiftUI = true + if #available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *), + useSwiftUI { + TestsHostSwiftUIApp.main() + } else { + TestsHostOpenSwiftUIApp.main() + } + } +} + +struct TestsHostOpenSwiftUIApp: OpenSwiftUI.App { + var body: some OpenSwiftUI.Scene { + OpenSwiftUI.WindowGroup { + OpenContentView() + } + } +} + +@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) +struct TestsHostSwiftUIApp: SwiftUI.App { + var body: some SwiftUI.Scene { + SwiftUI.WindowGroup { + ContentView() + } + } +}