<?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: Ravi Seta</title>
    <description>The latest articles on DEV Community by Ravi Seta (@raviseta).</description>
    <link>https://dev.to/raviseta</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%2F4154336%2Fa7255000-42c4-4e01-b12d-db20f8465938.png</url>
      <title>DEV Community: Ravi Seta</title>
      <link>https://dev.to/raviseta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raviseta"/>
    <language>en</language>
    <item>
      <title>Fixing a Misleading Fitness Insight in React Native Using Apple HealthKit</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Sun, 08 Nov 2026 11:25:40 +0000</pubDate>
      <link>https://dev.to/raviseta/fixing-a-misleading-fitness-insight-in-react-native-using-apple-healthkit-1hek</link>
      <guid>https://dev.to/raviseta/fixing-a-misleading-fitness-insight-in-react-native-using-apple-healthkit-1hek</guid>
      <description>&lt;p&gt;I'm building &lt;strong&gt;EdgeFit&lt;/strong&gt;, an open-source, privacy-first fitness companion using React Native, Expo, TypeScript, Apple HealthKit, and SQLite.&lt;/p&gt;

&lt;p&gt;My goal is to build meaningful activity insights while keeping personal health data on the device.&lt;/p&gt;

&lt;p&gt;Recently, while testing the app on my iPhone, I discovered an interesting problem.&lt;/p&gt;

&lt;p&gt;The app was producing mathematically correct insights that weren't particularly useful.&lt;/p&gt;

&lt;p&gt;It also avoids generating discouraging comparisons early in the morning when there isn't enough activity data.&lt;/p&gt;

&lt;p&gt;This update reinforced something important for me as a developer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A mathematically correct result isn't always a meaningful result.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The context behind a calculation matters just as much as the calculation itself.&lt;/p&gt;

&lt;p&gt;By changing the comparison baseline, I made EdgeFit's insights more useful without increasing the amount of personal health data stored on the device.&lt;/p&gt;

&lt;p&gt;EdgeFit is open source, and I'd welcome feedback or contributions from React Native and iOS developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/raviseta/edgefit" rel="noopener noreferrer"&gt;https://github.com/raviseta/edgefit&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: #reactnative #ios #healthkit #opensource&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>mobile</category>
      <category>reactnative</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Understanding SwiftUI's layoutPriority: HStack, ZStack, and Custom Layouts</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Thu, 05 Nov 2026 11:10:31 +0000</pubDate>
      <link>https://dev.to/raviseta/understanding-swiftuis-layoutpriority-hstack-zstack-and-custom-layouts-19hi</link>
      <guid>https://dev.to/raviseta/understanding-swiftuis-layoutpriority-hstack-zstack-and-custom-layouts-19hi</guid>
      <description>&lt;p&gt;SwiftUI makes building interfaces straightforward, but its layout system can sometimes produce unexpected results.&lt;/p&gt;

&lt;p&gt;One modifier that developers often reach for is &lt;code&gt;.layoutPriority()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;swift&lt;br&gt;
Text("Important Content")&lt;br&gt;
    .layoutPriority(1)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This can help resolve layout issues, but what exactly does the priority value mean? And does the modifier behave the same way in every container?&lt;/p&gt;

&lt;p&gt;To explore these questions, I built an interactive open-source project called &lt;strong&gt;SwiftUI Layout Lab&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What does layoutPriority do?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;.layoutPriority()&lt;/code&gt; modifier provides a priority value that parent layouts can use when determining how to size their children.&lt;/p&gt;

&lt;p&gt;The default priority is &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A higher priority doesn't directly specify a width, height, or percentage of available space. Its effect depends on the parent layout algorithm and the sizing behavior of the child views.&lt;/p&gt;

&lt;p&gt;For example, assigning a priority of &lt;code&gt;100&lt;/code&gt; doesn't mean a view will receive 100 times more space than a view with priority &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Experiment 1: HStack and available space
&lt;/h2&gt;

&lt;p&gt;An &lt;code&gt;HStack&lt;/code&gt; arranges views horizontally, but what happens when there isn't enough space for every view to receive its preferred width?&lt;/p&gt;

&lt;p&gt;In Layout Lab, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select one of three views.&lt;/li&gt;
&lt;li&gt;Change its layout priority.&lt;/li&gt;
&lt;li&gt;Adjust the available container width.&lt;/li&gt;
&lt;li&gt;Observe the actual measured widths.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps demonstrate how priority influences the order in which an &lt;code&gt;HStack&lt;/code&gt; proposes sizes to its children.&lt;/p&gt;

