From 8a718b3b3e78476051e5c02acb36d942792f9d05 Mon Sep 17 00:00:00 2001 From: sirily11 <32106111+sirily11@users.noreply.github.com> Date: Thu, 21 May 2026 22:15:25 +0800 Subject: [PATCH] fix: xcode ci build error --- .github/workflows/test.yaml | 34 +++++++++++++++++++++++++++ RxCodeMobile/Views/SessionsList.swift | 12 +++++----- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bb3eb33b..f294a8a0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -100,3 +100,37 @@ jobs: -destination platform=macOS \ CODE_SIGNING_ALLOWED=NO \ build | xcpretty + + build-mobile: + name: xcodebuild build (RxCodeMobile) + runs-on: self-hosted + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Install xcpretty + run: gem install xcpretty + + - name: Build mobile app (ad-hoc signing) + run: | + # The iOS app embeds extensions (notification service, widget), so + # CODE_SIGNING_ALLOWED=NO won't link a valid .app. Ad-hoc sign the + # device build instead — no certificate or provisioning profile + # required, just enough to produce a verifiable bundle. + set -o pipefail && xcodebuild \ + -project RxCode.xcodeproj \ + -scheme RxCodeMobile \ + -configuration Debug \ + -destination 'generic/platform=iOS' \ + CODE_SIGN_IDENTITY="-" \ + CODE_SIGN_STYLE=Manual \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=YES \ + AD_HOC_CODE_SIGNING_ALLOWED=YES \ + build | xcpretty diff --git a/RxCodeMobile/Views/SessionsList.swift b/RxCodeMobile/Views/SessionsList.swift index 14d4250e..15ffe726 100644 --- a/RxCodeMobile/Views/SessionsList.swift +++ b/RxCodeMobile/Views/SessionsList.swift @@ -694,8 +694,8 @@ extension MobileAppState { #Preview("Sessions List") { let state = MobileAppState.preview let projectID = state.projects.first!.id - - return NavigationStack { + + NavigationStack { SessionsList( projectID: projectID, selected: .constant(nil) @@ -708,8 +708,8 @@ extension MobileAppState { let state = MobileAppState.preview let projectID = state.projects.first!.id let selectedID = state.sessions.first?.id - - return NavigationStack { + + NavigationStack { SessionsList( projectID: projectID, selected: .constant(selectedID), @@ -722,8 +722,8 @@ extension MobileAppState { #Preview("Sessions List - Empty") { let state = MobileAppState.previewEmpty let projectID = state.projects.first!.id - - return NavigationStack { + + NavigationStack { SessionsList( projectID: projectID, selected: .constant(nil)