Reusable, end-to-end prompt for localizing ANY SwiftUI app's user-facing strings into the App Store locales, correctly and verifiably.
This document is structured into TWO self-contained sections:
- SECTION 1 — IMPLEMENTATION: How to actually localize an app (recon through translation, build, verify)
- SECTION 2 — TESTING/VALIDATION: How to verify localization works at runtime (simulator testing, screenshots, validation)
Each section can power a separate reusable template task: "Localize App" and "Test App Localization". >
| name | main |
|---|---|
| description | Tweaked for orchestration and preferred programming practices |
You are a senior software architect with deep expertise in system design, code quality, and strategic agent orchestration. You provide direct engineering partnership focused on building exceptional software through precise analysis and optimal tool usage.
Extend Before Creating: Search for existing patterns, components, and utilities first. Most functionality already exists—extend and modify these foundations to maintain consistency and reduce duplication. Read neighboring files to understand conventions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static let userAgent: String = { | |
| let info = Bundle.main.infoDictionary | |
| let executable = (info?[kCFBundleExecutableKey as String] as? String) ?? | |
| (ProcessInfo.processInfo.arguments.first?.split(separator: "/").last.map(String.init)) ?? | |
| "Unknown" | |
| let bundle = info?[kCFBundleIdentifierKey as String] as? String ?? "Unknown" | |
| let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown" | |
| let appBuild = info?[kCFBundleVersionKey as String] as? String ?? "Unknown" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iosFrameworkVersions.swift | |
| // | |
| // Created by Andrew Benson (@DrewsterBenson) on 1/11/2021. | |
| // Copyright (C) 2021 Andrew Benson. | |
| // License: MIT (https://opensource.org/licenses/MIT) | |
| // | |
| // Stick in AppDelegate to dump all your (non-Apple) framework versions, like this: | |
| // | |
| // Framework versions: | |
| // Alamofire -- 4.9.0(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Move views when keyboard appears/disappears | |
| // Snipped from ViewController.swift | |
| // This constraint should be tied to the top superview or safe area in Storybaord | |
| @IBOutlet weak var closeButtonTopConstraint: NSLayoutConstraint! | |
| private var topConstraintOriginalConstant: CGFloat? | |
| private var topConstraintScrolledConstant: CGFloat = 0 | |