&lt;p&gt;The resulting widths also depend on each child's sizing behavior.&lt;/p&gt;
&lt;h2&gt;
  
  
  Experiment 2: ZStack and container sizing
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;ZStack&lt;/code&gt; overlays its children, so its layout behavior differs from an &lt;code&gt;HStack&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the second experiment, you can adjust the priority of a text view and compare the measured ZStack size with its surrounding frame.&lt;/p&gt;

&lt;p&gt;This demonstrates that layout priority can affect more than just the distribution of horizontal space.&lt;/p&gt;
&lt;h2&gt;
  
  
  Experiment 3: Building a custom Layout
&lt;/h2&gt;

&lt;p&gt;SwiftUI's &lt;code&gt;Layout&lt;/code&gt; protocol lets developers define their own sizing and placement rules.&lt;/p&gt;

&lt;p&gt;In the third experiment, I implemented a custom layout that reads each subview's priority using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;subview&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;priority&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The layout uses that value to order the views while keeping their cells equally sized.&lt;/p&gt;

&lt;p&gt;This is an important distinction: a custom layout can define its own interpretation of priority rather than automatically following the behavior of an &lt;code&gt;HStack&lt;/code&gt; or &lt;code&gt;ZStack&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Working through these experiments reinforced a few useful lessons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Layout priority is not a size multiplier.&lt;/li&gt;
&lt;li&gt;The parent layout determines how priority influences sizing or placement.&lt;/li&gt;
&lt;li&gt;Flexible shapes, text, and fixed-size views can respond differently.&lt;/li&gt;
&lt;li&gt;Custom layouts can use priority values to implement entirely different policies.&lt;/li&gt;
&lt;li&gt;Live measurements are especially useful when investigating SwiftUI layout behavior.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Explore the project
&lt;/h2&gt;

&lt;p&gt;SwiftUI Layout Lab includes interactive controls, measured view dimensions, dynamic code examples, accessibility support, and XCTest examples.&lt;/p&gt;

&lt;p&gt;The README also includes a demo video.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/raviseta/SwiftUI-Layout-priority" rel="noopener noreferrer"&gt;https://github.com/raviseta/SwiftUI-Layout-priority&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've encountered an unusual SwiftUI layout issue, I'd be interested to hear about it. It might make a useful experiment for the next version of Layout Lab.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: swiftui, ios, swift, opensource&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>mobile</category>
      <category>softwaredevelopment</category>
      <category>swift</category>
    </item>
    <item>
      <title>Building Adaptive Activity Goals in a Privacy-First React Native Fitness App</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Mon, 02 Nov 2026 06:51:57 +0000</pubDate>
      <link>https://dev.to/raviseta/building-adaptive-activity-goals-in-a-privacy-first-react-native-fitness-app-4827</link>
      <guid>https://dev.to/raviseta/building-adaptive-activity-goals-in-a-privacy-first-react-native-fitness-app-4827</guid>
      <description>&lt;p&gt;I've reached another milestone in EdgeFit, my open-source, privacy-first fitness companion built with React Native, TypeScript, HealthKit, and SQLite.&lt;/p&gt;

&lt;p&gt;The latest feature is &lt;strong&gt;Adaptive Activity Goals&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This feature builds on two earlier milestones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A 30-Day Activity Calendar to visualize historical activity.&lt;/li&gt;
&lt;li&gt;Personal Activity Insights to explain trends and consistency.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now EdgeFit can use that history to suggest personalized daily step goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why adaptive goals?
&lt;/h2&gt;

&lt;p&gt;Many fitness applications use a fixed daily step target.&lt;/p&gt;

&lt;p&gt;But a single target doesn't reflect everyone's activity patterns, routines, or starting point.&lt;/p&gt;

&lt;p&gt;I wanted to explore a different approach: suggest goals based on the user's own recent activity rather than assuming everyone should aim for the same number.&lt;/p&gt;

&lt;p&gt;The challenge isn't simply calculating an average. It's deciding when a recommendation is supported by enough data, how quickly a goal should change, and how to keep users in control.&lt;/p&gt;

&lt;h2&gt;
  
  
  The approach: Explainable rules first
&lt;/h2&gt;

