From c5f4cc7ea16b310fcf331354cb69808431d88088 Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 13:29:35 +0200 Subject: [PATCH 1/6] Added GitHub workflows --- .github/workflows/swift-package.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/swift-package.yml diff --git a/.github/workflows/swift-package.yml b/.github/workflows/swift-package.yml new file mode 100644 index 0000000..2701b7d --- /dev/null +++ b/.github/workflows/swift-package.yml @@ -0,0 +1,17 @@ +name: Swift Package + +on: [push] + +jobs: + build: + runs-on: macos-15 + + steps: + - uses: actions/checkout@v4 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '26.0.1' + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v From 03aa7e8c0db6bb2107a4f22e63fa4545685211d1 Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 13:55:57 +0200 Subject: [PATCH 2/6] Fixed workflow --- .github/workflows/swift-package.yml | 17 -- .github/workflows/tests.yml | 28 +++ AsyncReactorExample.xcodeproj/project.pbxproj | 173 +++++++++++++++++- .../xcshareddata/swiftpm/Package.resolved | 12 +- .../xcschemes/AsyncReactorExample.xcscheme | 96 ++++++++++ .../AsyncReactorExampleTests.swift | 16 ++ Testplans/AsyncReactorExample.xctestplan | 30 +++ 7 files changed, 351 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/swift-package.yml create mode 100644 .github/workflows/tests.yml create mode 100644 AsyncReactorExample.xcodeproj/xcshareddata/xcschemes/AsyncReactorExample.xcscheme create mode 100644 AsyncReactorExampleTests/AsyncReactorExampleTests.swift create mode 100644 Testplans/AsyncReactorExample.xctestplan diff --git a/.github/workflows/swift-package.yml b/.github/workflows/swift-package.yml deleted file mode 100644 index 2701b7d..0000000 --- a/.github/workflows/swift-package.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Swift Package - -on: [push] - -jobs: - build: - runs-on: macos-15 - - steps: - - uses: actions/checkout@v4 - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '26.0.1' - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0491b0f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Run Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + name: Run Tests + runs-on: macos-15 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '26.0.1' + + - name: Build and Test + run: | + xcodebuild test \ + -project AsyncReactorExample.xcodeproj \ + -scheme AsyncReactorExample \ + -enableCodeCoverage YES \ + | xcpretty && exit ${PIPESTATUS[0]} diff --git a/AsyncReactorExample.xcodeproj/project.pbxproj b/AsyncReactorExample.xcodeproj/project.pbxproj index 1cddb22..bfd0934 100644 --- a/AsyncReactorExample.xcodeproj/project.pbxproj +++ b/AsyncReactorExample.xcodeproj/project.pbxproj @@ -10,15 +10,31 @@ B4A9DDD22CF23EF2008CA694 /* Reactor in Frameworks */ = {isa = PBXBuildFile; productRef = B4A9DDD12CF23EF2008CA694 /* Reactor */; }; B4ECB0C12A1250E000B0CAAE /* AsyncReactor in Frameworks */ = {isa = PBXBuildFile; productRef = B4ECB0C02A1250E000B0CAAE /* AsyncReactor */; }; B4ECB0C82A12520700B0CAAE /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = B4ECB0C72A12520700B0CAAE /* Logging */; }; + FAF86B112EA110EF00C75689 /* AsyncReactor in Frameworks */ = {isa = PBXBuildFile; productRef = FAF86B102EA110EF00C75689 /* AsyncReactor */; }; + FAF86B132EA110EF00C75689 /* Reactor in Frameworks */ = {isa = PBXBuildFile; productRef = FAF86B122EA110EF00C75689 /* Reactor */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + FAF86B3D2EA1128D00C75689 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B4ECB0A42A1250AE00B0CAAE /* Project object */; + proxyType = 1; + remoteGlobalIDString = B4ECB0AB2A1250AE00B0CAAE; + remoteInfo = AsyncReactorExample; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ B4ECB0AC2A1250AE00B0CAAE /* AsyncReactorExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AsyncReactorExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B4ECB0BE2A1250D700B0CAAE /* AsyncReactor */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = AsyncReactor; path = ..; sourceTree = ""; }; + FAF86B392EA1128C00C75689 /* AsyncReactorExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AsyncReactorExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + FAF86B422EA112D500C75689 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ 82F565F82D74885200C72CA5 /* AsyncReactorExample */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = AsyncReactorExample; sourceTree = ""; }; + FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = AsyncReactorExampleTests; sourceTree = ""; }; + FAF86B452EA112DE00C75689 /* .github */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = .github; sourceTree = ""; }; + FAF86B482EA1134000C75689 /* Testplans */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Testplans; sourceTree = ""; }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -27,19 +43,31 @@ buildActionMask = 2147483647; files = ( B4A9DDD22CF23EF2008CA694 /* Reactor in Frameworks */, + FAF86B132EA110EF00C75689 /* Reactor in Frameworks */, B4ECB0C82A12520700B0CAAE /* Logging in Frameworks */, + FAF86B112EA110EF00C75689 /* AsyncReactor in Frameworks */, B4ECB0C12A1250E000B0CAAE /* AsyncReactor in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + FAF86B362EA1128C00C75689 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ B4ECB0A32A1250AE00B0CAAE = { isa = PBXGroup; children = ( - B4ECB0BE2A1250D700B0CAAE /* AsyncReactor */, + FAF86B422EA112D500C75689 /* .gitignore */, + FAF86B452EA112DE00C75689 /* .github */, 82F565F82D74885200C72CA5 /* AsyncReactorExample */, + FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */, + FAF86B482EA1134000C75689 /* Testplans */, B4ECB0AD2A1250AE00B0CAAE /* Products */, B4ECB0BF2A1250E000B0CAAE /* Frameworks */, ); @@ -49,6 +77,7 @@ isa = PBXGroup; children = ( B4ECB0AC2A1250AE00B0CAAE /* AsyncReactorExample.app */, + FAF86B392EA1128C00C75689 /* AsyncReactorExampleTests.xctest */, ); name = Products; sourceTree = ""; @@ -83,11 +112,36 @@ B4ECB0C02A1250E000B0CAAE /* AsyncReactor */, B4ECB0C72A12520700B0CAAE /* Logging */, B4A9DDD12CF23EF2008CA694 /* Reactor */, + FAF86B102EA110EF00C75689 /* AsyncReactor */, + FAF86B122EA110EF00C75689 /* Reactor */, ); productName = AsyncReactorExample; productReference = B4ECB0AC2A1250AE00B0CAAE /* AsyncReactorExample.app */; productType = "com.apple.product-type.application"; }; + FAF86B382EA1128C00C75689 /* AsyncReactorExampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = FAF86B412EA1128D00C75689 /* Build configuration list for PBXNativeTarget "AsyncReactorExampleTests" */; + buildPhases = ( + FAF86B352EA1128C00C75689 /* Sources */, + FAF86B362EA1128C00C75689 /* Frameworks */, + FAF86B372EA1128C00C75689 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + FAF86B3E2EA1128D00C75689 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */, + ); + name = AsyncReactorExampleTests; + packageProductDependencies = ( + ); + productName = AsyncReactorExampleTests; + productReference = FAF86B392EA1128C00C75689 /* AsyncReactorExampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -95,12 +149,16 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1430; + LastSwiftUpdateCheck = 2600; LastUpgradeCheck = 1430; TargetAttributes = { B4ECB0AB2A1250AE00B0CAAE = { CreatedOnToolsVersion = 14.3; }; + FAF86B382EA1128C00C75689 = { + CreatedOnToolsVersion = 26.0.1; + TestTargetID = B4ECB0AB2A1250AE00B0CAAE; + }; }; }; buildConfigurationList = B4ECB0A72A1250AE00B0CAAE /* Build configuration list for PBXProject "AsyncReactorExample" */; @@ -114,12 +172,14 @@ mainGroup = B4ECB0A32A1250AE00B0CAAE; packageReferences = ( B4ECB0C62A12520700B0CAAE /* XCRemoteSwiftPackageReference "swift-log" */, + FAF86B0F2EA110EF00C75689 /* XCRemoteSwiftPackageReference "AsyncReactor" */, ); productRefGroup = B4ECB0AD2A1250AE00B0CAAE /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( B4ECB0AB2A1250AE00B0CAAE /* AsyncReactorExample */, + FAF86B382EA1128C00C75689 /* AsyncReactorExampleTests */, ); }; /* End PBXProject section */ @@ -132,6 +192,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FAF86B372EA1128C00C75689 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -142,8 +209,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FAF86B352EA1128C00C75689 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + FAF86B3E2EA1128D00C75689 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B4ECB0AB2A1250AE00B0CAAE /* AsyncReactorExample */; + targetProxy = FAF86B3D2EA1128D00C75689 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ B4ECB0B92A1250AF00B0CAAE /* Debug */ = { isa = XCBuildConfiguration; @@ -328,6 +410,64 @@ }; name = Release; }; + FAF86B3F2EA1128D00C75689 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = U37QH9QGB8; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.diamir.AsyncReactorExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = NO; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AsyncReactorExample.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AsyncReactorExample"; + }; + name = Debug; + }; + FAF86B402EA1128D00C75689 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = U37QH9QGB8; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.diamir.AsyncReactorExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = NO; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AsyncReactorExample.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AsyncReactorExample"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -349,6 +489,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + FAF86B412EA1128D00C75689 /* Build configuration list for PBXNativeTarget "AsyncReactorExampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FAF86B3F2EA1128D00C75689 /* Debug */, + FAF86B402EA1128D00C75689 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -360,6 +509,14 @@ minimumVersion = 1.0.0; }; }; + FAF86B0F2EA110EF00C75689 /* XCRemoteSwiftPackageReference "AsyncReactor" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/diamirio/AsyncReactor"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.2.1; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -376,6 +533,16 @@ package = B4ECB0C62A12520700B0CAAE /* XCRemoteSwiftPackageReference "swift-log" */; productName = Logging; }; + FAF86B102EA110EF00C75689 /* AsyncReactor */ = { + isa = XCSwiftPackageProductDependency; + package = FAF86B0F2EA110EF00C75689 /* XCRemoteSwiftPackageReference "AsyncReactor" */; + productName = AsyncReactor; + }; + FAF86B122EA110EF00C75689 /* Reactor */ = { + isa = XCSwiftPackageProductDependency; + package = FAF86B0F2EA110EF00C75689 /* XCRemoteSwiftPackageReference "AsyncReactor" */; + productName = Reactor; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = B4ECB0A42A1250AE00B0CAAE /* Project object */; diff --git a/AsyncReactorExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/AsyncReactorExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ab8ab37..9bc6839 100644 --- a/AsyncReactorExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/AsyncReactorExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,15 @@ { + "originHash" : "b3ab481ab740e4202bf410a7d95d3a8a4a72167916b51f692a0ab5810d776f54", "pins" : [ + { + "identity" : "asyncreactor", + "kind" : "remoteSourceControl", + "location" : "https://github.com/diamirio/AsyncReactor", + "state" : { + "revision" : "e3fde7f9c1fb4db349039796c5c138571c71dadd", + "version" : "1.2.1" + } + }, { "identity" : "swift-log", "kind" : "remoteSourceControl", @@ -10,5 +20,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/AsyncReactorExample.xcodeproj/xcshareddata/xcschemes/AsyncReactorExample.xcscheme b/AsyncReactorExample.xcodeproj/xcshareddata/xcschemes/AsyncReactorExample.xcscheme new file mode 100644 index 0000000..6b1843e --- /dev/null +++ b/AsyncReactorExample.xcodeproj/xcshareddata/xcschemes/AsyncReactorExample.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AsyncReactorExampleTests/AsyncReactorExampleTests.swift b/AsyncReactorExampleTests/AsyncReactorExampleTests.swift new file mode 100644 index 0000000..15f64a0 --- /dev/null +++ b/AsyncReactorExampleTests/AsyncReactorExampleTests.swift @@ -0,0 +1,16 @@ +// +// AsyncReactorExampleTests.swift +// AsyncReactorExampleTests +// +// Created by Alexander Kauer on 16.10.25. +// + +import Testing + +struct AsyncReactorExampleTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/Testplans/AsyncReactorExample.xctestplan b/Testplans/AsyncReactorExample.xctestplan new file mode 100644 index 0000000..91e1162 --- /dev/null +++ b/Testplans/AsyncReactorExample.xctestplan @@ -0,0 +1,30 @@ +{ + "configurations" : [ + { + "id" : "69415521-5607-49D9-A672-63C1061DBD93", + "name" : "Test Scheme Action", + "options" : { + + } + } + ], + "defaultOptions" : { + "performanceAntipatternCheckerEnabled" : true, + "targetForVariableExpansion" : { + "containerPath" : "container:AsyncReactorExample.xcodeproj", + "identifier" : "B4ECB0AB2A1250AE00B0CAAE", + "name" : "AsyncReactorExample" + } + }, + "testTargets" : [ + { + "parallelizable" : true, + "target" : { + "containerPath" : "container:AsyncReactorExample.xcodeproj", + "identifier" : "FAF86B382EA1128C00C75689", + "name" : "AsyncReactorExampleTests" + } + } + ], + "version" : 1 +} From 5b46755df3b6400db13a161154a25ae56c14eed2 Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 14:11:36 +0200 Subject: [PATCH 3/6] Use iOS --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0491b0f..66504b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,5 +24,6 @@ jobs: xcodebuild test \ -project AsyncReactorExample.xcodeproj \ -scheme AsyncReactorExample \ + -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' \ -enableCodeCoverage YES \ | xcpretty && exit ${PIPESTATUS[0]} From 960eaaa37c264c57ed7a76e021bbda8c3d33b53f Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 14:40:45 +0200 Subject: [PATCH 4/6] #Preview refactoring --- AsyncReactorExample/ContentView.swift | 8 +++----- .../Detail/RepositoryDescriptionSheet.swift | 6 ++---- .../Repository/Detail/RepositoryDetailView.swift | 10 ++++------ .../Repository/Search/RepositoryItem.swift | 16 ++++++++++++---- .../Repository/Search/RepositoryList.swift | 16 +++++++--------- .../Repository/Search/RepositorySearchView.swift | 9 +++------ 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/AsyncReactorExample/ContentView.swift b/AsyncReactorExample/ContentView.swift index de85640..b437d48 100644 --- a/AsyncReactorExample/ContentView.swift +++ b/AsyncReactorExample/ContentView.swift @@ -9,10 +9,8 @@ struct ContentView: View { } } -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - NavigationStack { - ContentView() - } +#Preview { + NavigationStack { + ContentView() } } diff --git a/AsyncReactorExample/Features/Repository/Detail/RepositoryDescriptionSheet.swift b/AsyncReactorExample/Features/Repository/Detail/RepositoryDescriptionSheet.swift index 463c8a9..e8a8d44 100644 --- a/AsyncReactorExample/Features/Repository/Detail/RepositoryDescriptionSheet.swift +++ b/AsyncReactorExample/Features/Repository/Detail/RepositoryDescriptionSheet.swift @@ -16,8 +16,6 @@ struct RepositoryDescriptionSheet: View { } } -struct RepositoryDescriptionSheet_Previews: PreviewProvider { - static var previews: some View { - RepositoryDescriptionSheet(description: "Description") - } +#Preview { + RepositoryDescriptionSheet(description: "Description") } diff --git a/AsyncReactorExample/Features/Repository/Detail/RepositoryDetailView.swift b/AsyncReactorExample/Features/Repository/Detail/RepositoryDetailView.swift index 38c08c8..1f10304 100644 --- a/AsyncReactorExample/Features/Repository/Detail/RepositoryDetailView.swift +++ b/AsyncReactorExample/Features/Repository/Detail/RepositoryDetailView.swift @@ -77,11 +77,9 @@ struct RepositoryDetailView: View { } } -struct RepositoryDetailView_Previews: PreviewProvider { - static var previews: some View { - NavigationStack { - RepositoryDetailView(repository: Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultricies nisi elit, non imperdiet nibh euismod in. Sed sit amet tincidunt arcu, nec ornare nisl. Pellentesque sollicitudin quam quis elit tempus, et interdum lorem tristique. Nunc rhoncus ornare efficitur. Ut tellus libero, pretium sit amet dolor a, maximus scelerisque sem. Phasellus posuere aliquam purus. Mauris justo tellus, molestie ut eros at, lobortis luctus nulla. Nullam libero leo, sagittis ac orci nec, viverra faucibus lacus. Phasellus faucibus ipsum nec velit mattis tincidunt. Phasellus nulla mauris, lobortis ac quam non, consectetur viverra odio. Praesent sed venenatis nulla. Praesent non maximus sem, quis ultricies ligula. Aliquam eleifend non velit eget venenatis. Vivamus aliquet, nisl vestibulum cursus aliquet, neque justo feugiat magna, eu suscipit turpis mi id orci.", htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4"))) - } - .environmentObject(RepositoryDetailReactor()) +#Preview { + NavigationStack { + RepositoryDetailView(repository: Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultricies nisi elit, non imperdiet nibh euismod in. Sed sit amet tincidunt arcu, nec ornare nisl. Pellentesque sollicitudin quam quis elit tempus, et interdum lorem tristique. Nunc rhoncus ornare efficitur. Ut tellus libero, pretium sit amet dolor a, maximus scelerisque sem. Phasellus posuere aliquam purus. Mauris justo tellus, molestie ut eros at, lobortis luctus nulla. Nullam libero leo, sagittis ac orci nec, viverra faucibus lacus. Phasellus faucibus ipsum nec velit mattis tincidunt. Phasellus nulla mauris, lobortis ac quam non, consectetur viverra odio. Praesent sed venenatis nulla. Praesent non maximus sem, quis ultricies ligula. Aliquam eleifend non velit eget venenatis. Vivamus aliquet, nisl vestibulum cursus aliquet, neque justo feugiat magna, eu suscipit turpis mi id orci.", htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4"))) } + .environmentObject(RepositoryDetailReactor()) } diff --git a/AsyncReactorExample/Features/Repository/Search/RepositoryItem.swift b/AsyncReactorExample/Features/Repository/Search/RepositoryItem.swift index b249662..756c0ea 100644 --- a/AsyncReactorExample/Features/Repository/Search/RepositoryItem.swift +++ b/AsyncReactorExample/Features/Repository/Search/RepositoryItem.swift @@ -31,8 +31,16 @@ struct RepositoryItem: View { } } -struct RepositoryItem_Previews: PreviewProvider { - static var previews: some View { - RepositoryItem(repository: Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "", htmlUrl: "google.com", watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4"))) - } +#Preview { + RepositoryItem(repository: Repository( + id: 0, + name: "Test Repo", + fullName: "github/Test Repo", + description: "", + htmlUrl: "google.com", + watchersCount: 1, + forks: 1, + visibility: "public", + owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4") + )) } diff --git a/AsyncReactorExample/Features/Repository/Search/RepositoryList.swift b/AsyncReactorExample/Features/Repository/Search/RepositoryList.swift index 485a9c0..31e891f 100644 --- a/AsyncReactorExample/Features/Repository/Search/RepositoryList.swift +++ b/AsyncReactorExample/Features/Repository/Search/RepositoryList.swift @@ -18,13 +18,11 @@ struct RepositoryList: View { } } -struct RepositoryList_Previews: PreviewProvider { - static var previews: some View { - RepositoryList(repositories: [ - Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), - Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), - Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), - Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "", htmlUrl: "google.com",watchersCount: 1, forks: 1,visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")) - ]) - } +#Preview { + RepositoryList(repositories: [ + Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), + Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), + Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "",htmlUrl: "google.com",watchersCount: 1, forks: 1, visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")), + Repository(id: 0, name: "Test Repo", fullName: "github/Test Repo", description: "", htmlUrl: "google.com",watchersCount: 1, forks: 1,visibility: "public", owner: Repository.Owner(avatarUrl: "https://avatars.githubusercontent.com/u/60294?v=4")) + ]) } diff --git a/AsyncReactorExample/Features/Repository/Search/RepositorySearchView.swift b/AsyncReactorExample/Features/Repository/Search/RepositorySearchView.swift index e979d5e..6b92218 100644 --- a/AsyncReactorExample/Features/Repository/Search/RepositorySearchView.swift +++ b/AsyncReactorExample/Features/Repository/Search/RepositorySearchView.swift @@ -78,11 +78,8 @@ struct RepositorySearchView: View { } } -struct RepositorySearchView_Previews: PreviewProvider { - static var previews: some View { - ReactorView(RepositorySearchReactor()) { - RepositorySearchView() - } +#Preview { + ReactorView(RepositorySearchReactor()) { + RepositorySearchView() } } - From 166dd3ff615e7fd64f807f83e67f9d4b8e29e698 Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 15:44:06 +0200 Subject: [PATCH 5/6] Added README --- AsyncReactorExample.xcodeproj/project.pbxproj | 2 ++ README.md | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 README.md diff --git a/AsyncReactorExample.xcodeproj/project.pbxproj b/AsyncReactorExample.xcodeproj/project.pbxproj index bfd0934..807eebb 100644 --- a/AsyncReactorExample.xcodeproj/project.pbxproj +++ b/AsyncReactorExample.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ /* Begin PBXFileReference section */ B4ECB0AC2A1250AE00B0CAAE /* AsyncReactorExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AsyncReactorExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + FA00E2142EA12E0B00F4B75A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; FAF86B392EA1128C00C75689 /* AsyncReactorExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AsyncReactorExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; FAF86B422EA112D500C75689 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; /* End PBXFileReference section */ @@ -64,6 +65,7 @@ isa = PBXGroup; children = ( FAF86B422EA112D500C75689 /* .gitignore */, + FA00E2142EA12E0B00F4B75A /* README.md */, FAF86B452EA112DE00C75689 /* .github */, 82F565F82D74885200C72CA5 /* AsyncReactorExample */, FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */, diff --git a/README.md b/README.md new file mode 100644 index 0000000..de49f62 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# AsyncReactor Example + +This is an example iOS application demonstrating the [AsyncReactor](https://github.com/diamirio/AsyncReactor) framework - a reactive architectural pattern for organizing Swift code with predictable state management. From 868bda2c0e37b9ac7bb6a54361556fe31476f399 Mon Sep 17 00:00:00 2001 From: Alexander Kauer Date: Thu, 16 Oct 2025 16:15:18 +0200 Subject: [PATCH 6/6] Project cleanup --- AsyncReactorExample.xcodeproj/project.pbxproj | 44 ++++++++++++++++--- .../AsyncReactorExample.entitlements | 7 +-- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/AsyncReactorExample.xcodeproj/project.pbxproj b/AsyncReactorExample.xcodeproj/project.pbxproj index 807eebb..c8320dd 100644 --- a/AsyncReactorExample.xcodeproj/project.pbxproj +++ b/AsyncReactorExample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXBuildFile section */ @@ -32,10 +32,26 @@ /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - 82F565F82D74885200C72CA5 /* AsyncReactorExample */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = AsyncReactorExample; sourceTree = ""; }; - FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = AsyncReactorExampleTests; sourceTree = ""; }; - FAF86B452EA112DE00C75689 /* .github */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = .github; sourceTree = ""; }; - FAF86B482EA1134000C75689 /* Testplans */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Testplans; sourceTree = ""; }; + 82F565F82D74885200C72CA5 /* AsyncReactorExample */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = AsyncReactorExample; + sourceTree = ""; + }; + FAF86B3A2EA1128C00C75689 /* AsyncReactorExampleTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = AsyncReactorExampleTests; + sourceTree = ""; + }; + FAF86B452EA112DE00C75689 /* .github */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = .github; + sourceTree = ""; + }; + FAF86B482EA1134000C75689 /* Testplans */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Testplans; + sourceTree = ""; + }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -152,7 +168,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 2600; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 2600; TargetAttributes = { B4ECB0AB2A1250AE00B0CAAE = { CreatedOnToolsVersion = 14.3; @@ -164,7 +180,6 @@ }; }; buildConfigurationList = B4ECB0A72A1250AE00B0CAAE /* Build configuration list for PBXProject "AsyncReactorExample" */; - compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -176,6 +191,7 @@ B4ECB0C62A12520700B0CAAE /* XCRemoteSwiftPackageReference "swift-log" */, FAF86B0F2EA110EF00C75689 /* XCRemoteSwiftPackageReference "AsyncReactor" */, ); + preferredProjectObjectVersion = 77; productRefGroup = B4ECB0AD2A1250AE00B0CAAE /* Products */; projectDirPath = ""; projectRoot = ""; @@ -233,6 +249,7 @@ 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"; @@ -262,6 +279,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -282,6 +300,7 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -291,6 +310,7 @@ 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"; @@ -320,6 +340,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -333,6 +354,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; @@ -346,8 +368,11 @@ CODE_SIGN_ENTITLEMENTS = AsyncReactorExample/AsyncReactorExample.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"AsyncReactorExample/Preview Content\""; + ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; GENERATE_INFOPLIST_FILE = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -383,8 +408,11 @@ CODE_SIGN_ENTITLEMENTS = AsyncReactorExample/AsyncReactorExample.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"AsyncReactorExample/Preview Content\""; + ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; GENERATE_INFOPLIST_FILE = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -419,6 +447,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = U37QH9QGB8; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -448,6 +477,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = U37QH9QGB8; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; diff --git a/AsyncReactorExample/AsyncReactorExample.entitlements b/AsyncReactorExample/AsyncReactorExample.entitlements index f2ef3ae..0c67376 100644 --- a/AsyncReactorExample/AsyncReactorExample.entitlements +++ b/AsyncReactorExample/AsyncReactorExample.entitlements @@ -1,10 +1,5 @@ - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - +