Swift

5 posts

aws3 min readCurated summary

AWS Weekly Roundup: BYOM for Amazon RDS for SQL Server, AWS IoT Device SDK for Swift, and more (June 8, 2026) | Amazon Web Services

The AWS roundup highlights the general availability of the AWS IoT Device SDK for Swift, bringing MQTT 5, Device Shadow, Jobs, and fleet provisioning to Apple platforms and Linux. It also covers major AWS releases involving SQL Server licensing, Cognito resilience, OpenAI models on Bedrock, Kubernetes, AI agents, cost reporting, and location services. Together, the announcements show AWS expanding support for Swift edge computing, enterprise AI, multi-Region architectures, and specialized infrastructure. ## AWS IoT Device SDK for Swift - Now generally available for macOS, iOS, tvOS, and Linux. - Provides production-ready support for: - MQTT 5 connectivity - Device Shadow - IoT Jobs - Fleet provisioning - Reflects Swift’s growing use across server-side development, IoT, and edge computing. - Projects such as WendyOS are also bringing Swift to NVIDIA Jetson and Raspberry Pi hardware. ## Major AWS Headlines ### Amazon RDS for SQL Server BYOM - Amazon RDS for SQL Server now supports Bring Your Own Media. - Customers migrating from on-premises SQL Server can reuse existing licenses, including Software Assurance. - Support is provided through Microsoft’s License Mobility program. - AWS License Manager tracks license usage and compliance. ### Multi-Region Amazon Cognito - Cognito can replicate user and machine identity data to a standby Region in near real time. - Replicated data includes credentials, user pool settings, and federation configurations. - Users can continue using applications without re-authentication after a primary-Region disruption. - Available as an add-on for Essentials and Plus user pools across 16 Regions. ### OpenAI Models on Amazon Bedrock - GPT-5.5, GPT-5.4, and Codex are generally available for production use. - GPT-5.5 targets agentic coding, data analysis, and complex autonomous tasks. - Codex supports the Codex App, CLI, and integrations with VS Code, JetBrains, and Xcode. - AWS governance and security controls remain available, pricing follows OpenAI rates, and usage counts toward existing AWS commitments. ## Recent AWS Launches - **Amazon Bedrock observability:** CloudWatch metrics now cover inference counts, token usage, and client errors for OpenAI- and Anthropic-compatible APIs. - **Redesigned Bedrock console:** Adds model catalogs, side-by-side comparisons, project organization, and pre-filled code examples. - **AgentCore Identity secrets:** Credential providers can reference existing AWS Secrets Manager secret ARNs, supporting custom KMS keys, tagging, and rotation. - **Step Functions agentic reasoning:** Workflows can invoke AgentCore-powered agents sequentially or in parallel, include human approval, and trace decisions. - **Kubernetes 1.36 on EKS:** Adds User Namespaces GA, Mutating Admission Policies, in-place pod resource scaling, and resource health reporting. - **ECS Managed Instances accelerators:** Supports Trainium1, Trainium2, and Inferentia2 instances with automatic accelerator allocation. - **Amazon Quick VPC connectivity:** Enables private connections to MCP servers without exposing internal tools to the public internet. - **Cost and Usage Report 2.0:** Adds Athena and Redshift integrations with generated infrastructure templates, table definitions, and loading guidance. - **Amazon Location Service:** Routes API now supports transit and intermodal journeys across 13 Regions. AWS also directs readers to its What’s New page, Builder Center, and upcoming events for further announcements and community resources.

Read original(opens in new tab)
line3 min readCurated summary

ODW #5: Building a RAG System with a Vector DB and Agent Skills

