From 3d311fddb1053cc0e79380177dd4db4811f5315b Mon Sep 17 00:00:00 2001 From: dadachi Date: Wed, 10 Jun 2026 16:09:42 +0900 Subject: [PATCH 1/3] Fix list reload blink and bump to 3.2.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ShopListView and ItemTagListView flashed a full-screen LoadingView whenever they re-appeared (returning to a tab, popping back from a detail). Each .task/onChange reload sets the view-model state to .loading, which swapped already-populated content for the spinner and back — a visible blink. This makes .loading keep existing content on screen and only show LoadingView on a true cold start (.initial, or .loading with no data yet). Background refreshes now update in place. Ports the relevant subset of nativeapptemplate/NativeAppTemplate-iOS#87 — only the list views that exist in this substrate (no AccountListView here). - Blink fix in ShopListView, ItemTagListView - Bump to 3.2.4 (build 14) and update CHANGELOG - README: document the now-shared scheme (per #69) and the git update-index --skip-worktree approach for keeping a personal LAN IP out of git, replacing the stale "uncheck Shared" instructions Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 5 +++++ NativeAppTemplate.xcodeproj/project.pbxproj | 8 ++++---- NativeAppTemplate/UI/Shop List/ShopListView.swift | 10 +++++++++- .../Shop Settings/ItemTag List/ItemTagListView.swift | 10 +++++++++- README.md | 8 ++++++-- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec40b9..259af5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.2.4] - 2026-06-10 + +### Fixed +- List views (`ShopListView`, `ItemTagListView`) no longer blink a full-screen `LoadingView` over already-loaded data when they re-appear (returning to a tab, popping back from a detail). The `.loading` state now keeps existing content on screen and only shows `LoadingView` on a true cold start (`.initial`, or `.loading` with no data yet) + ## [3.2.3] - 2026-05-08 ### Fixed diff --git a/NativeAppTemplate.xcodeproj/project.pbxproj b/NativeAppTemplate.xcodeproj/project.pbxproj index d7efb6a..ec88050 100644 --- a/NativeAppTemplate.xcodeproj/project.pbxproj +++ b/NativeAppTemplate.xcodeproj/project.pbxproj @@ -1197,7 +1197,7 @@ CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_ASSET_PATHS = "\"NativeAppTemplate/Preview Content\""; ENABLE_PREVIEWS = YES; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1209,7 +1209,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.2.3; + MARKETING_VERSION = 3.2.4; PRODUCT_BUNDLE_IDENTIFIER = "com.nativeapptemplate.NativeAppTemplateFree.ios${SAMPLE_CODE_DISAMBIGUATOR}"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = "com.nativeapptemplate.NativeAppTemplateFree.ios${SAMPLE_CODE_DISAMBIGUATOR}"; PRODUCT_NAME = NativeAppTemplate; @@ -1233,7 +1233,7 @@ CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_ASSET_PATHS = "\"NativeAppTemplate/Preview Content\""; ENABLE_PREVIEWS = YES; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -1245,7 +1245,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.2.3; + MARKETING_VERSION = 3.2.4; PRODUCT_BUNDLE_IDENTIFIER = "com.nativeapptemplate.NativeAppTemplateFree.ios${SAMPLE_CODE_DISAMBIGUATOR}"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = "com.nativeapptemplate.NativeAppTemplateFree.ios${SAMPLE_CODE_DISAMBIGUATOR}"; PRODUCT_NAME = NativeAppTemplate; diff --git a/NativeAppTemplate/UI/Shop List/ShopListView.swift b/NativeAppTemplate/UI/Shop List/ShopListView.swift index b5321b2..bc0ef5a 100644 --- a/NativeAppTemplate/UI/Shop List/ShopListView.swift +++ b/NativeAppTemplate/UI/Shop List/ShopListView.swift @@ -63,8 +63,16 @@ private extension ShopListView { var contentView: some View { @ViewBuilder var contentView: some View { switch viewModel.state { - case .initial, .loading: + case .initial: LoadingView() + case .loading: + // Keep showing the existing list while refreshing so re-appearance + // reloads don't blink a full-screen LoadingView over loaded data. + if viewModel.isEmpty { + LoadingView() + } else { + shopListView + } case .hasData: shopListView case .failed: diff --git a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift index 9901a98..943ddf2 100644 --- a/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift +++ b/NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListView.swift @@ -31,8 +31,16 @@ private extension ItemTagListView { LoadingView() } else { switch viewModel.state { - case .initial, .loading: + case .initial: LoadingView() + case .loading: + // Keep showing the existing list while refreshing so re-appearance + // reloads don't blink a full-screen LoadingView over loaded data. + if viewModel.isEmpty { + LoadingView() + } else { + itemTagListView + } case .hasData: itemTagListView case .failed: diff --git a/README.md b/README.md index 188b2f3..77a0d96 100644 --- a/README.md +++ b/README.md @@ -149,12 +149,16 @@ NATIVEAPPTEMPLATE_API_PORT = 3000 > **Note:** Never use `127.0.0.1`, `localhost`, or `0.0.0.0` for `NATIVEAPPTEMPLATE_API_DOMAIN` — those resolve to the iOS Simulator/device itself, not your Mac. Use your Mac's LAN IP (e.g., `192.168.1.6`) so the simulator or a physical device can reach the API server. -Keep the scheme in `xcuserdata` (per-developer, gitignored), not `xcshareddata`. In Xcode, open **Product → Scheme → Manage Schemes…**, find `NativeAppTemplate`, and **uncheck "Shared"**. This moves the scheme (with your local env vars) to `xcuserdata/.xcuserdatad/xcschemes/` so your API settings are not committed. If Xcode staged a deletion of the previously shared scheme, restore it with: +The `NativeAppTemplate` scheme is **shared** (committed at `NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme`) so fresh clones and generated copies open with these env vars already wired — without it, Xcode's auto-created default omits the injection and Debug builds silently fall back to `https://api.nativeapptemplate.com`. The committed `NATIVEAPPTEMPLATE_API_DOMAIN` is just an example value (`192.168.1.11`); edit it to your own Mac's LAN IP. + +Because the scheme is committed, keep your personal LAN IP out of git. After editing the value locally, tell git to ignore your changes to the file: ```bash -git restore --source=HEAD --staged --worktree NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme +git update-index --skip-worktree NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme ``` +To resume tracking it (e.g. before intentionally committing a scheme change), run `git update-index --no-skip-worktree `. + Debug builds read these at launch via `ProcessInfo.processInfo.environment` in `Constants.swift`; when unset, they fall back to the production defaults (`https://api.nativeapptemplate.com`). Release builds always use the production defaults. In practice, only Xcode injects these env vars (via the scheme), so a Debug build launched any other way — tapped from the Home Screen (SpringBoard), opened on a physical device after Xcode disconnects, etc. — sees them unset and falls through to the production defaults. The hardcoded fallbacks are what keep the app working without Xcode in the loop. From 8599ce49a4622ca8cbe0c437a6a5c2301a14a3a2 Mon Sep 17 00:00:00 2001 From: dadachi Date: Wed, 10 Jun 2026 16:11:12 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Bump=20project=20objectVersion=2090=20?= =?UTF-8?q?=E2=86=92=20100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xcode upgraded the project format on open. Matches upstream NativeAppTemplate-iOS#87. Co-Authored-By: Claude Opus 4.8 (1M context) --- NativeAppTemplate.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NativeAppTemplate.xcodeproj/project.pbxproj b/NativeAppTemplate.xcodeproj/project.pbxproj index ec88050..e490251 100644 --- a/NativeAppTemplate.xcodeproj/project.pbxproj +++ b/NativeAppTemplate.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 90; + objectVersion = 100; objects = { /* Begin PBXBuildFile section */ @@ -868,7 +868,7 @@ 0182D36E25B258A7001E881D /* XCRemoteSwiftPackageReference "KeychainAccess" */, 012009F6299F1E190078A1F9 /* XCRemoteSwiftPackageReference "swift-collections" */, ); - preferredProjectObjectVersion = 90; + preferredProjectObjectVersion = 100; productRefGroup = 011F6DEE259EF16400BED22E /* Products */; projectDirPath = ""; projectRoot = ""; From bf3b1eb1106791ea4e6d7e2fe52c0085e4ac63f8 Mon Sep 17 00:00:00 2001 From: dadachi Date: Wed, 10 Jun 2026 17:16:50 +0900 Subject: [PATCH 3/3] Scheme: set example API domain to 192.168.1.21 Match upstream NativeAppTemplate-iOS#87 and keep the README example value in sync. This is an example placeholder; developers override it locally and skip-worktree the scheme. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../xcshareddata/xcschemes/NativeAppTemplate.xcscheme | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme b/NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme index c58749f..12d6334 100644 --- a/NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme +++ b/NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme @@ -75,7 +75,7 @@ **Note:** Never use `127.0.0.1`, `localhost`, or `0.0.0.0` for `NATIVEAPPTEMPLATE_API_DOMAIN` — those resolve to the iOS Simulator/device itself, not your Mac. Use your Mac's LAN IP (e.g., `192.168.1.6`) so the simulator or a physical device can reach the API server. -The `NativeAppTemplate` scheme is **shared** (committed at `NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme`) so fresh clones and generated copies open with these env vars already wired — without it, Xcode's auto-created default omits the injection and Debug builds silently fall back to `https://api.nativeapptemplate.com`. The committed `NATIVEAPPTEMPLATE_API_DOMAIN` is just an example value (`192.168.1.11`); edit it to your own Mac's LAN IP. +The `NativeAppTemplate` scheme is **shared** (committed at `NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcscheme`) so fresh clones and generated copies open with these env vars already wired — without it, Xcode's auto-created default omits the injection and Debug builds silently fall back to `https://api.nativeapptemplate.com`. The committed `NATIVEAPPTEMPLATE_API_DOMAIN` is just an example value (`192.168.1.21`); edit it to your own Mac's LAN IP. Because the scheme is committed, keep your personal LAN IP out of git. After editing the value locally, tell git to ignore your changes to the file: