<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Diana Novas</title>
    <description>The latest articles on DEV Community by Diana Novas (@diana_novas).</description>
    <link>https://dev.to/diana_novas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4125426%2Fa9a5feb2-5a84-4a41-a24e-5e2a0bc029d1.jpg</url>
      <title>DEV Community: Diana Novas</title>
      <link>https://dev.to/diana_novas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diana_novas"/>
    <language>en</language>
    <item>
      <title>Why Vibe Coders Burn Token Limits (And How We Run AI Agents at 10x Speed)</title>
      <dc:creator>Diana Novas</dc:creator>
      <pubDate>Tue, 03 Nov 2026 06:44:46 +0000</pubDate>
      <link>https://dev.to/diana_novas/why-vibe-coders-burn-token-limits-and-how-we-run-ai-agents-at-10x-speed-2m44</link>
      <guid>https://dev.to/diana_novas/why-vibe-coders-burn-token-limits-and-how-we-run-ai-agents-at-10x-speed-2m44</guid>
      <description>&lt;p&gt;Every week in developer chats, I see the exact same complaint. People who got hooked on vibe coding complain that they run out of token limits even on the most expensive tiers, so they end up paying for two or three AI subscriptions at once. Their workflow for working with AI coding agents always sounds identical: "I dropped a prompt, the agent is building something, I'll go grab coffee and check on it later."&lt;/p&gt;

&lt;p&gt;As a developer with 15 years of experience, I find that approach naive. I pay $200 a month for the Gemini Ultra plan. I work with models and agents every single day across multiple active projects in parallel, yet I have never once hit my usage ceiling. By the end of each week, I still have more than 50% of my weekly quota untouched, even though I ship code five to ten times faster than when I wrote everything by hand.&lt;/p&gt;

&lt;p&gt;The secret is simple. In my baseline workflow, a model almost never writes code blind for more than 10 minutes at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Unprepared Long Autonomous Sessions Burn Tokens for Nothing
&lt;/h2&gt;

&lt;p&gt;When someone without an engineering background asks a model out of the gate to "build the whole service" or "analyze user reviews and fix everything," the model starts wandering. It reads irrelevant files, guesses at intent, trips over its own bugs, tries to patch around them, and burns hundreds of thousands of tokens in half an hour rewriting the exact same module in circles.&lt;/p&gt;

&lt;p&gt;Of course, you &lt;em&gt;can&lt;/em&gt; let an agent run autonomously for much longer than 10 minutes. But to do that safely, you have to dissect the task first: document every edge case, break the work into explicit subtasks, and equip the agent with clear skills and instructions defining how it should act and make decisions in each scenario.&lt;/p&gt;

&lt;p&gt;It works just like running a company. If you hire 30 employees, toss a vague goal at them, and walk away leaving the business to run itself, nothing good will come of it. That is almost guaranteed. On the other hand, if you give every person clear playbooks and operating rules, verify that they actually understood them, and set up clean processes, you need far less day-to-day micromanagement. More importantly, your team makes far fewer mistakes that cost the company real money.&lt;/p&gt;

&lt;p&gt;Working with AI coding agents produces predictable results only when you build on that operational foundation and understand how the system fits together.&lt;/p&gt;

&lt;p&gt;An experienced engineer follows a specific order of operations. First, you design the database schema and domain entities. Or you work in the opposite direction: define the domain entities and their relationships first, and then design the tables and indexes around them. Only after that foundation is locked in do you layer the business service logic on top.&lt;/p&gt;

&lt;p&gt;I do not think vibe-coded scripts are always terrible or useless. Most of the time, they solve the user's immediate problem. Modern models can even audit security and code quality well if you ask them to run a review. The real trap for vibe coders lies elsewhere: without an engineering foundation, you simply do not know which questions to ask the model or where the system will crack under real load.&lt;/p&gt;

&lt;p&gt;A founder today can easily assemble a working prototype alone. That is great for testing a business hypothesis. Still, once the product attracts paying customers and real revenue, the business will need a technical specialist. Someone has to take responsibility for the architecture and data integrity, regardless of whether a human programmer or a cloud neural network typed the original lines of code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Treating AI Agents Like a Real Dev Team: Rules, Skills, and Checkpoints
&lt;/h2&gt;

