Cover Material, Copyright, and License
Preface
- Notes on the new June 2025 Book Edition
- Requests from the Author
- Notes on the Second Edition
- Book Structure
- Requests from the Author
- Parts of this Book are Specific for macOS and iOS, with Some Support for Linux
- Code for this Book
- Author’s Background
- Cover Art
- CoreML Libraries Used in this Book
- Swift 3rd Party Libraries
- Acknowledgements
Part 1: Introduction and Short Examples
Setting Up Swift for Command Line Development
- Installing Swift Packages
- Creating Swift Packages
- Accessing Libraries that You Write in Other Projects
Background Information for Writing Swift Command Line Utilities
- Using Shell Processes
- FileIO Examples
- Swift REPL
Web Scraping
- Running in the Swift REPL
Part 2: Large Language Models
Using the OpenAI LLM APIs
- Core Architecture
- Key Features
- Technical Implementation Details
- Running Tests
Using APIs for Anthropic Claude LLMs
- Running the examples
Using Groq APIs to Open Weight LLM Models
- Implementation of a Client Library for the Groq APIs
- Running the Tests
Using the xAI Grok LLM
- Implementation of a Grok API Client Library
Using Ollama to Run Local LLMs
- Running the Ollama Service
- Ollama Wrap Up
Using Apple’s MLX Framework to Run Local LLMs
- MLX Framework History
- MLX Resources on GitHub
- Example Application for MLX Swift Examples Repository
- Analysis of Swift and SwiftUI Code in the LLMEval Application
Part 3: Apple’s CoreML and NLP Libraries
Deep Learning Introduction
- Simple Multi-layer Perceptron Neural Networks
- Deep Learning
Natural Language Processing Using Apple’s Natural Language Framework
- Using Apple’s NaturalLanguage Swift Library
- A simple Wrapper Library for Apple’s NLP Models
Documents Question Answering Using OpenAI GPT4 APIs and a Local Embeddings Vector Database
- Extending the String Class
- Implementing a Local Vector Database for Document Embeddings
- Create Local Embeddings Vectors From Local Text Files With OpenAI GPT APIs
- Using Local Embeddings Vector Database With OpenAI GPT APIs
- Wrap Up for Using Local Embeddings Vector Database to Enhance the Use of GPT3 APIs With Local Documents
Part 4: Knowledge Representation and Data Acquisition
Linked Data and the Semantic Web
- Understanding the Resource Description Framework (RDF)
- Frequently Used Resource Namespaces
- Understanding the SPARQL Query Language
- Semantic Web and Linked Data Wrap Up
Example Application: iOS and macOS Versions of my KnowledgeBookNavigator
- Screen Shots of macOS Application
- Application Code Listings
Part 5: Apple Intelligence
- Developers Can Now Weave Apple Intelligence Directly Into Their Apps
- Key Advantages for Developers:
