<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Apps &#8211; Cristian Ortega</title>
	<atom:link href="https://corteggo.dev/category/apps/feed/" rel="self" type="application/rss+xml" />
	<link>https://corteggo.dev</link>
	<description>iOS Developer</description>
	<lastBuildDate>Sun, 08 Feb 2026 15:57:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://corteggo.dev/wp-content/uploads/2023/12/cropped-IMG_9117-32x32.jpg</url>
	<title>Apps &#8211; Cristian Ortega</title>
	<link>https://corteggo.dev</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">227446408</site>	<item>
		<title>Refactoring and adding features to an iOS app with Codex in Xcode 26.3</title>
		<link>https://corteggo.dev/blog/224303/refactoring-and-adding-features-to-an-ios-app-with-codex-in-xcode-26-3/</link>
		
		<dc:creator><![CDATA[Cristian Ortega]]></dc:creator>
		<pubDate>Sun, 08 Feb 2026 15:53:11 +0000</pubDate>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[agentic]]></category>
		<category><![CDATA[codex]]></category>
		<category><![CDATA[karbs]]></category>
		<category><![CDATA[xcode]]></category>
		<guid isPermaLink="false">https://corteggo.dev/?p=224303</guid>

					<description><![CDATA[A real-world look at modularizing a production iOS app, adding new features, and expanding test coverage in a single weekend using Agentic Engineering in Xcode 26.3. This post focuses on how agent-based workflows shift iOS development from manual implementation to intent, architecture, and validation.]]></description>
										<content:encoded><![CDATA[
<p>Over the past weekend, I ran a practical experiment with the new&nbsp;Agentic Engineering&nbsp;built-in capabilities introduced in&nbsp;Xcode 26.3. I had some thoughts for new features for <a href="https://corteggo.dev/blog/304/new-app-published-karbs/" data-type="post" data-id="304">Karbs</a> and never found the time to work on it.</p>



<p>The application is a carbohydrate-counting app with a modern Swift codebase, written using current Apple frameworks and Composable Architecture. There was no significant technical debt to “clean up”, I already migrated the app to Swift 6 with strict concurrency some time ago. Instead, the goal was to explore how far agentic workflows could go in a realistic but well-structured project—specifically by&nbsp;modularizing the app into multiple local Swift Package<strong>s</strong>&nbsp;and evolving the architecture without sacrificing stability or velocity.</p>



<p>After connecting my ChatGPT account and downloading Codex, in less than six hours I was able to carry out a deep architectural reorganization, add two user-facing features, and significantly expand test coverage—all without manually writing any production or test code (for real).</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Agentic Engineering as a workflow, not a feature</strong></h2>



<p>Agentic Engineering in Xcode is best understood not as an enhancement to code completion, but as a fundamentally different workflow. Instead of assisting at the level of individual lines or symbols, Xcode becomes an execution environment for an autonomous agent that can reason about the entire project.</p>



<p>By providing high-level instructions in natural language, I was able to ask Codex to analyze the codebase, propose a modular structure, migrate existing functionality into local Swift Packages, update dependencies, and ensure everything continued to build and run correctly. It even translated new localization keys automatically to supported languages. The interaction felt much closer to delegating work to a senior engineer than to using a traditional developer tool.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="1024" height="584" src="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-1024x584.png" alt="" class="wp-image-224304" srcset="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-1024x584.png 1024w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-300x171.png 300w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-768x438.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-1536x876.png 1536w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2048x1168.png 2048w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-1920x1095.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Xcode 26.3 writing unit tests automatically</figcaption></figure>
</div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Modularizing into local Swift Packages</strong></h2>



<p>The core refactor consisted of splitting the application into a set of local Swift Packages, each with a clearly defined responsibility. This included isolating domain logic, data access, and shared utilities into separate modules, while keeping the app target itself focused on composition and UI concerns.</p>



<p>What stood out was that the agent did not simply move files around. It adjusted access control, reworked dependencies between modules, updated imports, and adapted existing tests to the new structure. My role throughout the process was to review the proposed architecture, validate the boundaries between packages, and request refinements where the separation did not fully align with my intent.</p>



<p>The entire modularization was completed without manual edits, except for adding the new local packages manually to xcodeproj, yet the resulting structure was coherent and idiomatic Swift.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Adding image suggestions using Apple Intelligence</strong></h2>



<p>Once the modular architecture was in place, I moved on to feature work. The first addition was automatic image suggestions for food items, generated using&nbsp;Apple Intelligenc<strong>e</strong>. When a user adds new food data with carbs info, the app now proposes suggested images, improving both usability and visual appeal.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="586" src="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-1024x586.png" alt="" class="wp-image-224308" srcset="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-1024x586.png 1024w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-300x172.png 300w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-768x439.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-1536x878.png 1536w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-2048x1171.png 2048w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-2-1920x1098.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Xcode 26.3 adding image generation with Apple Intelligence (Image Playground)</figcaption></figure>



<p>From an implementation perspective, Codex handled the integration end-to-end: introducing the necessary abstractions in the domain layer, wiring them through the new modules, updating the UI, and ensuring the feature fit naturally within the existing architecture. The fact that this was built on top of a freshly modularized codebase made the change easier to reason about, not harder. There were few iterations needed to refine the feature the way I liked but I didn&#8217;t write any code at all.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-472x1024.png" alt="" class="wp-image-224305" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6685.png 1179w" sizes="(max-width: 472px) 100vw, 472px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-472x1024.png" alt="" class="wp-image-224306" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6686.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-472x1024.png" alt="" class="wp-image-224307" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6684.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Organizing food items by category</strong></h2>



<p>The second feature introduced categorical organization for food items. While conceptually simple, this change touched several layers of the app: the data model, domain logic, and presentation. In a traditionally structured project, this would have required careful coordination across targets and tests.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="584" src="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-1024x584.png" alt="" class="wp-image-224309" srcset="https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-1024x584.png 1024w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-300x171.png 300w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-768x438.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-1536x876.png 1536w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-2048x1168.png 2048w, https://corteggo.dev/wp-content/uploads/2026/02/Agentic-Engineering-Xcode-26.3-3-1920x1095.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Xcode 26.3 implementing the category feature</figcaption></figure>



<p>Using the agentic workflow, the change was expressed in terms of behavior and user experience. Codex propagated the necessary changes across modules, updated existing code paths, and extended the test suite accordingly. The end result was a feature that felt native to the app rather than bolted on.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-472x1024.png" alt="" class="wp-image-224310" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6688.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-472x1024.png" alt="" class="wp-image-224311" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6687.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="472" height="1024" src="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-472x1024.png" alt="" class="wp-image-224312" srcset="https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2026/02/IMG_6690.png 1179w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Testing at scale</strong></h2>



<p>After the architectural changes and new features were complete, I asked Codex to focus on test coverage. The result was an increase of roughly 200%, with tests that exercised domain logic and validated key behaviors across modules.</p>



<p>What matters here is not the raw number, but the quality. The generated tests were meaningful, readable, and closely aligned with how the app is expected to behave. They provided real confidence that the refactor and new features had not introduced regressions, especially important after a large-scale modularization.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>A shift in the developer’s role</strong></h2>



<p>The most significant aspect of this experience was not raw speed or novelty, but a fundamental shift in what it means to “write software” when friction is removed. The primary constraint was no longer implementation effort, but the precision with which intent could be expressed. Clear instructions and well-defined architectural boundaries consistently led to better outcomes. The engineer’s role naturally shifts toward defining module boundaries, reviewing decisions, and validating results. Deep expertise in Swift, iOS architecture, and the problem domain remains essential, but a large portion of repetitive and mechanical work fades into the background.</p>



<p>While agent-based development is not new—Codex itself was not announced recently—the integration Apple delivered in Xcode 26.3 is exceptionally well executed. The experience feels native: you interact directly with Xcode, without complex setup, configuration, or ongoing troubleshooting. After signing in, you can start working within minutes, and the tooling simply stays out of the way.</p>



<p>On a more personal note, finding time for indie projects has always been a challenge. After spending the workweek programming, it is not always appealing to dedicate entire weekends to writing more code. This workflow changes that dynamic. It allows me to focus on the product decisions and the value I want to deliver, while Xcode handles much of the implementation under my supervision. At a broader, organizational level, the same shift applies: teams can refocus on delivering meaningful user value and ensuring they are building the right things, rather than expending disproportionate energy on process and mechanical execution.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading"><strong>Closing thoughts</strong></h2>



<p>Using Agentic Engineering with Xcode 26.3 and Codex on a real, modern production app demonstrated that this approach is already viable for professional iOS development without spending hours in setting it up. It enables large-scale architectural changes and feature work at a pace that would previously have been unrealistic, even in a well-maintained codebase. With proper Skills, that goes even further. I&#8217;ll write another article about that soon.</p>



<p>This is not about replacing developers. It is about&nbsp;raising the level of abstraction at which we operate. Once you experience that shift firsthand, it becomes clear that this is not a preview of the future—it is already part of the present.</p>



<p><br><em>Apple has set a high bar with this release.</em></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">224303</post-id>	</item>
		<item>
		<title>New app published: Karbs</title>
		<link>https://corteggo.dev/blog/304/new-app-published-karbs/</link>
		
		<dc:creator><![CDATA[Cristian Ortega]]></dc:creator>
		<pubDate>Wed, 13 Mar 2024 17:40:11 +0000</pubDate>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[bolus]]></category>
		<category><![CDATA[carbohydrates]]></category>
		<category><![CDATA[composable-architecture]]></category>
		<category><![CDATA[diabetes]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[karbs]]></category>
		<category><![CDATA[observation]]></category>
		<category><![CDATA[swift]]></category>
		<category><![CDATA[tca]]></category>
		<guid isPermaLink="false">https://corteggo.dev/?p=304</guid>

					<description><![CDATA[A diabetes patient’s carb-counting app.]]></description>
										<content:encoded><![CDATA[
<p>A few months ago, I released a new iOS app called <a href="https://apps.apple.com/us/app/karbs/id6475366360">Karbs</a>. It’s a carb-counting app designed for patients with diabetes.</p>



<h2 class="wp-block-heading"><strong>Why would someone use an app to count carbohydrates?</strong></h2>



<p>My wife has been managing her diabetes since childhood. To keep track of the carbohydrates in her meals, including those cooked at home and ordered at restaurants, she used the Notes app from Apple.</p>



<p>She experimented with various applications that provided databases of nutritional information for common products, but her experience with them was not satisfactory. While some calculations were reasonably accurate, she found that her diabetes management was not effectively controlled due to the inaccuracies in the carbohydrate counting.</p>



<p>This prompted her to create her own list of carbohydrates, which would allow her to count them quickly and accurately. I wanted to assist her in this endeavor by developing an app specifically designed for this purpose.</p>



<h2 class="wp-block-heading"><strong>What is carb counting, and why is it necessary?</strong></h2>



<p>You’ve probably seen a nutrition facts table on all the food you buy from the supermarket.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="387" height="578" src="https://corteggo.dev/wp-content/uploads/2024/03/nfl-howtounderstand-pretzels.png" alt="" class="wp-image-297" srcset="https://corteggo.dev/wp-content/uploads/2024/03/nfl-howtounderstand-pretzels.png 387w, https://corteggo.dev/wp-content/uploads/2024/03/nfl-howtounderstand-pretzels-201x300.png 201w, https://corteggo.dev/wp-content/uploads/2024/03/nfl-howtounderstand-pretzels-40x60.png 40w" sizes="auto, (max-width: 387px) 100vw, 387px" /></figure>
</div>


<p>Carbohydrate counting involves determining the number of carbohydrates in a portion of food you intend to consume. For instance, if you consume the recommended portion (110g), it contains 23g of carbohydrates.</p>



<p>This calculation is crucial for individuals with type-1 diabetes because the amount of insulin they require for injection depends on two factors:</p>



<p>&#8211; The quantity of carbohydrates they plan to consume.</p>



<p>&#8211; The insulin dosage needed for 1g of carbohydrates.</p>



<p>Based on these two factors, type 1 diabetic patients can calculate the appropriate insulin dosage to administer before each meal. For example, if they consume 23g of carbohydrates and the recommended ratio is 2 IU per 10g, they would inject 2.3 IU of insulin.</p>



<p>While this calculation is straightforward and can be mentally performed by even children, it becomes more complex when considering varying ratios based on the time of day, menstrual cycles, and numerous other life factors such as stress or anxiety, as well as active insulin in the body.</p>



<p>In such cases, it is advisable for patients to use a Bolus Calculator to effectively manage their diabetes. This tool tracks different ratios and the active insulin levels in the body from previous meals. Ultimately, the most critical aspect is accurate carbohydrate counting.</p>



<h2 class="wp-block-heading">Look and feel</h2>



<p>I wanted to keep it as simple as possible, so I divided it into two tabs.</p>



<ul class="wp-block-list">
<li>List of meals: Where you count the carbohydrates before eating.</li>



<li>List of food: Where you keep track of the nutritional facts for each food based on your regular consumption.</li>
</ul>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<div class="wp-block-group is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-94bc23d7 wp-block-group-is-layout-flex"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" width="1290" height="2796" src="https://corteggo.dev/wp-content/uploads/2024/03/meals_list.png" alt="" class="wp-image-298" style="width:286px;height:auto" srcset="https://corteggo.dev/wp-content/uploads/2024/03/meals_list.png 1290w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2024/03/meals_list-28x60.png 28w" sizes="auto, (max-width: 1290px) 100vw, 1290px" /></figure>
</div></div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" width="1290" height="2796" src="https://corteggo.dev/wp-content/uploads/2024/03/food_list.png" alt="" class="wp-image-300" style="width:286px;height:auto" srcset="https://corteggo.dev/wp-content/uploads/2024/03/food_list.png 1290w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2024/03/food_list-28x60.png 28w" sizes="auto, (max-width: 1290px) 100vw, 1290px" /></figure>
</div></div>
</div>



<p>Users can simply add their food items in advance, and the counting process becomes straightforward. They can add items from their list, and the calculation will be displayed instantly.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<div class="wp-block-group is-content-justification-center is-nowrap is-layout-flex wp-container-core-group-is-layout-94bc23d7 wp-block-group-is-layout-flex"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" width="1290" height="2796" src="https://corteggo.dev/wp-content/uploads/2024/03/add_meal.png" alt="" class="wp-image-301" style="width:300px;height:auto" srcset="https://corteggo.dev/wp-content/uploads/2024/03/add_meal.png 1290w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2024/03/add_meal-28x60.png 28w" sizes="auto, (max-width: 1290px) 100vw, 1290px" /></figure>
</div></div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%"><div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" width="1290" height="2796" src="https://corteggo.dev/wp-content/uploads/2024/03/meal_details.png" alt="" class="wp-image-302" style="width:300px;height:auto" srcset="https://corteggo.dev/wp-content/uploads/2024/03/meal_details.png 1290w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2024/03/meal_details-28x60.png 28w" sizes="auto, (max-width: 1290px) 100vw, 1290px" /></figure>
</div></div>
</div>



<p>Since my wife uses the Bolus Calculator from the mySugr app and importing data from Apple Health is a supported feature, I’ve also implemented data export.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" width="1179" height="2556" src="https://corteggo.dev/wp-content/uploads/2024/03/apple_health.png" alt="" class="wp-image-299" style="width:276px;height:auto" srcset="https://corteggo.dev/wp-content/uploads/2024/03/apple_health.png 1179w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-138x300.png 138w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-472x1024.png 472w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-768x1665.png 768w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-709x1536.png 709w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-945x2048.png 945w, https://corteggo.dev/wp-content/uploads/2024/03/apple_health-28x60.png 28w" sizes="auto, (max-width: 1179px) 100vw, 1179px" /></figure>
</div>


<h2 class="wp-block-heading"><strong>Behind the scenes</strong></h2>



<p>I wanted to take this opportunity to create a new application from scratch and experiment with the new Observation tools introduced in version 1.7.0 of The Composable Architecture (TCA).</p>



<p>Implementing the app was incredibly straightforward. I only needed to create SwiftUI views and reducers for meals, food lists, meal counting, and item details. The integration of the Observation framework into the TCA library made the data bindings between the views and reducers seem like magic.</p>



<p>The most challenging part was persisting the data. I opted to store it in a simple file within the app’s sandbox.</p>



<p>One of the significant advantages of using TCA was that all data modeling was implemented using structs. This allowed me to provide users with the flexibility to modify the carbohydrate content of a food item without affecting the calculations for previous meals, including the same food item. For instance, if a user decides to purchase it from a different supermarket and the nutrition facts are slightly different, they can adjust the carbohydrate content without impacting the meal calculations.</p>



<p>The Composable Architecture is an exceptional implementation of the unidirectional data flow paradigm, elevating SwiftUI apps to new heights. It took me just four days to develop and publish my app, including creating a <a href="https://karbs.app/">promotional website</a> and professional AppStore screenshots, which I’ll delve into in a separate article.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">304</post-id>	</item>
	</channel>
</rss>
