Get Sample Code
get_sample_codeSearch Apple's sample-code library by framework or keywords to find project titles, summaries, and download links for building native Swift apps.
Instructions
Apple's sample-code library: project titles with links and Apple's one-line summaries, grouped by framework; read a project's page, with its Download link, with get_apple_doc_content. framework matches the project's framework in any spelling ("storekit", "Store Kit"); searchQuery matches titles first, then frameworks, paths and summaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| beta | No | Beta samples: "include" = all, "exclude" = stable only, "only" = beta only. Default: "include" | include |
| limit | No | Max results (default: 50). | |
| framework | No | Framework filter (case-insensitive). Examples: "SwiftUI", "ARKit", "CoreML". Note: Some samples are under generic categories - use searchQuery for better results. | |
| searchQuery | No | Search keywords. Most effective approach. Examples: "animation", "camera", "machine learning", "widgets". |