The workshop demonstrated how a lightweight RAG system can make large collections of technical documentation easier for developers and AI agents to use. Using ChromaDB, Swift Evolution proposals were indexed locally and exposed to Claude Code through MCP. Agent skills then simplified searches by teaching the agent which collection, metadata, and query practices to use. The approach improves document discovery and can support code generation and review. ## Why RAG Is Needed - Large application teams maintain extensive documentation and architectural guidelines. - Developers often spend significant time searching for information about: - Introducing dependencies - Resolving build errors - Following architectural rules - Asking experts can solve problems, but consumes time for both the questioner and the responder. - RAG provides AI agents with structured, searchable knowledge so they can answer questions more accurately using internal documents. ## Building a RAG System with ChromaDB - The workshop used ChromaDB, an open-source local vector database with Python and JavaScript client libraries. - Swift Evolution proposals served as the sample dataset: - Approximately 500 Markdown documents - Consistent structure and proposal IDs such as `SE-0400` - Metadata including implementation status and authors - Participants indexed the documents locally and connected the database to Claude Code through an MCP tool. - This allowed the coding agent to retrieve and reference Swift language proposals during conversations. ## Improving Search with Agent Skills - MCP exposes the available database tools, but the agent still needs to know: - Which collection contains the relevant data - Which metadata fields are useful - How to formulate effective queries - A dedicated `searching-swift-evolution` skill encoded this knowledge, including: - The `swift-evolution` collection name - Proposal ID formats such as `SE-0255` and `ST-0001` - Metadata such as `Status` and `Authors` - A recommendation to query in English - With the skill, users could issue simple requests such as “Investigate SE-0500” without explaining the database structure or MCP workflow. - The workshop also covered skill mechanics, authoring best practices, and practical skill development. - Participants later indexed their own Markdown documents, created search skills, and learned how to deploy the database to LY Corporation’s internal Flava cloud for sharing. ## Potential Applications - Natural-language document search can make internal technical knowledge significantly more accessible. - Coding agents can retrieve relevant documentation automatically before: - Generating code - Reviewing code - Checking compliance with architectural or implementation guidelines - Combining RAG with agent skills or Claude Code sub-agents can embed organizational knowledge directly into development workflows. ## Workshop Design and Results - The online workshop used demonstrations by instructors and mock participants. - More than 1,000 people attended. - Its structure balanced lectures and hands-on exercises: - Lectures explained the core concepts concisely. - Practical demonstrations showed how to apply the system to real work documents. - This balance helped participants understand both the underlying ideas and their practical use. Overall, the workshop showed that a local vector database plus MCP and well-designed agent skills can provide a simple, effective foundation for searchable engineering knowledge and AI-assisted development.

Read original(opens in new tab)
line4 min readCurated summary

Large-scale iOS Settings System Unraveled through AttributedString Structure

LINE’s “Service Configuration” system lets teams deploy features dynamically without waiting for LINE’s two-week app release cycle. As the iOS app grew to roughly 700 configuration keys across 60 modules, its monolithic design created dependency, usability, concurrency, testing, and QA problems. The article argues that the original design was reasonable at small scale but needed to evolve, beginning with lessons from Foundation’s type-safe `AttributedString` design. ## What Service Configuration Provides - Service operators modify values through an administration page. - The server notifies LINE clients, which fetch updated values. - Values are selected based on factors such as: - User region - Device - OS version - The system supports: - Feature flags - Rollbacks - A/B tests - Error-reporting sample rates - UI behavior policies - Configuration is delivered as a string-to-string dictionary, for example: - `"function.media.image_medium": "1280,70"` - `"function.media.message.flow.v2.image": "Y"` ## Problems Caused by the Monolithic Design The original implementation required every key to be declared in one roughly 7,000-line file. Although this was simple initially, growth in teams and modules made the structure increasingly costly. ### Circular Dependencies and Weak Typing - Configuration values were exposed as raw strings because the configuration module could not depend on feature-specific modules. - For example, `"1280,70"` represented image dimensions and JPEG quality, but callers had to parse it into an `ImageTransferQuality` value themselves. - Defining `ImageTransferQuality` in the configuration module avoided repeated parsing but polluted unrelated modules with photo-specific types. - Defining it in the photo module preserved separation of concerns but created an impossible reverse dependency. ### Incomplete and Confusing Abstractions - Developers had to understand server-specific encoding rules and implementation details. - Boolean values were sent as `"Y"` and `"N"`, requiring a custom `decodeBoolIfPresent(forKey:)` method. - The custom decoder’s name resembled Swift’s standard decoding API, making incorrect implementations easy to write and review. - Decoding failures could silently fall back to defaults, making the underlying problem difficult to diagnose. - The same default value often had to be declared three times: - A property-group default - A decoding fallback - A global `defaultConfiguration` entry - These duplicated defaults served subtly different purposes, although the distinctions were generally unnecessary. ### Lack of Thread Safety - Configuration groups were lazily decoded and replaced when new server values arrived. - Multiple services could read configuration values concurrently on different threads. - This caused use-after-free crashes— reportedly hundreds per day—leading to bug tickets and hotfix releases. - As the number of services and concurrent operations increased, this became a systemic issue rather than an occasional edge case. ### No Built-in Debug Overrides - QA frequently needed to temporarily change configuration values. - Because the system had no override mechanism, each feature required custom: - Persistent storage - Debug-menu UI - Value-display text - Implementing this repeatedly required edits across several files and modules. ### Fragmented Test Doubles - Since `LineConfigurationManager` was a singleton, modules created narrow protocols and custom mocks for the settings they used. - This resulted in dozens of duplicated protocols and test doubles. - These had to be updated alongside configuration keys and could fall out of sync. - Differences between mocks and production behavior could allow bugs to escape tests or create false failures. ## Looking to Established Designs The team first distilled the required properties of a replacement: - Type-safe access to a large number of key-value pairs - Independent key definitions by each module - Safe behavior under concurrency They identified Foundation’s `AttributedString` as a useful precedent because it manages many typed attributes while allowing UIKit, AppKit, SwiftUI, and other frameworks to define their own attributes independently. The article presents this as the starting point for redesigning Service Configuration around a more modular and type-safe architecture.

