Automate this: no command wraps this skill, because it is a lookup rather than a flow. Every
/mobile-release:* command uses it to re-derive a spec one of the other skills marked stale, instead of
answering from memory. Always unattended-safe — it only reads.
Answer Apple API, design, and policy questions from Apple, not from recall. Apple's docs site is a
single-page app — a plain fetch of developer.apple.com/documentation/... returns a 17 KB shell
whose only visible text is "This page requires JavaScript" [verified]. The content is served as
DocC JSON from a parallel host path, and that is what to fetch.
Confidence marks used throughout this skill: [verified] — fetched and read on 2026-08-06, with the
HTTP status recorded in references/endpoints.md. [snippet] — secondary source only, plausible but
unconfirmed. [unverified] — not confirmed anywhere; run the check given before relying on it. See
Verification notes at the end for what was and was not confirmed.
Process:
- Decide which route the question needs — API symbol, HIG, or store policy. Policy and guideline
pages fetch as plain HTML; documentation and HIG pages do not. The table in
references/endpoints.md§1 is the decision. - If you already know the docs URL, convert it to its JSON form by inserting
/tutorials/databefore the path and appending.json—references/endpoints.md§2. Skip to step 4. - If you do not know the exact path, do not guess sibling slugs. There is no working Apple
search API
[verified]. Use the per-framework index route inreferences/search.mdto find the path, or walk down a parent page'stopicSections. - Fetch the JSON and extract only the fields the question needs, using the recipes in
references/jq-recipes.md. Never read a whole page into context — see When not to use this. - Read availability off
metadata.platforms, and checkdeprecatedAtrather than thedeprecatedboolean — they disagree[verified].references/jq-recipes.md§3. - For design rules use the
/tutorials/data/design/human-interface-guidelines/<page>.jsonroute; for store policy use the server-rendered HTML pages. Both inreferences/endpoints.md. - Cite the URL you actually fetched, and mark the claim
[verified]. A claim you could not fetch stays[unverified]— do not upgrade it because it sounds right. - For a local Swift package, or to read Xcode's offline docs, use
references/local-docs.md.
Load only the reference a step actually needs.
Contents
- The one-line version
- When not to use this
- What does not work
- Output Format
- References
- Verification notes
The one-line version
# docs URL: https://developer.apple.com/documentation/uikit/uiviewcontroller/viewwillappear(_:)
# JSON URL: insert /tutorials/data, append .json
curl -s "https://developer.apple.com/tutorials/data/documentation/uikit/uiviewcontroller/viewwillappear(_:).json" \
| jq -r '.metadata.roleHeading + ": " + .metadata.title,
([.abstract[]?.text]|join("")),
(.primaryContentSections[]|select(.kind=="declarations")|.declarations[].tokens|map(.text)|join("")),
(.metadata.platforms[]|" \(.name) \(.introducedAt // "—")")'
Instance Method: viewWillAppear(_:)
Notifies the view controller that its view is about to be added to a view hierarchy.
func viewWillAppear(_ animated: Bool)
iOS 2.0
iPadOS 2.0
Mac Catalyst 13.1
tvOS —
visionOS 1.0
That is the whole mechanism. Everything else in this skill is finding the path, pulling other fields, and knowing which pages need it.
references/appledoc.sh wraps the above as appledoc show|search|index|hig. It is a convenience,
not a dependency — the curl + jq calls are the interface.
When not to use this
These pages are large. UIKit's index is 4.8 MB and Foundation's is 6.6 MB [verified]; a
single class page is 327 KB. Fetching one into context wastes most of a window on JSON scaffolding.
- Never
cata fetched page or index. Pipe it through the field-specificjqinreferences/jq-recipes.md, orgrepit. Write to a file, extract, discard. - Do not use this for language questions. Swift syntax, generics, concurrency semantics and the standard library are better answered directly; the docs add fetch cost without adding accuracy.
- Do not use this for release-leg tasks the other skills already cover. Signing, upload, review
readiness, screenshot specs and listing limits are in
ios-build-sign,app-store-publish,app-store-review,store-screenshotsandstore-preview-videos. Those skills already carry the numbers with sources. Reach here only to re-derive a number one of them marked stale. - Do not paste a symbol's full discussion into an answer. Quote the sentence that decides the question and cite the URL.
- Do not present a 404 as an absence. A 404 from the JSON endpoint means the slug is wrong far
more often than it means the API is gone
[verified]— resolve the path viareferences/search.mdbefore saying an API does not exist.
What does not work
Stated plainly so it is not re-attempted:
| Attempt | Result |
|---|---|
developer.apple.com/search/search_data.php?q=… |
404, body File not found. [verified] |
developer.apple.com/search/api/?q=…, /search/suggestions/?q=… |
404 [verified] |
developer.apple.com/search/?q=… |
200, but results are client-rendered — results-container is empty [verified] |
Plain fetch of /documentation/… or /design/human-interface-guidelines/… |
200 with ~150 characters of text: "This page requires JavaScript" [verified] |
?language=objc on a JSON endpoint |
Ignored — byte-identical response. Obj-C comes from variantOverrides [verified] |
/tutorials/data/index/human-interface-guidelines |
200 but empty: {"interfaceLanguages":{}} [verified] |
docs-assets.developer.apple.com (sample-code zips) |
Blocked at this environment's proxy: CONNECT tunnel failed, response 403 [verified as blocked here] |
There is no first-party equivalent of android docs search. The index route in
references/search.md is the closest substitute and it is a client-side grep, not a ranked search.
Output Format
Lead with the answer. Then the evidence: signature, availability, and the URL fetched. Quote only the sentence that decides the question. Mark every claim.
Example output:
viewIsAppearing(_:) vs viewWillAppear(_:) — which to override
Answer: use viewIsAppearing(_:) for anything that reads traits, the view hierarchy, or
geometry; Apple says so explicitly [verified]. Keep viewWillAppear(_:) only for a pre-transition
callback (the transition coordinator) or for balanced register/unregister pairs.
Signature and availability — metadata.platforms, fetched 2026-08-06:
$ curl -s "$B/documentation/uikit/uiviewcontroller/viewisappearing(_:).json" | jq -r '…'
Instance Method: viewIsAppearing(_:)
func viewIsAppearing(_ animated: Bool)
iOS 13.0 · iPadOS 13.0 · Mac Catalyst 13.1 · tvOS 13.0 · visionOS 1.0
No platform carried a deprecatedAt, so nothing here is deprecated [verified].
The deciding sentences, from the page's discussion section:
The traits and geometry aren't up to date when the system calls
viewWillAppear(_:), but they are when the system callsviewIsAppearing(_:), so useviewIsAppearing(_:)to update your views. […] For all other cases, useviewIsAppearing(_:)to update your views.
Both callbacks land in the same CATransaction, so changes made in either become visible together
[verified] — the choice is about correctness of the data you read, not about timing on screen.
Related, from seeAlsoSections — "Responding to view-related events": viewWillAppear(_:),
viewDidAppear(_:), viewWillDisappear(_:), viewDidDisappear(_:), isBeingDismissed,
isBeingPresented, isMovingFromParent, isMovingToParent.
Source: https://developer.apple.com/tutorials/data/documentation/uikit/uiviewcontroller/viewisappearing(_:).json
— HTTP 200, 35.9 KB. The human-readable page is the same path without /tutorials/data and without
.json; that URL renders only in a browser.
Not established: introducedAt is 13.0 for iOS, but the page says nothing about which SDK you
must build against to call it — a back-deployment caveat would not appear in this field
[unverified]. Check the UIKit release notes if that distinction matters.
End of example.
References
references/endpoints.md— which Apple hosts and paths are server-rendered and which are JS shells, the URL-to-JSON mapping rule with four verified cases, the HTTP status of every endpoint probed, 404 behaviour, case-insensitivity, and the Objective-C variant mechanism.references/search.md— there is no search API; the/tutorials/data/index/<framework>route,technologies.jsonto enumerate frameworks, a jq grep over the index, why titles carry full declarations, index sizes, and walkingtopicSectionsas the fallback.references/jq-recipes.md— a runnable recipe per field: abstract, signature, availability and deprecation, parameters, discussion with references resolved,topicSections,seeAlsoSections, breadcrumbs, and the sharedtxt()flattener with thecodeVoicetrap.references/policy-and-hig.md— the store policy and App Store Connect help pages that fetch as plain HTML with text sizes, the HIG JSON route and its topic tree, and which pages eachmobile-releaseskill already sources.references/wwdc-and-samples.md— WWDC session pages are server-rendered including summary, chapters, resources and transcript; extracting a transcript; locating a sample-code zip viasampleCodeDownload; the blocked asset host.references/local-docs.md—xcrun docc convertfor a local Swift package,.doccarchivelayout and why its JSON matches the web schema, Xcode's offline documentation cache path, and what could not be checked from Linux.references/appledoc.sh—show,search,index,higsubcommands wrapping the curl + jq calls. POSIX sh, needscurlandjq.
Verification notes
- Every endpoint in
references/endpoints.mdwas fetched on 2026-08-06 from this environment, and its HTTP status and response size are recorded there. The four failing search candidates were fetched too, and their failures are recorded rather than omitted. - Every
jqrecipe inreferences/jq-recipes.mdwas executed against a real fetched page and its output pasted into that file. Recipes were tested againstviewWillAppear(_:)(method with parameters),viewDidLoad()(method without),UIViewController(class),SwiftUIandUIKit(framework landing),adopting-liquid-glass(article),app-icons(HIG), and a sample-code page. - The
codeVoicetrap is a real bug found while testing:codeVoicenodes carry.code, not.text, so a naive flattener silently drops inline code. The correctedtxt()inreferences/jq-recipes.mdis the tested version. deprecated: falsealongsidedeprecatedAt: "12.0"was observed onUIWebView[verified]. ReaddeprecatedAt.- The path-mapping rule is case-insensitive —
documentation/UIKit/UIViewController.jsonand the all-lowercase form both return 200 with identical sizes[verified]. This corrects the "lowercased" wording in../app-store-review/references/refresh-sources.md, which is right in practice but stricter than the server. references/local-docs.mdis the weakest file here. Nothing in it was executed — the authoring environment is Linux with no Xcode.xcrun doccinvocations, the.doccarchivelayout and the Xcode cache path are[snippet]from secondary sources. Treat the first real run on a Mac as the test.- The sample-code zip host was unreachable from this environment specifically, at the proxy, not at Apple. It may well work elsewhere — the URL-discovery step is
[verified], the download is not. - Apple restructures documentation paths without notice. When this skill and a live fetch disagree, the fetch wins. Report the discrepancy so the skill can be updated.