&lt;p&gt;Just a year ago, I could still read every single line of code a model produced. Today, at current development speeds, reviewing every line by eye is physically exhausting. The role of a senior engineer has shifted: you act as an orchestrator who directs agents, runs fast visual architecture checks, and automates verification.&lt;/p&gt;

&lt;p&gt;If you watch how modern frontier models like Gemini, Claude, or OpenAI reason through a problem, they behave remarkably like human developers. Six months ago, you had to constantly clean up small bugs behind them, and their UI layouts regularly broke margins and alignment. Today, they assemble visual layouts cleanly and reason at the level of a solid mid-level developer. I no longer spend hours digging through unfamiliar API docs or writing glue code by hand because AI handles that routine work.&lt;/p&gt;

&lt;p&gt;Still, no team of mid-level developers will ship a reliable system without engineering standards. The exact same rule applies to agents. They need strict guidelines, documented workflows, and specialized skill files for each domain.&lt;/p&gt;

&lt;p&gt;To avoid cleaning up mountains of throwaway code later, I run everything through checkpoints, the same way I have always worked with junior and mid-level engineers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, we break the task down into short, concrete stages together.&lt;/li&gt;
&lt;li&gt;I set a strict gate: "Draft the architecture plan first and send it to me for review. If anything in the logic looks ambiguous, do not guess. Ask me questions first."&lt;/li&gt;
&lt;li&gt;Only after we agree on the blueprint does the agent get the green light for a focused 10-minute coding sprint.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Two Classic Traps of Modern Models: Over-Engineering and Quick Band-Aids
&lt;/h2&gt;

&lt;p&gt;Even the newest models fall into one of two extremes when you loosen the reins.&lt;/p&gt;

&lt;p&gt;The first extreme is trying to anticipate everything under the sun. The model starts piling up complex abstractions and guarding against dozens of hypothetical edge cases that will never happen in production. A simple feature quickly drowns in unnecessary layers.&lt;/p&gt;

&lt;p&gt;The second extreme comes from lazy prompting. If you tell a model to "just fix this real quick," it will dutifully hand you a superficial band-aid that hides the symptom while breaking the broader project structure. Conversely, if you state upfront that the solution needs to run reliably for years and respect the existing system architecture, the model produces clean, well-structured code.&lt;/p&gt;

&lt;p&gt;That is why I keep an eye on the agent's reasoning trace during those short 10-minute sprints. The moment I see its train of thought veer off course, I stop generation, clarify where the root cause actually lives, and restart the step. That habit saves both hours and tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Moved to a Dual-Mac Setup for Running AI Agents
&lt;/h2&gt;

&lt;p&gt;Adopting this engineer-plus-agents workflow at &lt;a href="https://novasynapse.com/" rel="noopener noreferrer"&gt;NovaSynapse&lt;/a&gt; gave our small studio the leverage to compete head-to-head in speed and quality with much larger companies. At the same time, working with autonomous agents every day quickly changed my physical desk setup too.&lt;/p&gt;

&lt;p&gt;I now work across two Macs full-time. The primary reason is security: I want strict physical isolation so my personal data, private chats, and sensitive credentials never intersect with the environment that AI agents can access. Having a second machine also makes it effortless to offload autonomous agent tasks and heavy background jobs while I focus on architecture on my main MacBook.&lt;/p&gt;

&lt;p&gt;At first, jumping between two machines slowed me down. Apple's built-in screen sharing requires both Macs to be signed into the exact same Apple ID, which immediately defeats the purpose of an isolated work environment. Third-party remote desktop tools introduced noticeable input lag, refused to scale cleanly to full screen on smaller displays, swallowed system keyboard shortcuts, and left both computers without a shared clipboard.&lt;/p&gt;

