SShortSingh.
Back to feed

DEV Tutorial: Adding Search, Command Palette and Settings to a SwiftUI Contacts App

0
·1 views

A DEV Community tutorial series continues with Part 2, building on a SwiftUI Contacts app introduced in Part 1. The guide walks intermediate developers through adding an adaptive navigation shell that switches between a sidebar on iPad and a tab bar on iPhone, without platform-specific conditional guards. New features include a live-filtering search field, a command palette triggered by the keyboard shortcut Command-K, and skeleton loaders to handle simulated slow data fetches. A settings screen is also introduced, offering controls for notifications, display density, sync intervals, and beta features, with per-component theme token overrides. The tutorial emphasizes a data-driven routing approach, enumerating app sections once and supplying them to whichever navigation component the screen width demands.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Build AI Agent MVPs Around Human Verification, Not Maximum Autonomy

Most AI agent prototypes prioritize autonomy over reliability, but developers are advised to instead focus on the smallest workflow a human can verify. The recommended approach divides tasks into three categories: deterministic code steps, model-based judgment, and actions requiring human approval before execution. Defining strict typed contracts for each tool — including inputs, outputs, permissions, and failure responses — makes agents testable and prevents unintended permission creep. Early releases should favor read-only tools, with humans approving any high-impact external actions such as sending messages or modifying production data. The goal of an MVP is not to simulate a fully autonomous system, but to demonstrate that a narrow workflow can produce repeatable, verifiable value.

0
ProgrammingDEV Community ·

macOS notification daemon pinned at 99% CPU; one log command traced the cause

A MacBook began overheating with fans running loud, prompting an investigation that initially suspected high RAM usage but quickly ruled it out. Sorting processes by CPU revealed that usernoted, the macOS notification daemon, was consuming nearly an entire CPU core while using only 16 MB of RAM. Using Apple's sample tool, the developer found the daemon was stuck in an infinite loop trying to calculate the next trigger date for a malformed scheduled notification stored on disk. Killing the process offered no lasting fix, as macOS automatically relaunched it with the same corrupted data each time. A one-line log command eventually helped identify and remove the offending notification entry, resolving the CPU spike.

0
ProgrammingDEV Community ·

RocheDB Uses Data Locality as a First-Stage Retrieval Layer to Cut Search Costs

RocheDB is a database concept that treats physical and logical data placement as an active first stage of retrieval, rather than a passive storage concern. By grouping related records into nearby organizational units called rings, the system aims to narrow candidate sets before traditional ranking or scoring steps begin. This approach targets search engines, recommendation systems, and retrieval-augmented generation (RAG) pipelines, where wide candidate reads can inflate latency, memory use, and LLM token consumption. RocheDB does not seek to replace existing indexes like BM25, vector search, or rerankers, but instead tries to reduce the volume of unrelated data those systems must process. The core premise is that smarter data placement can lower I/O amplification, cache pressure, and multi-stage ranking overhead in large-scale retrieval infrastructure.

0
ProgrammingDEV Community ·

Sanctioned Russian Bulletproof Hosting Firm Aeza Caught Sending Affiliate Recruitment Emails

A cybersecurity-aware recipient received an unsolicited PDF from Aeza Group promoting a hosting affiliate program offering up to 40% recurring commissions. After verifying the sender against the U.S. Treasury OFAC sanctions list, the recipient confirmed Aeza Group was designated on July 1, 2025, as a bulletproof hosting provider based in St. Petersburg, Russia. The company had allegedly provided server infrastructure to infostealer malware and ransomware operators, including groups that targeted U.S. defense and technology firms, and hosted an illegal darknet drug marketplace. The email signature identified 'Aeza International LTD' at a London address, which OFAC had flagged as an overseas shell company set up specifically to evade sanctions. Despite the PDF itself being technically harmless, the recruitment pitch effectively solicited unsuspecting individuals to promote the infrastructure of a sanctioned criminal enterprise.

DEV Tutorial: Adding Search, Command Palette and Settings to a SwiftUI Contacts App · ShortSingh