&lt;p&gt;For this phase, I chose deterministic recommendations instead of introducing machine learning.&lt;/p&gt;

&lt;p&gt;The design focuses on several principles.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Use recent activity history
&lt;/h3&gt;

&lt;p&gt;Recent step data provides a starting point for a personalized recommendation.&lt;/p&gt;

&lt;p&gt;A goal can be informed by a person's recorded activity rather than an arbitrary universal target.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Account for missing data
&lt;/h3&gt;

&lt;p&gt;Missing HealthKit data should not automatically be treated as zero steps.&lt;/p&gt;

&lt;p&gt;Otherwise, incomplete history could produce an artificially low recommendation.&lt;/p&gt;

&lt;p&gt;Data coverage matters as much as the calculation itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Avoid sudden changes
&lt;/h3&gt;

&lt;p&gt;A single unusually active day shouldn't necessarily result in a substantially higher daily goal.&lt;/p&gt;

&lt;p&gt;Recommendations should reflect meaningful activity patterns rather than isolated spikes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Explain the recommendation
&lt;/h3&gt;

&lt;p&gt;Users should be able to understand why a goal was suggested.&lt;/p&gt;

&lt;p&gt;This is one reason deterministic rules are valuable: the inputs and decision logic can be inspected and tested.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Preserve user control
&lt;/h3&gt;

&lt;p&gt;A recommendation should remain a recommendation.&lt;/p&gt;

&lt;p&gt;Users need the ability to decide which goals work for them instead of being forced to follow an algorithm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the architecture privacy-first
&lt;/h2&gt;

&lt;p&gt;EdgeFit uses HealthKit for activity data and SQLite for local persistence.&lt;/p&gt;

&lt;p&gt;Adaptive Activity Goals extends this local-first approach, rather than introducing a cloud-based recommendation service.&lt;/p&gt;

&lt;p&gt;The aim is to make personal health data useful without making remote processing a prerequisite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not use machine learning yet?
&lt;/h2&gt;

&lt;p&gt;I'm interested in on-device AI, but I don't want to add ML simply to label a feature intelligent.&lt;/p&gt;

&lt;p&gt;First, I want a reliable rule-based baseline.&lt;/p&gt;

&lt;p&gt;Then I can experiment with a lightweight on-device model and evaluate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it produce more useful recommendations?&lt;/li&gt;
&lt;li&gt;Is the improvement measurable?&lt;/li&gt;
&lt;li&gt;How much latency does inference introduce?&lt;/li&gt;
&lt;li&gt;What is the memory and energy cost?&lt;/li&gt;
&lt;li&gt;Can the recommendation still be explained?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a deterministic algorithm works just as well, that's a useful engineering finding too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;My next goal is to investigate on-device machine learning for activity pwersonalization.&lt;/p&gt;

&lt;p&gt;EdgeFit is open source, and feedback is welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/raviseta/edgefit" rel="noopener noreferrer"&gt;https://github.com/raviseta/edgefit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're building health, fitness, or privacy-first mobile applications, I'd love to hear how you approach adaptive recommendations and incomplete sensor data.&lt;/p&gt;

&lt;h1&gt;
  
  
  reactnative #ios #healthtech #privacy
&lt;/h1&gt;

</description>
      <category>mobile</category>
      <category>opensource</category>
      <category>reactnative</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Building Privacy-First Personal Activity Insights in React Native</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Sat, 24 Oct 2026 10:18:39 +0000</pubDate>
      <link>https://dev.to/raviseta/building-privacy-first-personal-activity-insights-in-react-native-1p2k</link>
      <guid>https://dev.to/raviseta/building-privacy-first-personal-activity-insights-in-react-native-1p2k</guid>
      <description>&lt;p&gt;After implementing a 30-Day Activity Calendar in EdgeFit, I wanted to move beyond simply displaying fitness metrics.&lt;/p&gt;

&lt;p&gt;The next milestone was Personal Activity Insights.&lt;/p&gt;

&lt;p&gt;EdgeFit is my privacy-first fitness companion built using React Native, TypeScript, HealthKit, and SQLite.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's new?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Activity Consistency
&lt;/h3&gt;

&lt;p&gt;Understand how many days have recorded activity across a recent period.&lt;/p&gt;

&lt;h3&gt;
  
  
  Weekly Step Comparison
&lt;/h3&gt;

