Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions NativeAppTemplate.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 90;
objectVersion = 100;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -868,7 +868,7 @@
0182D36E25B258A7001E881D /* XCRemoteSwiftPackageReference "KeychainAccess" */,
012009F6299F1E190078A1F9 /* XCRemoteSwiftPackageReference "swift-collections" */,
);
preferredProjectObjectVersion = 90;
preferredProjectObjectVersion = 100;
productRefGroup = 011F6DEE259EF16400BED22E /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "NATIVEAPPTEMPLATE_API_DOMAIN"
value = "192.168.1.11"
value = "192.168.1.21"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
Expand Down
10 changes: 9 additions & 1 deletion NativeAppTemplate/UI/Shop List/ShopListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<user>.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.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:

```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 <same path>`.

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.
Expand Down
Loading