&lt;p&gt;To fix those bottlenecks for our own daily work, we built a native macOS utility called &lt;a href="https://novasynapse.com/products/multimac/" rel="noopener noreferrer"&gt;MultiMac&lt;/a&gt;, which we later released as a standalone product. It links two Macs running different Apple IDs into a unified workspace with true full-screen mode, shared clipboard, and instant hotkey passthrough without touching private data. My second Mac now feels like a direct physical extension of my main MacBook, roughly doubling my daily speed when orchestrating agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions About Working with AI Coding Agents
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Will vibe coding replace professional software engineers in the next few years?
&lt;/h3&gt;

&lt;p&gt;Prompts alone are already enough to spin up simple prototypes and validate ideas quickly. However, any production system serving real customers and handling real money still requires an engineer who can design the database schema, structure the service layer, and take accountability for system reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you stop burning through token limits on cloud AI models?
&lt;/h3&gt;

&lt;p&gt;Stop running long, unprepared sessions where an agent spends half an hour guessing in the dark. Either work in 10-minute iterations with an architecture review gate, or thoroughly decompose the task into subtasks with explicit decision-making skills before launching a longer autonomous run.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How I Built a 4MB iOS App Blocker to Stop Doomscrolling</title>
      <dc:creator>Diana Novas</dc:creator>
      <pubDate>Tue, 15 Sep 2026 04:50:08 +0000</pubDate>
      <link>https://dev.to/diana_novas/how-i-built-a-4mb-ios-app-blocker-to-stop-doomscrolling-2hkp</link>
      <guid>https://dev.to/diana_novas/how-i-built-a-4mb-ios-app-blocker-to-stop-doomscrolling-2hkp</guid>
      <description>&lt;p&gt;&lt;em&gt;The story of how fighting dopamine loops led to building Scroll Brake, why popular competitors demand suspicious permissions, and how to conquer hidden traps in Apple's Screen Time APIs.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Needed an App Blocker in the First Place
&lt;/h2&gt;

&lt;p&gt;I am obsessive about personal productivity. Over the years, I've developed my own system for managing time and daily energy that keeps my schedule structured and gets hard engineering projects shipped.&lt;/p&gt;

&lt;p&gt;Yet there are moments when you just pick up your phone on autopilot and start doomscrolling Reels. One short video, a second, a third — the algorithm serves up an endless stream of engaging clips. You thought you were taking a two-minute breather, and suddenly 40 minutes or a full hour has evaporated. Social media algorithms are designed by top engineers to capture human attention at any cost. Each swipe feels slightly more rewarding than the last, trapping your brain in an infinite dopamine loop.&lt;/p&gt;

&lt;p&gt;I had zero intention of writing my own app. As a software engineer and founder, my time is scarce, and I prefer using proven off-the-shelf tools. So I went straight to the App Store.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Broken with Modern App Blockers
&lt;/h2&gt;

&lt;p&gt;I tested the category leaders — &lt;strong&gt;Opal, OneSec, ScreenZen, Refocus&lt;/strong&gt;, alongside Apple's built-in Screen Time. Almost immediately, I ran into architectural and design patterns that left me bewildered:&lt;/p&gt;

&lt;h3&gt;
  
  
  The Notification and Privacy Paradox
&lt;/h3&gt;

&lt;p&gt;The very first thing almost all these apps do is ask for push notification and analytics permissions. Why would a tool designed to keep me off my phone need to wake up my display with notifications? As it turned out later while building the app, this wasn't greed—it was an old system constraint in iOS that I'll break down below in the technical section.&lt;/p&gt;

&lt;h3&gt;
  
  
  Aggressive Paywall Walls
&lt;/h3&gt;

&lt;p&gt;Before you even see the main interface or verify whether the tool solves your problem, you get hit with an aggressive subscription screen. It comes wrapped in a "free trial" clearly designed around the hope that users forget to cancel. As an entrepreneur, I understand the conversion math; as a user, I dislike dark patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Ineffectiveness of Apple's Default Screen Time
&lt;/h3&gt;

&lt;p&gt;Apple's native Screen Time fails on human psychology. When the standard system overlay pops up, your thumb reflexively taps &lt;em&gt;"Ignore Limit for 15 minutes"&lt;/em&gt;. There is zero cognitive friction — the action happens entirely on muscle memory.&lt;/p&gt;

