[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D1ZWMPKTNSKBA8AN23B6KF":3,"skill-same:01M6D1ZWMPKTNSKBA8AN23B6KF":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":49,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6D1ZWMPKTNSKBA8AN23B6KF","mobile-ios",null,"Native iOS with Swift and SwiftUI: state with Observation, navigation stacks, lists, concurrency with async\u002Fawait, actors and MainActor, networking with URLSession, persistence with SwiftData or Core Data, the Keychain, app lifecycle and background tasks, permissions and privacy manifests, accessibility, testing, and build configurations. Read when the project is a native iOS app.","enowdev\u002Fenowxcli","enowdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179420349?v=4","01M6D1MVX2KC0X3Z9NESE7P22K","Enow Dev.","01M6D1MW1FMZGBDKWAJY4GQX81",67,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fmobile-ios\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"mobile ios","mobile","ios","lifecycle","background tasks","project","ios app","async","read","swiftui","keychain","testing","concurrency","data","state","permissions","networking","core","tasks","swift","2026-11-10 10:12:30",false,"---\nname: mobile-ios\ndescription: \"Native iOS with Swift and SwiftUI: state with Observation, navigation stacks, lists, concurrency with async\u002Fawait, actors and MainActor, networking with URLSession, persistence with SwiftData or Core Data, the Keychain, app lifecycle and background tasks, permissions and privacy manifests, accessibility, testing, and build configurations. Read when the project is a native iOS app.\"\n---\n\n# Native iOS with Swift and SwiftUI\n\nThe naive iOS app: `NavigationView` and `ObservableObject` copied from old\ntutorials, `DispatchQueue.main.async` sprinkled until the warnings stop, a\nfetch in `onAppear` that reruns on every return and is never cancelled, the\ntoken in `UserDefaults`, dates that fail to decode because the server sends\nfractional seconds, no privacy manifest, and a crash on the first camera\nrequest because the usage string is missing. This skill is current SwiftUI\npractice for iOS 17 and later. Conventions in `mobile-ux`, sync in\n`mobile-data`, signing and stores in `mobile-release`.\n\n## 1. Targets and project\n\n- SwiftUI first; UIKit through `UIViewRepresentable` and\n  `UIViewControllerRepresentable` where SwiftUI falls short,\n  `UIHostingController` to bring SwiftUI into a UIKit app.\n- Deployment target iOS 17 for a new app (Observation, SwiftData,\n  `ContentUnavailableView`); newer APIs behind `if #available(iOS 26, *)`.\n- Swift 6 language mode with complete concurrency checking. Xcode 26\n  projects default to main-actor isolation (Swift 6.2 approachable\n  concurrency); keep the settings of a project you did not create.\n- Features in local Swift packages (faster builds, working previews); new\n  dependencies through Swift Package Manager, since CocoaPods trunk is\n  scheduled to become read-only in December 2026.\n- Environments as configurations and schemes, values in xcconfig files read\n  through Info.plist (`APIBaseURL = $(API_BASE_URL)`):\n\n```\n\u002F\u002F Config\u002FStaging.xcconfig; \"\u002F$()\u002F\" stops \"\u002F\u002F\" starting a comment\nAPI_BASE_URL = https:\u002F$()\u002Fapi.staging.acme.com\nPRODUCT_BUNDLE_IDENTIFIER = com.acme.app.staging\n```\n\n## 2. State with Observation\n\n```swift\n@MainActor @Observable\nfinal class OrdersModel {\n  private(set) var orders: [Order] = []\n  private(set) var failure: Error?\n  private let api: OrdersAPI\n  init(api: OrdersAPI) { self.api = api }\n\n  func load() async {\n    do { orders = try await api.orders(); failure = nil }\n    catch is CancellationError {}\n    catch { failure = error }\n  }\n}\n\nstruct OrdersView: View {\n  @State private var model: OrdersModel\n  init(api: OrdersAPI) { _model = State(initialValue: OrdersModel(api: api)) }\n\n  var body: some View {\n    List(model.orders) { order in\n      NavigationLink(value: Route.order(order.id)) { OrderRow(order: order) }\n    }\n    .task { await model.load() }       \u002F\u002F cancelled when the view goes away\n    .refreshable { await model.load() }\n  }\n}\n```\n\n- `@State` owns what the view creates; `@Bindable` for bindings into an\n  observable passed in; `@Environment(Model.self)` for app-wide models.\n  Observation tracks only the properties `body` reads.\n- A model where there is loading, validation or logic to test; plain\n  `@State` otherwise. `ObservableObject` in existing code: migrated a\n  feature at a time. `@SceneStorage` for per-window UI state.\n\n## 3. Navigation\n\n```swift\nenum Route: Hashable { case order(Order.ID), settings }\n@State private var path: [Route] = []\n\nNavigationStack(path: $path) {\n  OrdersView(api: api)\n    .navigationDestination(for: Route.self) { route in\n      switch route { case .order(let id): OrderDetailView(id: id); case .settings: SettingsView() }\n    }\n}\n.onOpenURL { url in if let route = Route(url: url) { path = [route] } }\n```\n\n- One `NavigationStack` per tab; `NavigationSplitView` on iPad. Sheets with\n  `.presentationDetents([.medium, .large])` and\n  `.interactiveDismissDisabled(hasChanges)`.\n- Universal Links: Associated Domains (`applinks:acme.com`) plus\n  `\u002F.well-known\u002Fapple-app-site-association` on the server.\n\n## 4. Lists and the cost of body\n\n- `List` for standard lists (reuse, swipe actions, edit mode); `LazyVStack`\n  in a `ScrollView` for custom ones. `ForEach` over stable ids: never\n  indices of a mutable array, never `\\.self` on values that repeat.\n- `body` runs often: no formatters built in it (`Text(date, format:\n  .dateTime.day().month())`), no sorting of large arrays, no I\u002FO. No\n  `AnyView`; an `if` changes identity, a modifier value keeps it.\n- `AsyncImage` has no disk cache: feeds use Nuke or Kingfisher. Debug with\n  `let _ = Self._printChanges()` in `body` (`mobile-performance`).\n\n## 5. Concurrency\n\n- `.task` and `.task(id:)` for work tied to a view (cancelled and restarted\n  for you); `Task {}` inherits the actor; `Task.detached` almost never.\n- `@MainActor` on UI models; actors for shared mutable state; `Sendable`\n  across boundaries (`@unchecked Sendable` only with a lock and a comment).\n- Under approachable concurrency, nonisolated async functions run on the\n  caller's actor; mark heavy work `@concurrent` to take it off the main one.\n- `async let` for a fixed set of parallel calls, `withThrowingTaskGroup` for\n  a dynamic set; `try Task.checkCancellation()` in long loops;\n  `CancellationError` is never shown to the user.\n- One token refresh for all callers, despite actor reentrancy:\n\n```swift\nactor TokenProvider {\n  private var token: Token?\n  private var refreshing: Task\u003CToken, Error>?\n\n  func current() async throws -> Token {\n    if let token, !token.expiresSoon { return token }\n    if let refreshing { return try await refreshing.value }\n    let task = Task { try await refreshToken() }\n    refreshing = task\n    defer { refreshing = nil }\n    let fresh = try await task.value\n    token = fresh\n    return fresh\n  }\n}\n```\n\n## 6. Networking\n\n- `let (data, response) = try await session.data(for: request)`, status\n  checked, then decoded. One configured session:\n  `timeoutIntervalForRequest = 20` (default 60), `waitsForConnectivity =\n  true` for requests that may wait (bounded by `timeoutIntervalForResource`),\n  `allowsConstrainedNetworkAccess = false` for optional heavy downloads.\n- `.iso8601` rejects fractional seconds; accept both:\n\n```swift\ndecoder.dateDecodingStrategy = .custom { decoder in\n  let text = try decoder.singleValueContainer().decode(String.self)\n  if let date = try? Date.ISO8601FormatStyle(includingFractionalSeconds: true).parse(text) { return date }\n  return try Date.ISO8601FormatStyle().parse(text)\n}\n```\n\n- Errors mapped in one place (`URLError`, HTTP status, decoding); retries\n  only for idempotent requests (`mobile-data`). Large transfers on a\n  background session continue while suspended. No `NSAllowsArbitraryLoads`.\n\n## 7. Persistence and the Keychain\n\n| Data | Where |\n|---|---|\n| Records used offline | SwiftData; Core Data or GRDB for heavy queries or older targets |\n| Small preferences | `UserDefaults`: never secrets or large data |\n| Files the app manages | Application Support; re-downloadable ones in Caches (purgeable) |\n| Tokens, secrets | Keychain |\n\n- SwiftData: `.modelContainer(for: Draft.self)`, `@Query(sort:\n  \\Draft.updatedAt, order: .reverse)`, `context.insert`, `try\n  context.save()` at explicit points. Schema changes through\n  `VersionedSchema` and a `SchemaMigrationPlan`, tested from every shipped\n  version. With CloudKit: no unique attributes, every property optional or\n  defaulted, relationships optional.\n\n```swift\nfunc saveRefreshToken(_ token: String) throws {\n  let query: [String: Any] = [kSecClass as String: kSecClassGenericPassword,\n                              kSecAttrService as String: \"com.acme.app.auth\",\n                              kSecAttrAccount as String: \"refresh\"]\n  SecItemDelete(query as CFDictionary)\n  var item = query\n  item[kSecValueData as String] = Data(token.utf8)\n  item[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly\n  let status = SecItemAdd(item as CFDictionary, nil)\n  guard status == errSecSuccess else { throw KeychainError(status: status) }\n}\n```\n\n- `AfterFirstUnlockThisDeviceOnly` when background work needs the token,\n  `WhenUnlockedThisDeviceOnly` otherwise; `ThisDeviceOnly` keeps it out of\n  backups. Keychain items survive deleting the app: on the first launch\n  after install (no flag in `UserDefaults` yet), delete stale ones.\n\n## 8. Lifecycle, background work and push\n\n- `scenePhase`: `.background` saves and stops work, `.active` refreshes\n  stale data; `.inactive` (the app switcher) is not background. A save that\n  must finish runs inside `beginBackgroundTask` (about 30 seconds).\n- BGTaskScheduler: app refresh (about 30 seconds, when the system chooses\n  from usage) and processing tasks (minutes, usually idle and charging).\n  Identifiers in `BGTaskSchedulerPermittedIdentifiers`, Background Modes on,\n  `.backgroundTask(.appRefresh(\"com.acme.refresh\")) { await sync() }`, the\n  next request submitted each run. iOS 26 adds\n  `BGContinuedProcessingTaskRequest` for user-started work with progress.\n- Push: APNs with a token-based `.p8` key on the server;\n  `requestAuthorization(options: [.alert, .badge, .sound])` at a sensible\n  moment, or `.provisional`; the device token sent on every launch (it\n  changes); taps routed through `UNUserNotificationCenterDelegate` to a deep\n  link. Silent pushes are throttled: never the only way data arrives.\n\n## 9. Permissions and privacy\n\n- Every protected resource needs its Info.plist string\n  (`NSCameraUsageDescription`, `NSLocationWhenInUseUsageDescription`,\n  `NSMicrophoneUsageDescription`, `NSFaceIDUsageDescription`); without it\n  the app crashes on the request.\n- `PrivacyInfo.xcprivacy` for the app and each SDK: data collected,\n  tracking domains, and a reason per required-reason API under\n  `NSPrivacyAccessedAPITypes`: `CA92.1` (`UserDefaults`), `C617.1` (file\n  timestamps), `35F9.1` (system boot time), `E174.1` (disk space). The\n  Organizer builds the combined privacy report from an archive.\n- App Tracking Transparency only when data is linked with other companies'\n  apps or sites for ads or brokers, never for first-party analytics.\n\n## 10. Accessibility\n\n- Text styles for all text; `@ScaledMetric var icon = 24` beside text;\n  `dynamicTypeSize.isAccessibilitySize` or `ViewThatFits` to stack rows at\n  the largest sizes.\n- VoiceOver: `.accessibilityLabel` on icon-only controls,\n  `.accessibilityAddTraits(.isHeader)`, `.accessibilityElement(children:\n  .combine)` for rows, `.accessibilityAction(named:)`, `Image(decorative:)`\n  for decoration.\n- `accessibilityReduceMotion` swaps movement for fades (`motion-stacks`);\n  previews for empty, error, dark and `.dynamicTypeSize(.accessibility3)`.\n\n## 11. Testing\n\n```swift\nimport Testing\n@testable import Acme\n\n@MainActor struct OrdersModelTests {\n  @Test func showsOrdersAfterLoad() async {\n    let model = OrdersModel(api: StubOrdersAPI(orders: [.sample]))\n    await model.load()\n    #expect(model.orders.count == 1 && model.failure == nil)\n  }\n}\n```\n\n- Swift Testing for new unit tests (`#require`, `@Test(arguments:)`);\n  XCTest for UI and performance tests; HTTP stubbed with `URLProtocol`.\n- XCUITest for a few journeys: elements by `accessibilityIdentifier`, a\n  scenario passed in `app.launchEnvironment`, `waitForExistence(timeout: 5)`,\n  and `try app.performAccessibilityAudit()` on key screens.\n\n## Check it\n\n```bash\nxcrun simctl list devices available\nxcodebuild -scheme Acme -destination 'platform=iOS Simulator,name=iPhone 17' build test | xcbeautify\nswift test --package-path Packages\u002FFeatures\nxcrun simctl openurl booted \"acme:\u002F\u002Forders\u002F42\"\n```\n\n- Once with the Thread Sanitizer on; Simulate Memory Warning on heavy\n  screens; no new concurrency warnings in the Swift 6 build.\n\n## Avoid\n\n`NavigationView`; new `ObservableObject` code in an Observation app; work in\n`onAppear` without cancellation; `DispatchQueue.main.async` to silence the\nchecker; `Task.detached` by habit; formatters or sorting in `body`;\n`AnyView`; tokens in `UserDefaults`; missing usage strings or privacy\nmanifest entries; ATT prompts without tracking; background work assumed to\nrun on time.\n","# Native iOS with Swift and SwiftUI\n\nThe naive iOS app: `NavigationView` and `ObservableObject` copied from old\ntutorials, `DispatchQueue.main.async` sprinkled until the warnings stop, a\nfetch in `onAppear` that reruns on every return and is never cancelled, the\ntoken in `UserDefaults`, dates that fail to decode because the server sends\nfractional seconds, no privacy manifest, and a crash on the first camera\nrequest because the usage string is missing. This skill is current SwiftUI\npractice for iOS 17 and later. Conventions in `mobile-ux`, sync in\n`mobile-data`, signing and stores in `mobile-release`.\n\n## 1. Targets and project\n\n- SwiftUI first; UIKit through `UIViewRepresentable` and\n  `UIViewControllerRepresentable` where SwiftUI falls short,\n  `UIHostingController` to bring SwiftUI into a UIKit app.\n- Deployment target iOS 17 for a new app (Observation, SwiftData,\n  `ContentUnavailableView`); newer APIs behind `if #available(iOS 26, *)`.\n- Swift 6 language mode with complete concurrency checking. Xcode 26\n  projects default to main-actor isolation (Swift 6.2 approachable\n  concurrency); keep the settings of a project you did not create.\n- Features in local Swift packages (faster builds, working previews); new\n  dependencies through Swift Package Manager, since CocoaPods trunk is\n  scheduled to become read-only in December 2026.\n- Environments as configurations and schemes, values in xcconfig files read\n  through Info.plist (`APIBaseURL = $(API_BASE_URL)`):\n\n```\n\u002F\u002F Config\u002FStaging.xcconfig; \"\u002F$()\u002F\" stops \"\u002F\u002F\" starting a comment\nAPI_BASE_URL = https:\u002F$()\u002Fapi.staging.acme.com\nPRODUCT_BUNDLE_IDENTIFIER = com.acme.app.staging\n```\n\n## 2. State with Observation\n\n```swift\n@MainActor @Observable\nfinal class OrdersModel {\n  private(set) var orders: [Order] = []\n  private(set) var failure: Error?\n  private let api: OrdersAPI\n  init(api: OrdersAPI) { self.api = api }\n\n  func load() async {\n    do { orders = try await api.orders(); failure = nil }\n    catch is CancellationError {}\n    catch { failure = error }\n  }\n}\n\nstruct OrdersView: View {\n  @State private var model: OrdersModel\n  init(api: OrdersAPI) { _model = State(initialValue: OrdersModel(api: api)) }\n\n  var body: some View {\n    List(model.orders) { order in\n      NavigationLink(value: Route.order(order.id)) { OrderRow(order: order) }\n    }\n    .task { await model.load() }       \u002F\u002F cancelled when the view goes away\n    .refreshable { await model.load() }\n  }\n}\n```\n\n- `@State` owns what the view creates; `@Bindable` for bindings into an\n  observable passed in; `@Environment(Model.self)` for app-wide models.\n  Observation tracks only the properties `body` reads.\n- A model where there is loading, validation or logic to test; plain\n  `@State` otherwise. `ObservableObject` in existing code: migrated a\n  feature at a time. `@SceneStorage` for per-window UI state.\n\n## 3. Navigation\n\n```swift\nenum Route: Hashable { case order(Order.ID), settings }\n@State private var path: [Route] = []\n\nNavigationStack(path: $path) {\n  OrdersView(api: api)\n    .navigationDestination(for: Route.self) { route in\n      switch route { case .order(let id): OrderDetailView(id: id); case .settings: SettingsView() }\n    }\n}\n.onOpenURL { url in if let route = Route(url: url) { path = [route] } }\n```\n\n- One `NavigationStack` per tab; `NavigationSplitView` on iPad. Sheets with\n  `.presentationDetents([.medium, .large])` and\n  `.interactiveDismissDisabled(hasChanges)`.\n- Universal Links: Associated Domains (`applinks:acme.com`) plus\n  `\u002F.well-known\u002Fapple-app-site-association` on the server.\n\n## 4. Lists and the cost of body\n\n- `List` for standard lists (reuse, swipe actions, edit mode); `LazyVStack`\n  in a `ScrollView` for custom ones. `ForEach` over stable ids: never\n  indices of a mutable array, never `\\.self` on values that repeat.\n- `body` runs often: no formatters built in it (`Text(date, format:\n  .dateTime.day().month())`), no sorting of large arrays, no I\u002FO. No\n  `AnyView`; an `if` changes identity, a modifier value keeps it.\n- `AsyncImage` has no disk cache: feeds use Nuke or Kingfisher. Debug with\n  `let _ = Self._printChanges()` in `body` (`mobile-performance`).\n\n## 5. Concurrency\n\n- `.task` and `.task(id:)` for work tied to a view (cancelled and restarted\n  for you); `Task {}` inherits the actor; `Task.detached` almost never.\n- `@MainActor` on UI models; actors for shared mutable state; `Sendable`\n  across boundaries (`@unchecked Sendable` only with a lock and a comment).\n- Under approachable concurrency, nonisolated async functions run on the\n  caller's actor; mark heavy work `@concurrent` to take it off the main one.\n- `async let` for a fixed set of parallel calls, `withThrowingTaskGroup` for\n  a dynamic set; `try Task.checkCancellation()` in long loops;\n  `CancellationError` is never shown to the user.\n- One token refresh for all callers, despite actor reentrancy:\n\n```swift\nactor TokenProvider {\n  private var token: Token?\n  private var refreshing: Task\u003CToken, Error>?\n\n  func current() async throws -> Token {\n    if let token, !token.expiresSoon { return token }\n    if let refreshing { return try await refreshing.value }\n    let task = Task { try await refreshToken() }\n    refreshing = task\n    defer { refreshing = nil }\n    let fresh = try await task.value\n    token = fresh\n    return fresh\n  }\n}\n```\n\n## 6. Networking\n\n- `let (data, response) = try await session.data(for: request)`, status\n  checked, then decoded. One configured session:\n  `timeoutIntervalForRequest = 20` (default 60), `waitsForConnectivity =\n  true` for requests that may wait (bounded by `timeoutIntervalForResource`),\n  `allowsConstrainedNetworkAccess = false` for optional heavy downloads.\n- `.iso8601` rejects fractional seconds; accept both:\n\n```swift\ndecoder.dateDecodingStrategy = .custom { decoder in\n  let text = try decoder.singleValueContainer().decode(String.self)\n  if let date = try? Date.ISO8601FormatStyle(includingFractionalSeconds: true).parse(text) { return date }\n  return try Date.ISO8601FormatStyle().parse(text)\n}\n```\n\n- Errors mapped in one place (`URLError`, HTTP status, decoding); retries\n  only for idempotent requests (`mobile-data`). Large transfers on a\n  background session continue while suspended. No `NSAllowsArbitraryLoads`.\n\n## 7. Persistence and the Keychain\n\n| Data | Where |\n|---|---|\n| Records used offline | SwiftData; Core Data or GRDB for heavy queries or older targets |\n| Small preferences | `UserDefaults`: never secrets or large data |\n| Files the app manages | Application Support; re-downloadable ones in Caches (purgeable) |\n| Tokens, secrets | Keychain |\n\n- SwiftData: `.modelContainer(for: Draft.self)`, `@Query(sort:\n  \\Draft.updatedAt, order: .reverse)`, `context.insert`, `try\n  context.save()` at explicit points. Schema changes through\n  `VersionedSchema` and a `SchemaMigrationPlan`, tested from every shipped\n  version. With CloudKit: no unique attributes, every property optional or\n  defaulted, relationships optional.\n\n```swift\nfunc saveRefreshToken(_ token: String) throws {\n  let query: [String: Any] = [kSecClass as String: kSecClassGenericPassword,\n                              kSecAttrService as String: \"com.acme.app.auth\",\n                              kSecAttrAccount as String: \"refresh\"]\n  SecItemDelete(query as CFDictionary)\n  var item = query\n  item[kSecValueData as String] = Data(token.utf8)\n  item[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly\n  let status = SecItemAdd(item as CFDictionary, nil)\n  guard status == errSecSuccess else { throw KeychainError(status: status) }\n}\n```\n\n- `AfterFirstUnlockThisDeviceOnly` when background work needs the token,\n  `WhenUnlockedThisDeviceOnly` otherwise; `ThisDeviceOnly` keeps it out of\n  backups. Keychain items survive deleting the app: on the first launch\n  after install (no flag in `UserDefaults` yet), delete stale ones.\n\n## 8. Lifecycle, background work and push\n\n- `scenePhase`: `.background` saves and stops work, `.active` refreshes\n  stale data; `.inactive` (the app switcher) is not background. A save that\n  must finish runs inside `beginBackgroundTask` (about 30 seconds).\n- BGTaskScheduler: app refresh (about 30 seconds, when the system chooses\n  from usage) and processing tasks (minutes, usually idle and charging).\n  Identifiers in `BGTaskSchedulerPermittedIdentifiers`, Background Modes on,\n  `.backgroundTask(.appRefresh(\"com.acme.refresh\")) { await sync() }`, the\n  next request submitted each run. iOS 26 adds\n  `BGContinuedProcessingTaskRequest` for user-started work with progress.\n- Push: APNs with a token-based `.p8` key on the server;\n  `requestAuthorization(options: [.alert, .badge, .sound])` at a sensible\n  moment, or `.provisional`; the device token sent on every launch (it\n  changes); taps routed through `UNUserNotificationCenterDelegate` to a deep\n  link. Silent pushes are throttled: never the only way data arrives.\n\n## 9. Permissions and privacy\n\n- Every protected resource needs its Info.plist string\n  (`NSCameraUsageDescription`, `NSLocationWhenInUseUsageDescription`,\n  `NSMicrophoneUsageDescription`, `NSFaceIDUsageDescription`); without it\n  the app crashes on the request.\n- `PrivacyInfo.xcprivacy` for the app and each SDK: data collected,\n  tracking domains, and a reason per required-reason API under\n  `NSPrivacyAccessedAPITypes`: `CA92.1` (`UserDefaults`), `C617.1` (file\n  timestamps), `35F9.1` (system boot time), `E174.1` (disk space). The\n  Organizer builds the combined privacy report from an archive.\n- App Tracking Transparency only when data is linked with other companies'\n  apps or sites for ads or brokers, never for first-party analytics.\n\n## 10. Accessibility\n\n- Text styles for all text; `@ScaledMetric var icon = 24` beside text;\n  `dynamicTypeSize.isAccessibilitySize` or `ViewThatFits` to stack rows at\n  the largest sizes.\n- VoiceOver: `.accessibilityLabel` on icon-only controls,\n  `.accessibilityAddTraits(.isHeader)`, `.accessibilityElement(children:\n  .combine)` for rows, `.accessibilityAction(named:)`, `Image(decorative:)`\n  for decoration.\n- `accessibilityReduceMotion` swaps movement for fades (`motion-stacks`);\n  previews for empty, error, dark and `.dynamicTypeSize(.accessibility3)`.\n\n## 11. Testing\n\n```swift\nimport Testing\n@testable import Acme\n\n@MainActor struct OrdersModelTests {\n  @Test func showsOrdersAfterLoad() async {\n    let model = OrdersModel(api: StubOrdersAPI(orders: [.sample]))\n    await model.load()\n    #expect(model.orders.count == 1 && model.failure == nil)\n  }\n}\n```\n\n- Swift Testing for new unit tests (`#require`, `@Test(arguments:)`);\n  XCTest for UI and performance tests; HTTP stubbed with `URLProtocol`.\n- XCUITest for a few journeys: elements by `accessibilityIdentifier`, a\n  scenario passed in `app.launchEnvironment`, `waitForExistence(timeout: 5)`,\n  and `try app.performAccessibilityAudit()` on key screens.\n\n## Check it\n\n```bash\nxcrun simctl list devices available\nxcodebuild -scheme Acme -destination 'platform=iOS Simulator,name=iPhone 17' build test | xcbeautify\nswift test --package-path Packages\u002FFeatures\nxcrun simctl openurl booted \"acme:\u002F\u002Forders\u002F42\"\n```\n\n- Once with the Thread Sanitizer on; Simulate Memory Warning on heavy\n  screens; no new concurrency warnings in the Swift 6 build.\n\n## Avoid\n\n`NavigationView`; new `ObservableObject` code in an Observation app; work in\n`onAppear` without cancellation; `DispatchQueue.main.async` to silence the\nchecker; `Task.detached` by habit; formatters or sorting in `body`;\n`AnyView`; tokens in `UserDefaults`; missing usage strings or privacy\nmanifest entries; ATT prompts without tracking; background work assumed to\nrun on time.\n",{"name":5,"description":7},"main","38293fe1b096e6bf3646c7344c38786ed688f464","crates\u002Fenowx-core\u002Fskills\u002Fmobile-ios",21,"https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli","https:\u002F\u002Fenowx.ai","https:\u002F\u002Fgithub.com\u002Fenowdev","Pretending to be a Developer","2026-10-06 02:05:35",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add enowdev\u002Fenowxcli --skill mobile-ios",{"tool":59,"command":60},"bunx","bunx skills add enowdev\u002Fenowxcli --skill mobile-ios",{"tool":62,"command":63},"pnpm","pnpm dlx skills add enowdev\u002Fenowxcli --skill mobile-ios","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fmobile-ios\u002FSKILL.md",true,[],[68,78,95,108,129,148],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6D2HQYSQD9N7MTNDT4A7CBM","demo-skill","Project-scope demo skill for tests.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fworkspace\u002F.agents\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[75,76,77,24,27],"demo skill","demo","tests",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":39},"01M6D2HM0GCPM0TM2HPG9HHR2R","writing","Writing words people read: the specific thing instead of claims, words to drop, sentences, interface copy (buttons, labels, errors, empty states, confirmations), page copy, notifications and emails, alt text and link text, numbers and dates, words that translate well, documentation and voice. Read before writing a page's copy, an interface's text or a document.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fwriting\u002FSKILL.md",[],[80,85,86,87,88,89,27,90,91,92,93,94],"text","emails","empty","drop","document","page","voice","notifications","documentation","translate",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6D2HG07YS49NM196Q0R3AZ8","ui","Designing or restyling an interface: direction, layout, type, colour, icons, components, states, responsive behaviour. Read before building a page, a screen or a set of components.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui\u002FSKILL.md",[],[97,102,103,104,105,90,106,27,107],"icons","components","SET","responsive","layout","before building",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":39},"01M6D2HB59HZHWG1RYZDV4SJ91","ui-themes","Light and dark themes, and colour that holds in both: tokens with a value per theme, and what each kind of content needs to stay visible (icons, SVG drawings and line art, logos, photos, screenshots, charts, code, maps, borders, shadows, focus, form controls), switching without a flash, and checking both. Read before building a second theme or a theme toggle, and before any drawing, logo or chart on a page that has two themes.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-themes\u002FSKILL.md",[],[97,115,116,117,118,119,120,121,122,27,107,123,90,124,125,126,102,127,128],"ui themes","switching","photos","tokens","drawing","focus","maps","Art","flash","code","Charts","content","screenshots","logo",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":39},"01M6D2H5R5KRAE524C8QX0T7Q0","ui-structure","Structure before styling: the blueprint written before any interface code (the screen's job, the regions its kind of page needs, their order and why, the layout skeleton in numbers, the components and their states), the anatomy and order of a homepage, a dashboard, a list, a detail page, settings, a form, sign-in, pricing, docs, an article and a checkout, and how to turn the blueprint into code (tokens, layout primitives, components, sections, page). Read first, before building or rebuilding any page or screen.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-structure\u002FSKILL.md",[],[136,97,137,103,138,139,124,140,141,142,106,118,143,144,145,27,107,90,146,147],"structure","ui structure","pricing","dashboard","Blueprint","article","anatomy","styling","primitives","list","why","how",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6D2H0ZZBJG77MBGPZHA6MWD","ui-stack-vue","Building interfaces in Vue 3 and Nuxt: project layout, script setup with typed defineProps, defineEmits and defineModel, attribute fallthrough, slots and scoped slots, template refs, ref, reactive and computed, watch versus watchEffect, composables and VueUse, provide and inject, Pinia, keyed v-for, transitions, Nuxt 4 (app directory, pages, layouts, useFetch and useAsyncData keys, $fetch in handlers, server routes, runtime config, useSeoMeta, NuxtImg, middleware), VeeValidate forms, Reka UI and Nuxt UI, testing, vue-tsc, and the traps. Read when the project uses Vue or Nuxt.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-stack-vue\u002FSKILL.md",[],[97,155,156,157,158,159,160,161,106,24,162,163,27,164,165,166,167,168,169,30],"vue","stack","ui stack vue","forms","pages","watch","runtime","transitions","fetch","pinia","nuxt","template","server","config","directory"]