NativeAppTemplate-Free-iOS is a modern, comprehensive, and production-ready native iOS app with user authentication and a full CRUD example.
This iOS app is a free version of NativeAppTemplate-iOS (Solo) and NativeAppTemplate-iOS (Team).
The Android version is available here: NativeAppTemplate-Free-Android.
NativeAppTemplate-Free-iOS is configured to connect to api.nativeapptemplate.com.
The Rails 8.1 API backend that powers api.nativeapptemplate.com is open source (MIT):
NativeAppTemplate-Free-iOS uses modern iOS development tools and practices, including:
- 100% Swift
- 100% SwiftUI
- @Observable (iOS 17: streamlined Swift state management)
- SwiftLint
- Simple MVVM Layered Architecture
- Test (Swift Testing)
- Inspired by emitron-iOS
- Onboarding
- Sign Up / Sign In / Sign Out
- Email Confirmation
- Forgot Password
- CRUD Operations for Shops (Create/Read/Update/Delete)
- CRUD Operations for Shops' Nested Resource, Item Tags (Create/Read/Update/Delete)
- Force App Version Update
- Force Privacy Policy Version Update
- Force Terms of Use Version Update
- And more!
NFC tag writing and background tag reading were part of v1 and have been removed from the current version. The full NFC implementation remains available in the v1-with-nfc branch.
The full versions (NativeAppTemplate-iOS (Solo) and NativeAppTemplate-iOS (Team)) include additional advanced features:
- URL Path-Based Multitenancy (prepends
/:account_id/to URLs) - User Invitation to Organizations
- Role-Based Permissions and Access Control
- Organization Switching UI
- Push Notifications via APNs
- iPhone — iOS 26.2+, Portrait mode, Full screen
- iPad — iOS 26.2+, Portrait mode, Full screen
- Mac — Designed for iPad
To get started, clone this repository:
git clone https://github.com/nativeapptemplate/NativeAppTemplate-Free-iOS.gitTo run this app successfully, ensure you have:
- An iOS device or emulator with iOS version 26.2 or higher
To connect to a local API server, set these env vars on the Xcode scheme (Edit Scheme → Run → Arguments → Environment Variables):
NATIVEAPPTEMPLATE_API_SCHEME = http
NATIVEAPPTEMPLATE_API_DOMAIN = <your-lan-ip>
NATIVEAPPTEMPLATE_API_PORT = 3000
Note: Never use
127.0.0.1,localhost, or0.0.0.0forNATIVEAPPTEMPLATE_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:
git restore --source=HEAD --staged --worktree NativeAppTemplate.xcodeproj/xcshareddata/xcschemes/NativeAppTemplate.xcschemeDebug 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.
SwiftLint runs as part of the build process in Xcode, and errors/warnings are surfaced in Xcode as well. Please ensure that you run SwiftLint before submitting a pull request.
To install SwiftLint using homebrew:
$ brew install swiftlintXcode will automatically run SwiftLint if it is installed.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines on reporting issues, proposing changes, and submitting pull requests.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
If you discover a security vulnerability, please follow the disclosure process in SECURITY.md. Do not open public issues for security concerns.
This project is licensed under the MIT License — see LICENSE for details.