Read original(opens in new tab)
airbnb2 min readCurated summary

GraphQL Data Mocking at Scale with LLMs and @generateMock

Airbnb’s `@generateMock` directive combines GraphQL schemas, product context, design references, and LLMs to generate realistic, type-safe mock data automatically. Integrated into the existing Niobe code-generation workflow, it reduces manual mock maintenance and helps client engineers prototype and test features before backend implementation is complete. ## Challenges with GraphQL Mocking - Manually creating large JSON responses or schema-generated objects is tedious and error-prone. - Client engineers often hardcode data or modify networking logic when the server is not yet ready, slowing frontend development. - Handwritten mocks drift out of sync as queries and schemas evolve. - Random generators and field-level resolvers lack the domain knowledge needed for convincing, meaningful data. ## Airbnb’s Goals - Eliminate hand-written mock data and ongoing maintenance. - Generate realistic data suitable for demos, snapshots, and tests. - Keep engineers in their normal local development workflow without requiring separate tools or repositories. ## The `@generateMock` Directive - Engineers can add `@generateMock` to GraphQL operations, fragments, or fields. - Optional arguments customize the generated data: - `id` identifies a mock and names generated helper functions. - `hints` provide instructions such as destinations, content, or desired density. - `designURL` links to a design mockup so generated names, addresses, and other values better match the intended UI. - The directive can be repeated with different arguments to create multiple mock variations. ## Integration with Niobe - After adding or changing `@generateMock` in a `.graphql` file, engineers run Niobe just as they would for ordinary GraphQL code generation. - Niobe generates: - JSON files containing the mock responses. - TypeScript, Kotlin, or Swift helpers for consuming the mocks. - Generated functions return instantiated, type-safe model objects for demo apps, snapshot tests, and unit tests. - Engineers can edit the generated JSON manually; Niobe preserves those changes during later generation runs. ## Context Used by the LLM Niobe supplies the LLM with information needed to create realistic results: - The mocked operations, fragments, fields, and their dependencies. - The relevant subset of the GraphQL schema and inline documentation. - Only schema types and fields needed to resolve the query, avoiding unnecessary context-window usage. - A snapshot image of the design referenced by `designURL`, generated through Airbnb’s internal design-document API.

Read original(opens in new tab)
figma3 min readCurated summary

How to convince your team to switch to Figma | Figma Blog

Buffer’s move to Figma was presented as a cultural change, not merely a software upgrade. Figma helped break down design silos by making files accessible, collaborative, and usable across platforms. James Morris’s approach was to build support through experimentation and demonstrations rather than simply arguing for the switch. ## Buffer’s Transparency and Collaboration Challenges - Buffer valued transparency, but its existing design tools isolated designers from other departments. - Designs were difficult to locate in Dropbox and often required paid software or newer versions to open. - Developers and product managers worried about accidentally overwriting files. - Figma’s cloud-based files could be opened through shared URLs, with free view-only access for collaborators. - Linux users could access designs without buying a Mac or specialized desktop software. - Viewers could comment and inspect design data for implementation. ## Step 1: Create an Open Exploration Period - Morris introduced a company-wide period for testing different design and collaboration tools. - Teams were encouraged to experiment and identify which tools best addressed their workflow problems. - He gathered feedback and explained how Figma could solve Buffer’s communication issues. - Rather than relying only on a persuasive presentation, he trusted hands-on use to demonstrate Figma’s value. ## Step 2: Show, Don’t Tell ### Collaborative Whiteboarding with Product Managers - Morris used remote whiteboarding sessions to let product managers experience Figma directly. - He and a Canadian PM brainstormed together in real time, using shapes and diagrams much like a collaborative Google Doc. - This allowed them to develop ideas together without waiting for a formal specification. - Figma’s ease of use became apparent through practical collaboration. ### Winning Over Engineers - Morris gave engineers direct links to Figma files and let them explore independently. - Engineers could inspect CSS, Swift, and Android XML values through the free view-only experience. - Stable URLs created a single source of truth, replacing exported images and confusing Dropbox locations. - Figma’s browser-based architecture and use of WebAssembly also appealed to engineers interested in advanced web technology. ### Addressing Designers’ Concerns - Designers could be more difficult to persuade because some feared open, transparent workflows. - Others doubted that a browser-based application could match the speed and performance of desktop software. - The article begins describing the use of incentives—“candy”—to help designers try Figma, but the provided text ends before that section is completed. The practical recommendation is to make tool adoption an open, low-pressure experiment. Give each team a concrete way to experience the benefits—real-time whiteboarding for product managers, inspectable files for engineers, and performance demonstrations for designers—so the change becomes evident through use.

Read original(opens in new tab)