&lt;p&gt;I had no desire to audit dozens of clones with identical paywalls. I realized building a lightweight, native tool for myself would be both faster and more honest.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scroll Brake Principles: 4MB, No Trackers, No Subscriptions
&lt;/h2&gt;

&lt;p&gt;At &lt;strong&gt;NovaSynapse&lt;/strong&gt;, we follow the principle &lt;em&gt;“Everything you need. Nothing you don’t.”&lt;/em&gt; Software should solve the problem, conserve battery, and respect user boundaries.&lt;/p&gt;

&lt;p&gt;That's how &lt;strong&gt;&lt;a href="https://novasynapse.com/products/scroll-brake/" rel="noopener noreferrer"&gt;Scroll Brake&lt;/a&gt;&lt;/strong&gt; was born:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;~4 MB install size:&lt;/strong&gt; No bloated cross-platform runtimes, no web views, zero third-party tracking SDKs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% Privacy-First:&lt;/strong&gt; No accounts, no database, no remote servers. Everything executes locally on-device using native iOS APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive friction over brute-force bans:&lt;/strong&gt; To extend time in social apps, you must engage your prefrontal cortex — by solving a quick math puzzle. That single second of friction shatters autopilot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anti-dopamine UX over gamification:&lt;/strong&gt; After solving the puzzle correctly, I deliberately don't show confetti, fireworks, or congratulatory messages. Feeding the brain cheap dopamine for unlocking social media is absurd. The screen is intentionally kept as boring and quiet as possible: the timer is unlocked, and returning relies on the standard iOS back breadcrumb in the top-left corner (by design, iOS privacy protects which specific app triggered the shield, so the host app cannot auto-redirect you).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monetization:&lt;/strong&gt; Up to 3 rules are completely free (I only use one myself: the "Social Networks" category capped at 5 minutes a day). For anyone needing more rules, I added a one-time Lifetime purchase instead of forced subscriptions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The 4-Day Build Story: AI &amp;amp; Xcode Tools
&lt;/h2&gt;

&lt;p&gt;I built the app with AI using Antigravity and Gemini models (3.1 Pro and Flash).&lt;/p&gt;

&lt;p&gt;I've tinkered with mobile development before—building with Flutter and exploring native iOS—but that was before AI coding assistants became widespread. With AI, assembling a focused, lightweight app moved remarkably fast. You still can't just blindly accept generated code: Apple's system extensions are notoriously brittle, so I reviewed every line myself to prevent crashes and memory leaks. But overall, the build went smoothly, taking just 3–4 working days including manual testing on physical devices and older iOS versions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Icon in 15 minutes:&lt;/strong&gt; Instead of manually exporting dozens of PNG layers, I used Xcode's &lt;strong&gt;Icon Composer&lt;/strong&gt; developer tool. Vector layers automatically adapt to light, dark, and tinted iOS themes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App Store Review in &amp;lt; 24 hours:&lt;/strong&gt; Because the app has zero tracking SDKs and requests no private user data, Apple approved the build for the &lt;a href="https://apps.apple.com/app/apple-store/id6779527014?pt=127255301&amp;amp;ct=website&amp;amp;mt=8" rel="nofollow noopener noreferrer"&gt;App Store&lt;/a&gt; the very next day.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Engineering Deep-Dive: Hidden Traps in Apple's Screen Time API
&lt;/h2&gt;

&lt;p&gt;Now for the technical meat — working with the trio of &lt;code&gt;ManagedSettings&lt;/code&gt;, &lt;code&gt;DeviceActivity&lt;/code&gt;, and &lt;code&gt;FamilyControls&lt;/code&gt;. If you build an app using Apple's Screen Time API, you will inevitably hit three architectural walls. Here is how I solved them:&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Competitors Demand Push Notifications (iOS &amp;lt; 26.5 vs iOS 26.5+)
&lt;/h3&gt;