&lt;p&gt;Compare average daily steps across consecutive weeks, while accounting for missing data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exercise Frequency
&lt;/h3&gt;

&lt;p&gt;Understand how many different days contain recorded workouts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The engineering challenge
&lt;/h2&gt;

&lt;p&gt;One important lesson when working with health data is that missing data is not the same as zero activity.&lt;/p&gt;

&lt;p&gt;If a metric is unavailable, treating it as zero could produce misleading comparisons and insights.&lt;/p&gt;

&lt;p&gt;That's why I'm focusing on explainable calculations and data-coverage requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not use AI immediately?
&lt;/h2&gt;

&lt;p&gt;I want to explore on-device machine learning, but first I need a deterministic baseline.&lt;/p&gt;

&lt;p&gt;Rule-based insights are easier to test, explain, and evaluate.&lt;/p&gt;

&lt;p&gt;Later, I can compare them with a small on-device model to determine whether machine learning offers measurable improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy-first architecture
&lt;/h2&gt;

&lt;p&gt;EdgeFit builds on HealthKit and locally persisted activity data. Personal Activity Insights extends this existing architecture without requiring a cloud AI service.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;My next goal is to experiment with on-device ML and compare its usefulness, latency, memory consumption, and energy usage against deterministic insights.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/raviseta/edgefit" rel="noopener noreferrer"&gt;https://github.com/raviseta/edgefit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love feedback from other mobile developers working with HealthKit, privacy-first architecture, or on-device intelligence.&lt;/p&gt;

&lt;p&gt;Tags: reactnative, ios, privacy, healthtech&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>privacy</category>
      <category>reactnative</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Building a 30-Day Activity Calendar for a Privacy-First Fitness App</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Mon, 19 Oct 2026 11:11:18 +0000</pubDate>
      <link>https://dev.to/raviseta/building-a-30-day-activity-calendar-for-a-privacy-first-fitness-app-5f54</link>
      <guid>https://dev.to/raviseta/building-a-30-day-activity-calendar-for-a-privacy-first-fitness-app-5f54</guid>
      <description>&lt;p&gt;A fitness dashboard can tell you how active you are today. But a single day rarely tells the whole story.&lt;/p&gt;

&lt;p&gt;I wanted EdgeFit to make it easier to recognize activity patterns over time without adding a cloud service or compromising its local-first architecture.&lt;/p&gt;

&lt;p&gt;So I added a 30-Day Activity Calendar.&lt;/p&gt;

&lt;p&gt;EdgeFit is an open-source fitness app built with React Native, Expo, TypeScript, HealthKit, and SQLite. It reads activity data from Apple Health on iOS, stores processed summaries locally, and generates explainable insights on the device.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/raviseta/edgefit" rel="noopener noreferrer"&gt;https://github.com/raviseta/edgefit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>mobile</category>
      <category>privacy</category>
      <category>reactnative</category>
    </item>
    <item>
      <title>I built a fitness dashboard that never leaves your phone (Expo, HealthKit, SQLite)</title>
      <dc:creator>Ravi Seta</dc:creator>
      <pubDate>Sun, 11 Oct 2026 14:18:32 +0000</pubDate>
      <link>https://dev.to/raviseta/i-built-a-fitness-dashboard-that-never-leaves-your-phone-expo-healthkit-sqlite-3mji</link>
      <guid>https://dev.to/raviseta/i-built-a-fitness-dashboard-that-never-leaves-your-phone-expo-healthkit-sqlite-3mji</guid>
      <description>&lt;p&gt;Most health apps work the same way: read your data, upload it, then compute something on a server and show it back to you.&lt;/p&gt;

&lt;p&gt;I wanted to see how far I could get with the opposite approach. &lt;strong&gt;EdgeFit&lt;/strong&gt; is an iOS app that reads activity data from Apple Health and does everything else on the device: the daily summaries, the Activity Score, and the insights. There is no account, no backend and no analytics SDK.&lt;/p&gt;

&lt;p&gt;The interesting part is replacing the rule-based insights with a small on-device model, behind the same interface, and measuring whether it's actually better than the rules. That's the experiment this MVP was built to enable.&lt;/p&gt;

&lt;p&gt;If you try it, I'd love to hear what you think of the architecture, especially how you'd handle the permission and empty states.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/raviseta/edgefit" rel="noopener noreferrer"&gt;https://github.com/raviseta/edgefit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>mobile</category>
      <category>opensource</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