&lt;p&gt;Users frequently complain about app blockers spamming notifications, but developers were long trapped by Apple's extension sandbox.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Legacy Constraint:&lt;/strong&gt;
When an app is blocked, the system displays the protective overlay — &lt;code&gt;ShieldActionExtension&lt;/code&gt;. The user taps an action button like "Extend". But this extension runs in a restricted sandbox where calling &lt;code&gt;UIApplication.shared.open&lt;/code&gt; is &lt;strong&gt;strictly forbidden at both the compiler and system level&lt;/strong&gt;. The &lt;a href="https://developer.apple.com/documentation/managedsettings/shieldactionresponse" rel="nofollow noopener noreferrer"&gt;ShieldActionResponse&lt;/a&gt; enum historically only supported &lt;code&gt;.close&lt;/code&gt;, &lt;code&gt;.defer&lt;/code&gt;, and &lt;code&gt;.none&lt;/code&gt;. It was impossible to open the host app directly to present a code or puzzle!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Industry Hack:&lt;/strong&gt;
The only workaround was firing a local push notification (&lt;code&gt;UNUserNotificationCenter&lt;/code&gt;). The user had to pull down Notification Center or tap the banner to open the app. That is precisely why almost every competing blocker requests notification permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My Native Fix in iOS 26.5+:&lt;/strong&gt;
Apple finally added the native response case &lt;a href="https://developer.apple.com/documentation/managedsettings/shieldactionresponse/openparentalcontrolsapp" rel="nofollow noopener noreferrer"&gt;ShieldActionResponse.openParentalControlsApp&lt;/a&gt;. When returned, the system immediately launches the main host app directly to the math puzzle view (&lt;code&gt;MathPuzzleView&lt;/code&gt;):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;  &lt;span class="c1"&gt;// ShieldActionExtension.swift&lt;/span&gt;
  &lt;span class="n"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;forKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"launchedFromShieldAction"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;completionHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;openParentalControlsApp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By targeting iOS 26.5+ as our deployment baseline (&lt;code&gt;IPHONEOS_DEPLOYMENT_TARGET = 26.5&lt;/code&gt;), I eliminated push notification hacks entirely.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Sandbox Ban on Direct Usage Analytics
&lt;/h3&gt;

&lt;p&gt;I frequently get asked: "Why doesn't the app show minute-by-minute app charts in custom analytics?"&lt;/p&gt;

&lt;p&gt;The answer: &lt;strong&gt;Apple architecturally isolates Screen Time data from the host app.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access to the &lt;code&gt;DeviceActivityResults&lt;/code&gt; array is granted exclusively to &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivityreportextension" rel="nofollow noopener noreferrer"&gt;DeviceActivityReportExtension&lt;/a&gt;, which runs in an isolated system process.&lt;/li&gt;
&lt;li&gt;The host app embeds only a visual container view, &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivityreport" rel="nofollow noopener noreferrer"&gt;DeviceActivityReport&lt;/a&gt;. It renders &lt;strong&gt;out-of-process&lt;/strong&gt; and projects the rendered view into your app's UI.&lt;/li&gt;
&lt;li&gt;Data never leaves the extension sandbox — host apps cannot write this data to SQLite, serialize it into arrays, or transmit it over the network.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apple's documentation is explicit:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"To protect user privacy, the DeviceActivityReport extension runs in a sandbox, and its data doesn’t leave the extension. Instead, the extension creates and returns views that your app displays."&lt;/em&gt;&lt;br&gt;&lt;br&gt;
— &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivityreport" rel="nofollow noopener noreferrer"&gt;Apple Developer Documentation: DeviceActivityReport&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Impact on Monitoring:&lt;/strong&gt;
Tracking limits through &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivitycenter" rel="nofollow noopener noreferrer"&gt;DeviceActivityCenter&lt;/a&gt; works strictly on a threshold subscription model (&lt;code&gt;DeviceActivityEvent.threshold&lt;/code&gt;). The system notifies &lt;code&gt;DeviceActivityMonitorExtension&lt;/code&gt; only when the threshold is reached (&lt;code&gt;eventDidReachThreshold&lt;/code&gt;), without streaming any intermediate usage telemetry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why You Return via the Top-Left Breadcrumb:&lt;/strong&gt;
In iOS, host apps have zero access to the &lt;code&gt;bundleIdentifier&lt;/code&gt; that triggered the shield. As a result, an app cannot programmatically jump the user back into Instagram or TikTok. You simply tap the system back breadcrumb in the top-left corner of the status bar.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Overcoming Hidden Screen Time API Bugs
&lt;/h3&gt;

&lt;p&gt;During stress testing, I encountered subtle iOS platform bugs that can break any blocker:&lt;/p&gt;

&lt;h4&gt;
  
  
  Event Caching Bug in DeviceActivityCenter
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Bug:&lt;/strong&gt; When updating the threshold for an existing &lt;code&gt;DeviceActivityName&lt;/code&gt; (during an extension), iOS would fail to trigger on the new threshold.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Generate a unique activity name containing a session token &lt;code&gt;DeviceActivityName("limit_&amp;lt;UUID&amp;gt;_&amp;lt;sessionToken&amp;gt;")&lt;/code&gt; preceded by an explicit &lt;code&gt;stopMonitoring()&lt;/code&gt; call.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apple Documentation:&lt;/strong&gt; &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivitycenter/startmonitoring(_:during:events:)" rel="nofollow noopener noreferrer"&gt;DeviceActivityCenter.startMonitoring&lt;/a&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;deviceActivityCenter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stopMonitoring&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;previousActivityName&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;newActivity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;DeviceActivityName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"limit_&lt;/span&gt;&lt;span class="se"&gt;\(&lt;/span&gt;&lt;span class="kt"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uuidString&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="s"&gt;_&lt;/span&gt;&lt;span class="se"&gt;\(&lt;/span&gt;&lt;span class="n"&gt;sessionToken&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;deviceActivityCenter&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startMonitoring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newActivity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;during&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;schedule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;events&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The Next-Day Reset Glitch (Dual-Event Schedule Pattern)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Bug:&lt;/strong&gt; If a &lt;a href="https://developer.apple.com/documentation/deviceactivity/deviceactivityschedule" rel="nofollow noopener noreferrer"&gt;DeviceActivitySchedule&lt;/a&gt; was configured with &lt;code&gt;repeats: true&lt;/code&gt; and a user extended their time by 1 minute, the system would apply that same 1-minute threshold the following morning instead of resetting to the full daily limit.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Register two distinct events in a single schedule:

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;mainEvent&lt;/code&gt;: the standard full daily limit for tomorrow.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;extEvent&lt;/code&gt;: a temporary event with the current date embedded in its identifier, expiring at 23:59 tonight.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  OOM Crashes (Code 11) in DeviceActivityReport
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Bug:&lt;/strong&gt; Placing reactive timers (e.g. ticking second counters in SwiftUI) anywhere near a &lt;code&gt;DeviceActivityReport&lt;/code&gt; hierarchy triggered continuous XPC re-evaluations of 7-day usage logs. This caused rapid memory leaks and an instant process termination by iOS with an Out-Of-Memory (OOM) code 11 error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Completely eliminate reactive timers in UI views displaying reports, lock report filter parameters without constant mutations, and refresh data strictly on lifecycle events (&lt;code&gt;onAppear&lt;/code&gt;, &lt;code&gt;willEnterForeground&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Configured It for Myself
&lt;/h2&gt;

&lt;p&gt;Since launch, Scroll Brake has become my primary defense against fragmented attention.&lt;/p&gt;

&lt;p&gt;My personal configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1 Rule:&lt;/strong&gt; "Social Networks" category blocked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Base Limit:&lt;/strong&gt; 5 minutes per day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extension:&lt;/strong&gt; 5 minutes granted per solved math puzzle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard Stop:&lt;/strong&gt; Maximum 5 extensions per day.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I physically cannot spend more than 25 minutes a day inside social apps. More importantly, my brain knows: watching a shared video requires mental friction. That tiny barrier is enough, 8 times out of 10, to set the phone face-down and get back to real work.&lt;/p&gt;

</description>
      <category>doomscrolling</category>
      <category>ios</category>
      <category>swift</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
