<?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>Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Wed, 08 Apr 2026 23:28:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Android Design Extensions 4.5</title>
		<link>https://blog.xojo.com/2026/04/09/android-design-extensions-4-5/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Thu, 09 Apr 2026 15:00:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16166</guid>

					<description><![CDATA[Xojo 2026r1 has just been released, and it was time to revisit and update the Android Design Extensions. They are now available in version 4.5.&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2026r1 has just been released, and it was time to revisit and update the Android Design Extensions. They are now available in version 4.5. This release focuses on the MobileSlider control, which in Xojo 2026r1 now uses the modern Material Slider under the hood (<a href="https://developer.android.com/reference/com/google/android/material/slider/Slider" target="_blank" rel="noreferrer noopener">https://developer.android.com/reference/com/google/android/material/slider/Slider</a>). This update provides a huge number of new possibilities for customizing the appearance of the MobileSlider, giving your Android apps much greater flexibility in designing their UI.</p>



<p>In total, more than 60 new declares have been added for MobileSlider, allowing you to control virtually every UI parameter of the control—whether it’s the shape of the thumb, its color, the track colors (both for the active/left and inactive/right portions), and much more. You can also set the step size, similar to what you’re used to on the desktop.</p>



<figure class="wp-block-image size-large is-resized"><img fetchpriority="high" decoding="async" width="461" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-461x1024.png" alt="" class="wp-image-16167" style="aspect-ratio:0.5625;object-fit:cover;width:337px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-461x1024.png 461w, https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-135x300.png 135w, https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-768x1707.png 768w, https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-691x1536.png 691w, https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1-922x2048.png 922w, https://blog.xojo.com/wp-content/uploads/2026/04/android-image-1.png 1080w" sizes="(max-width: 461px) 100vw, 461px" /></figure>



<p>Just take a look at the updated Android Design Extensions demo app and try it out.</p>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library. I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to share <a href="https://www.paypal.com/paypalme/MTrippensee">here</a>. You can download the project with many examples at <a href="https://github.com/XojoGermany/AndroidDesignExtensions" target="_blank" rel="noreferrer noopener">https://github.com/XojoGermany/AndroidDesignExtensions</a>.</p>



<p>Happy coding!</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Code Signing on macOS: What Developers Need to Know, Part 4</title>
		<link>https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 07 Apr 2026 19:00:00 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16119</guid>

					<description><![CDATA[In the previous article, we saw how signing a macOS app is more than just handling certificates. Other factors come into play based on the&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In the <a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/" target="_blank" rel="noreferrer noopener">previous article</a>, we saw how signing a macOS app is more than just handling certificates. Other factors come into play based on the distribution method you choose and the features it will offer.</p>



<span id="more-16119"></span>



<p>Now, that we already know all the pieces involved in this particular puzzle (certificates, <a href="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/">sandboxing, notarization, hardened runtime</a>, etc.), the question to answer is…</p>



<h2 class="wp-block-heading">What kind of macOS code signing do you want to do today?</h2>



<p>Apple developer certificates installed on your Mac determine the kind of code signing and, thus, the distribution options available for your macOS app. They can also support certain macOS security requirements that distribution methods or features may impose, such as entitlements or provisioning profiles.</p>



<p>This diagram can help determine these based on the certificate used when signing the app, so you can get a better idea:</p>


<div class="wp-block-image">
<figure class="aligncenter"><a href="https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-scaled.png"><img decoding="async" width="2560" height="678" src="https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-scaled.png" alt="" class="wp-image-16122" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-scaled.png 2560w, https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-300x79.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-1024x271.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-768x203.png 768w, https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-1536x407.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/04/macOS-Apps-SigningC-2048x542.png 2048w" sizes="(max-width: 2560px) 100vw, 2560px" /></a></figure>
</div>


<p>As a practical summary:</p>



<ul class="wp-block-list">
<li><strong>Ad-Hoc signing / None</strong>: This option makes sense primarily when you&#8217;re developing and running or debugging the app on your Mac or on the same computer, since it typically doesn&#8217;t require special entitlements or provisioning profiles.</li>



<li><strong>Apple Developer / Development</strong>. Using this certificate enables sandboxing, hardened runtime, entitlements and provisioning profiles even when debugging from the IDE or testing the build on your own computer. It offers a better experience, but you won&#8217;t be able to notarize it or bypass the Gatekeeper barrier if distributed to other users.</li>



<li><strong>Developer ID Application / Direct Distribution</strong>. With this certificate, you can notarize your app so Gatekeeper won’t block distribution outside the Mac App Store. When debugging from the IDE, entitlements and provisioning profiles (if needed) are applied as well, along with optional sandboxing.</li>



<li><strong>Apple Distribution / App Store</strong>. Use this certificate when the app has been tested and it is ready to be sent to App Store Connect… or even when you&#8217;re planning to send it to the App Store Connect so a group of beta-testers can test it using Apple&#8217;s TestFlight.</li>
</ul>



<h2 class="wp-block-heading">How the Xojo IDE helps with all of this?</h2>



<p>We have been adding features to the Xojo IDE to make code signing and distributing your macOS apps an easier and leaner process; most of these are available under Build Settings > macOS > Sign:</p>



<h3 class="wp-block-heading">Developer ID &#8211; Build For</h3>



<p>This is the <a href="https://blog.xojo.com/2026/03/31/team-based-signing-arrives-to-macos/" target="_blank" rel="noreferrer noopener">most recent addition</a> to better deal with the first, and most important, piece of the puzzle: handling certificates! Instead of having to go back and forth between the Keychain Access and the Xojo IDE to copy/paste the expected data from the certificates for the kind of build or distribution you plan for the app, you can now find under the Developer ID field all the available Developer Teams (usually just yours) and, when a Developer Team is selected, the &#8220;Build For&#8221; popup menu will be populated with the available options for builds/distributions based on the installed developer certificates for that team.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" width="834" height="634" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.50.45.png" alt="" class="wp-image-16137" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.50.45.png 834w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.50.45-300x228.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.50.45-768x584.png 768w" sizes="(max-width: 834px) 100vw, 834px" /></figure>
</div>


<p>When all the Apple developer certificates are properly installed for a given Developer Team, the available options will be: Development, Direct Distribution and App Store (plus None, meaning Ad-Hoc signing).</p>



<p>If you find that some of these options are missing from the &#8220;Build For&#8221; popup menu, that means the corresponding certificate is not installed or there is some kind of issue with that certificate (maybe it has expired or has its private key missing). In those cases, we included the &#8220;Inspect…&#8221; option under the &#8220;Developer ID&#8221; popup menu. Selecting Inspect lets you gain a better picture about everything related to your Apple developer certificates and even get advice about how to fix the most common issues.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1914" height="1560" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39.png" alt="" class="wp-image-16138" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39.png 1914w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39-300x245.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39-1024x835.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39-768x626.png 768w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.53.39-1536x1252.png 1536w" sizes="auto, (max-width: 1914px) 100vw, 1914px" /></figure>
</div>


<h3 class="wp-block-heading">Sandboxing</h3>



<p>Enable this feature if you plan to debug, build, or distribute your app as a sandboxed app. In that case, the associated editor will make it even easier to enable the sandboxing features that may apply to your particular app. The IDE will take care of all the rest. Note that, while sandboxing was previously only applied to built/distributed macOS apps in previous Xojo releases, starting with Xojo 2026r1 it is also applied when the app is being debugged from the IDE.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1012" height="1260" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.02.png" alt="" class="wp-image-16139" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.02.png 1012w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.02-241x300.png 241w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.02-822x1024.png 822w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.02-768x956.png 768w" sizes="auto, (max-width: 1012px) 100vw, 1012px" /></figure>
</div>


<h3 class="wp-block-heading">Hardened Runtime</h3>



<p>Enable this option mainly for apps meant to be built and/or distributed using Direct Distribution or the App Store options. While this is optional when distributing it via the Mac App Store, it is still highly recommended to enable it for that scenario.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1140" height="1408" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.45.png" alt="" class="wp-image-16140" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.45.png 1140w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.45-243x300.png 243w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.45-829x1024.png 829w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.55.45-768x949.png 768w" sizes="auto, (max-width: 1140px) 100vw, 1140px" /></figure>
</div>


<p>When the app is debugged from the IDE, the hardened runtime won&#8217;t be applied even if it is enabled… mainly so you can debug it!</p>



<p>As with sandboxing, the hardened runtime option also includes its own editor to make your app-specific selections easier. The IDE will take care of the under the hood processing when the app is built.</p>



<h3 class="wp-block-heading">Notarization</h3>



<p>If you haven&#8217;t started notarizing your macOS apps yet, now is the time! This will be possible only with the Direct Distribution option (equivalent to the Developer ID Application Certificate) and implies enabling hardened runtime. When you enable notarization, the associated hardened runtime will be enabled for you, even if you don&#8217;t select additional option from its editor.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1524" height="950" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-12.13.18.png" alt="" class="wp-image-16147" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-12.13.18.png 1524w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-12.13.18-300x187.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-12.13.18-1024x638.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-12.13.18-768x479.png 768w" sizes="auto, (max-width: 1524px) 100vw, 1524px" /></figure>
</div>


<p>Notarization requires the use of what Apple calls an <a href="https://support.apple.com/en-us/102654" target="_blank" rel="noreferrer noopener">App-Specific Password</a>, which you can set up by following the steps found in the window that appears when the associated Setup button is clicked.</p>



<p>Once everything has been setup, the notarization process will happen the next time the app is built. Note, the notarization process will not take place when the app is debugged from the IDE (as with hardened runtime); you don&#8217;t need to specifically disable that option.</p>



<h3 class="wp-block-heading">Entitlements</h3>



<p>The combination of certain certificates, build, and distribution options you choose for your app may require you to set a series of entitlements; for example, when enabling sandboxing and/or hardened runtime. Additionally, with Xojo 2026r1 it is possible to attach your built or debugged apps to Xcode Instruments for further inspections beyond the current capabilities of Xojo&#8217;s debugger.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="806" height="76" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.56.55.png" alt="" class="wp-image-16142" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.56.55.png 806w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.56.55-300x28.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.56.55-768x72.png 768w" sizes="auto, (max-width: 806px) 100vw, 806px" /></figure>
</div>


<p>In all of the above scenarios, Xojo will take care of the required entitlements without you needing to notice it; but if your app also makes use of some features that require adding extra entitlements (and probably a matching provisioning profile), as happens with most of the Apple specific services such as iCloud, Keychain, In-App Purchases, etc., you will need to craft the corresponding .plist file for them and add it using the User Entitlements option. These entitlements will be combined with the ones automatically generated by Xojo and included in the app during the code signing process.</p>



<h3 class="wp-block-heading">Provisioning Profiles</h3>



<p>On macOS, provisioning profiles are supported by a Copy Files build step, which requires selecting Contents as the destination folder. Not ideal, but that way you can select what kind of provisioning profile you want to apply to builds or when debugging your project (this is a new feature starting with Xojo 2026r1).</p>



<h3 class="wp-block-heading">Property List Editor</h3>



<p>The ability to add your own property list entries to the compiled/distributed macOS app is enhanced by a complete Property List Editor available under Build Settings &gt; macOS since Xojo 2025. It makes it easier to create these entries and even save them for reuse in other projects.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1424" height="1088" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.58.09.png" alt="" class="wp-image-16143" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.58.09.png 1424w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.58.09-300x229.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.58.09-1024x782.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.58.09-768x587.png 768w" sizes="auto, (max-width: 1424px) 100vw, 1424px" /></figure>
</div>


<p>The entries you add with the Property List Editor will be combined with those automatically generated by the IDE, or with entries that may have been added to the project using previous methods (such as adding an external .plist file to the Project Navigator sidebar).</p>



<h3 class="wp-block-heading">Publishing to the Mac App Store</h3>



<p>While there are some steps that need to be done both at <a href="https://developer.apple.com" target="_blank" rel="noreferrer noopener">Apple&#8217;s Developers Portal</a> and <a href="https://appstoreconnect.apple.com/login" target="_blank" rel="noreferrer noopener">App Store Connect Website</a>, you will be able to set your app category directly from the IDE under Build Settings &gt; macOS.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="816" height="184" src="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.59.23.png" alt="" class="wp-image-16144" srcset="https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.59.23.png 816w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.59.23-300x68.png 300w, https://blog.xojo.com/wp-content/uploads/2026/04/Screenshot-2026-04-02-at-11.59.23-768x173.png 768w" sizes="auto, (max-width: 816px) 100vw, 816px" /></figure>
</div>


<p>In addition, the Publish feature (responsible for sending your app to App Store Connect) will be in charge of verifying that the project meets everything that Apple requires prior to send it for reviewing or making available through TestFlight.</p>



<p>In order for the Publish button to be enabled, you need to select the App Store option for the selected &#8220;Developer ID&#8221; Team from the &#8220;Build For&#8221; popup menu under Build Settings > macOS > Sign.</p>



<h2 class="wp-block-heading">Dealing with Certificates Issues</h2>



<p>It doesn&#8217;t matter if your app requires entitlements, provisioning profiles, or if you are going to notarize it or enable sandboxing plus hardened runtime. All of this is based on the signing of your developer certificates, so let&#8217;s go back and see how to deal with the most common issues related with these.</p>



<h3 class="wp-block-heading">Backup Your Certificates</h3>



<p>Once you have installed your certificates, the first thing you should do is export them from Keychain Access to a secure place (ideally, not in your computer but an external USB key or drive). Why? Here&#8217;s why:</p>



<ol class="wp-block-list">
<li>Apple only allows you to create certificates a maximum of five times per year (mostly because they expire after one year, <a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">as we did see in a previous entry</a>). Every time you install certificates, whether on the same computer or a different Mac you own, they count as new certificates, with different serial numbers and SHA1/SHA256 data. In practice, this reduces the number of installations available per year.</li>



<li>In addition, some features, like provisioning profiles, rely on the specific certificates selected during their creation. You will get a signing error if you build the app on a Mac with different certificates.</li>



<li>If you need to restore your Mac or migrate to a new Mac, your certificates won&#8217;t be restored using the usual tools from Apple. Having a backup of your developer certificates will make easier to restore them in Keychain Access after restoring your computer or when you change to a new Mac.</li>
</ol>



<p>Instead of using Xcode to install new certificates on every Mac you intend to use for code signing, install them on just one Mac, export them from that Mac, and import them into the Keychain Access app on your other Macs. This ensures all of your Macs will use the same certificates.</p>



<h3 class="wp-block-heading">Review Pending Apple Developer Agreements</h3>



<p>This is one of the most common issues related to code signing: it just stops working and you don&#8217;t know why and even the returned error messages doesn&#8217;t reveal why. If you&#8217;re sure you have the required developer certificates installed, they are valid (not expired), and don&#8217;t have any other issues then it is time to sign-in into the Apple Developer and App Store Connect portals to check if there are some pending agreements you need to accept.</p>



<h3 class="wp-block-heading">Missing and Expired Certificates</h3>



<p>This is another very common issue. Starting with Xojo 2026r1, we made easier to detect this situation. If a given certificate for your team is not installed, then you won&#8217;t be able to select the signing option from the &#8220;Build For&#8221; popup menu under Build Settings > macOS > Sign. You can further dig into it selecting the &#8220;Inspect…&#8221; option from the &#8220;Developer ID&#8221; popup menu, and even receive some advice on how to fix it!</p>



<h3 class="wp-block-heading">Certificates are all good…&nbsp;but the signing throws errors</h3>



<p>When using the Direct Distribution or App Store options, the code signing process uses Apple Time Servers to add the date and time as part of the signing. That means that the computer requires an active Internet connection, and that such time servers must be reachable from Apple’s side (it’s very rare for them to be down).</p>



<p>Other operations such as notarization and publish also require an active Internet connection, and the corresponding Apple services must be up and running. Some times these can be down.</p>



<p>When these issues occur, it is a good idea to check the <a href="https://developer.apple.com/system-status/" target="_blank" rel="noreferrer noopener">Apple Services status webpage</a>.</p>



<h2 class="wp-block-heading">In summary</h2>



<p>It&#8217;s been a long four-article ride with the aim of giving you a clearer understanding of what happens under the hood when you code sign your macOS apps, what kind of certificate you need for a given distribution, and which macOS security features are supported by Development, Developer ID Application or Apple Distribution certificates; and, most importantly, how Xojo helps you with all of it!</p>



<p>I&#8217;d love to hear about your experience with macOS code signing, the rough corners you still need to tackle, and other improvements you would welcome. The <a href="https://forum.xojo.com" target="_blank" rel="noreferrer noopener">Xojo forums</a> are a great place to keep the conversation going!</p>



<p>Happy macOS code signing with Xojo!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Custom URI to Compliment your Web Application</title>
		<link>https://blog.xojo.com/2026/04/06/using-custom-uri-to-compliment-your-web-application/</link>
		
		<dc:creator><![CDATA[Wayne Golding]]></dc:creator>
		<pubDate>Mon, 06 Apr 2026 14:10:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Custom URI URL Protocol]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16094</guid>

					<description><![CDATA[There are times when you will want to use the resources of your web application’s user computer, for example, printing a sales docket for a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>There are times when you will want to use the resources of your web application’s user computer, for example, printing a sales docket for a Point-Of-Sale site. In this article, I will expand on William Yu’s blog post <a href="https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/">Custom URI Schemes On Windows</a> from 2016. Again, I’m going to use a simple alert-type application, add an Inno Setup script to install the client app, and show how to invoke that app from your web application.</p>



<p>First, I’m going to create a headless desktop application. A console application would work, but shows a command box.</p>



<p>In the Xojo IDE, create a new desktop project and delete Window1 and MainMenuBar. Then add the Opening Event Handler to App and add this code:</p>



<pre class="wp-block-code"><code>Self.AllowAutoQuit = True</code></pre>



<p>This will allow the application to quit when done.</p>



<p>Add the DocumentOpened Event Handler to App and add this code:</p>



<pre class="wp-block-code"><code>If item _ ' Using item
 .NativePath _ ' property NativePath
 .NthField(":", 1) &lt;> "AlertDemo" Then ' Compare the value left of the ":"
 Return ' If invalid return (quit)
End If
Var alert As String ' Define the variable
alert = item _ ' Using Item
 .NativePath _ ' property NativePath
 .NthField(":", 2) ' Extract the contents to the right of the ":"

alert = DecodeURLComponent(alert) ' Convert the content to plain text
MessageBox(alert) ' Show the alert
' The app will now quit</code></pre>



<p>To test you can select Shared in Build Settings.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="366" height="183" src="https://blog.xojo.com/wp-content/uploads/2026/03/image.png" alt="" class="wp-image-16095" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/image.png 366w, https://blog.xojo.com/wp-content/uploads/2026/03/image-300x150.png 300w" sizes="auto, (max-width: 366px) 100vw, 366px" /></figure>



<p><br>And enter a value into Command Line Arguments:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="595" height="126" src="https://blog.xojo.com/wp-content/uploads/2026/03/image-1.png" alt="" class="wp-image-16096" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/image-1.png 595w, https://blog.xojo.com/wp-content/uploads/2026/03/image-1-300x64.png 300w" sizes="auto, (max-width: 595px) 100vw, 595px" /></figure>



<p><br>Running the app in debug mode will show:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="231" height="237" src="https://blog.xojo.com/wp-content/uploads/2026/03/image-2.png" alt="" class="wp-image-16097"/></figure>



<p><br>Now build the project and create an installer using <a href="https://jrsoftware.org/isinfo.php">Inno Setup</a>.</p>



<pre class="wp-block-preformatted">[Setup]<br>AppId={{B4D9ABDA-9F58-4FE0-A5F3-3E39C28EAB59}<br>AppName=Alert Demo<br>AppVersion=1.0<br>DefaultDirName={commonpf64}\Axis Direct Ltd\Alert Demo<br>DefaultGroupName=Axis Direct<br>OutputDir=C:\Xojo Projects\Alert Demo\Installer<br>OutputBaseFilename=AlertDemoInstaller<br>Compression=lzma<br>SolidCompression=yes<br>ChangesEnvironment=yes<br>[Languages]<br>Name: "english"; MessagesFile: "compiler:Default.isl"<br>[Tasks]<br>[Dirs]<br>Name: "{app}\Alert Demo Libs"<br>[Files]<br>Source: "C:\Xojo Projects\Alert Demo\Project\Builds - Alert<br>Demo\Windows 64 bit\Alert Demo*"; DestDir: "{app}"; Flags:<br>ignoreversion<br>Source: "C:\Xojo Projects\Alert Demo\Project\Builds - Alert<br>Demo\Windows 64 bit\Alert Demo\Alert Demo Libs*"; DestDir:<br>"{app}\Alert Demo Libs"; Flags: ignoreversion<br>[Icons]<br>[Run]<br>[Registry]<br>Root: HKCR; Subkey: "AlertDemo"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo"; ValueType: "String";<br>ValueData: "URL:AlertDemo Protocol"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo"; ValueName: "URL Protocol";<br>ValueType: "String"; ValueData: ""; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell"; Flags: uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open"; Flags:<br>uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open\command"; Flags:<br>uninsdeletekey<br>Root: HKCR; Subkey: "AlertDemo\shell\open\command";<br>ValueType: String; ValueData: "{app}\Alert Demo.exe %1";<br>Flags: uninsdeletekey</pre>



<p>The registry section creates the registry entries per <a href="https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/">William’s blog post</a>.</p>



<p>Now that the application Is installed, we’ll look at the Web Application. For the sake of testing, I’m just adding a Button to a WebPage and adding the following code into the pressed event.</p>



<pre class="wp-block-code"><code>Var s As String = "Hello World"
Var Alert As String
Alert = EncodeURLComponent(s) ' Make the string URL safe
GoToURL("AlertDemo:" + Alert, True) ' Launch the app in a new tab</code></pre>



<p>And that is it!</p>



<p>For printing a docket, I would pass a unique identifier for the transaction using this method then access the data using URLConnection &amp; HandleURL.</p>



<p><em>Wayne Golding has been a Xojo developer since 2005 and is a Xojo MVP. He operates the IT Company <a href="http://www.axisdirect.nz">Axis Direct Ltd </a>which primarily develops applications using Xojo that integrate with Xero www.xero.com. Wayne’s hobby is robotics where he uses Xojo to build applications for his Raspberry Pi, often implementing IoT for remote control.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Conditional Compilation in Xojo: #If False and #If True</title>
		<link>https://blog.xojo.com/2026/04/03/conditional-compilation-in-xojo-if-false-and-if-true/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Fri, 03 Apr 2026 13:42:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16107</guid>

					<description><![CDATA[If you&#8217;ve been working with Xojo for a while, you&#8217;re likely familiar with conditional compilation directives like #If TargetMacOS or #If DebugBuild. But there are&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;ve been working with Xojo for a while, you&#8217;re likely familiar with conditional compilation directives like <code>#If TargetMacOS</code> or <code>#If DebugBuild</code>. But there are two particularly useful variants that are often overlooked in day-to-day development: <code>#If False</code> and <code>#If True</code>. In this article, we&#8217;ll look at what these directives do, when to use them, and why they can be a better choice than regular comments in certain situations.</p>



<h2 class="wp-block-heading">What Is Conditional Compilation?</h2>



<p>Conditional compilation allows you to include or completely exclude sections of code from the final application based on a condition. Unlike an <code>If</code> statement at runtime, this decision is made at compile time. Code excluded through conditional compilation simply does not exist in the compiled application.</p>



<h2 class="wp-block-heading">#If False – Completely Excluding Code</h2>



<pre class="wp-block-code"><code>#If False
  MessageBox("This line will never be compiled")
  Var result As Integer = DoSomething()
#EndIf</code></pre>



<p>When the condition is <code>False</code>, the entire block is ignored by the compiler. It is not compiled, not included in the application, and not even checked for syntax errors. The code is effectively invisible to the compiler.</p>



<h3 class="wp-block-heading">Why Not Just Comment It Out?</h3>



<p>At first glance, <code>#If False</code> seems to do the same thing as a comment. But there are key differences:</p>



<p><strong>1. Nested Comments Are No Problem</strong></p>



<p>If a code block already contains comments, commenting out the entire block quickly becomes messy:</p>



<pre class="wp-block-code"><code>' Var x As Integer = 42 ' Default value
' Var y As Integer = x * 2 ' double it
' ' This is already a comment</code></pre>



<p>With <code>#If False</code>, everything stays clean:</p>



<pre class="wp-block-code"><code>#If False
  Var x As Integer = 42 ' Default value
  Var y As Integer = x * 2 ' double it
  ' This is already a comment
#EndIf</code></pre>



<p><strong>2. Incomplete or Broken Code</strong></p>



<p>Sometimes you want to keep an unfinished code draft without it preventing the build. Since the compiler completely skips the contents of an <code>#If False</code> block, the code inside may even contain syntax errors:</p>



<pre class="wp-block-code"><code>#If False
  ' Experimental approach – not finished yet
  Var data As  = LoadFromServer(
  ProcessResult(data
#EndIf</code></pre>



<p>This code would be useless as a comment because you&#8217;d have to comment out each line individually. With <code>#If False</code>, it&#8217;s safely stored away.</p>



<p><strong>3. Quickly Disabling Large Code Blocks</strong></p>



<p>For larger sections, <code>#If False</code> / <code>#EndIf</code> is far more practical than prefixing every line with <code>'</code>. Plus, the block can be reactivated instantly by simply changing <code>False</code> to <code>True</code>.</p>



<h2 class="wp-block-heading">#If True – Always Including Code</h2>



<pre class="wp-block-code"><code>#If True
  MessageBox("This line will always be compiled")
#EndIf</code></pre>



<p>An <code>#If True</code> block is always compiled — it behaves identically to regular code. This might sound useless at first, but it does have practical applications.</p>



<h3 class="wp-block-heading">When Is <code>#If True</code> Useful?</h3>



<p><strong>1. Quick Toggling During Development</strong></p>



<p>Imagine you&#8217;re working on a feature and want to quickly enable or disable certain code sections:</p>



<pre class="wp-block-code"><code>#If True ' &lt;- Set to False to disable the new feature
  ' New feature
  Var service As New CloudSyncService
  service.SyncNow()
#EndIf</code></pre>



<p>By simply changing <code>True</code> to <code>False</code>, you can disable the feature without deleting or commenting out any code.</p>



<p><strong>2. Placeholder for Future Conditions</strong></p>



<p>Sometimes you already know that a code section will later be tied to a condition — such as a platform or build type. With <code>#If True</code>, you can prepare the structure in advance:</p>



<pre class="wp-block-code"><code>#If True ' TODO: Change to TargetMacOS once Windows alternative is ready
  Var folderPath As String = SpecialFolder.Applications.NativePath
#EndIf</code></pre>



<p><strong>3. Visual Code Grouping</strong></p>



<p>In longer methods, <code>#If True</code> can serve as a visual structural block to highlight related code:</p>



<pre class="wp-block-code"><code>#If True ' --- Initialization ---
  Var db As New SQLiteDatabase
  db.DatabaseFile = dbFile
  db.Connect
#EndIf

#If True ' --- Load data ---
  Var rs As RowSet = db.SelectSQL("SELECT * FROM users")
#EndIf</code></pre>



<h2 class="wp-block-heading">Defining Custom Compiler Constants</h2>



<p>Xojo also allows you to define your own constants for conditional compilation.</p>



<pre class="wp-block-code"><code>#If kEnableLogging
  WriteToLog("Application started")
#EndIf</code></pre>



<p>This lets you control features or debug functionality centrally through a constant without having to modify the code itself.</p>



<h2 class="wp-block-heading">Best Practices</h2>



<ol class="wp-block-list">
<li><strong><code>#If False</code> instead of mass comments</strong>: For larger code blocks that need to be temporarily disabled, <code>#If False</code> is the cleaner solution.</li>



<li><strong>Add a comment</strong>: Always document <em>why</em> a block is disabled:</li>
</ol>



<pre class="wp-block-code"><code>#If False ' Disabled until bug #1234 is fixed
  ProcessCriticalData()
 #EndIf</code></pre>



<ol start="3" class="wp-block-list">
<li><strong>Don&#8217;t use permanently</strong>: <code>#If False</code> blocks should not remain in the code indefinitely. If the code is no longer needed, remove it. If it is needed, activate it.</li>



<li><strong>Prefer platform directives</strong>: When dealing with platform-specific code, use the specific constants (<code>TargetMacOS</code>, <code>TargetWindows</code>, etc.) instead of <code>#If True</code> or <code>#If False</code>.</li>



<li><strong>Avoid deep nesting</strong>: While nested <code>#If</code> blocks are possible, use them sparingly as they quickly reduce readability.</li>
</ol>



<h2 class="wp-block-heading">Conclusion</h2>



<p><code>#If False</code> and <code>#If True</code> are simple yet powerful tools for everyday Xojo development. They offer a cleaner alternative to commenting out large code blocks, enable quick feature toggling during development, and lay the groundwork for a structured, cross-platform codebase. Used thoughtfully, they save time and help you stay organized — even in larger projects.</p>



<p>If you want to automatically convert a selection into a #If/#EndIf block, you can do so via the context menu: &#8220;Wrap In > #If / #EndIf&#8221;</p>



<p>Happy coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Build a Simple Find in Files Function</title>
		<link>https://blog.xojo.com/2026/04/02/build-a-simple-find-in-files-function/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Thu, 02 Apr 2026 16:15:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Files]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Text Files]]></category>
		<category><![CDATA[Text Processing]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15972</guid>

					<description><![CDATA[Sooner or later most apps need some version of the ability to find text in those files, whether you&#8217;re scanning log files, config files, exported&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Sooner or later most apps need some version of the ability to find text in those files, whether you&#8217;re scanning log files, config files, exported data, or source code.</p>



<p>In this post, we&#8217;ll build a simple Find in Files utility in Xojo that:</p>



<ul class="wp-block-list">
<li>searches the files in a folder</li>



<li>reads each file line by line</li>



<li>performs a plain-text, case-insensitive match</li>



<li>returns the file path, line number, and matching line</li>
</ul>



<p>The goal is simple: build something useful while leaving the door open for the fancier stuff.</p>



<h2 class="wp-block-heading" id="what-this-find-in-files-function-will-do">What this Find in Files function will do</h2>



<p>Let&#8217;s keep the scope clear:</p>



<ul class="wp-block-list">
<li>search one folder</li>



<li>search plain text only</li>



<li>skip subfolders for now</li>



<li>return the matching file path, line number, and line contents</li>
</ul>



<h2 class="wp-block-heading" id="step-1-put-the-result-class-in-the-module">Step 1: A class in a module and some properties</h2>



<p>Before touching the file system, let&#8217;s define what a match looks like.</p>



<p>You could return raw strings, but that gets messy fast. A small class keeps the code readable and gives us an obvious place to extend later. In this version, I like keeping that class inside the same module as the search function. It keeps the entire utility self-contained instead of spraying helper types all over the project.</p>



<p>So, we start by adding a module&nbsp;<code>SearchUtils</code>&nbsp;and inside the module we will add a class&nbsp;<code>SearchHit</code>.</p>



<pre class="wp-block-code"><code>Module SearchUtils

  Class SearchHit

    Public Property FilePath As String
    Public Property LineNumber As Integer
    Public Property LineText As String

    Public Sub Constructor(filePath As String, lineNumber As Integer, lineText As String)
      Self.FilePath = filePath
      Self.LineNumber = lineNumber
      Self.LineText = lineText
    End Sub

  End Class

End Module</code></pre>



<p>Each result stores three things:</p>



<ol class="wp-block-list">
<li>the file path</li>



<li>the line number</li>



<li>the matching line</li>
</ol>



<h2 class="wp-block-heading" id="step-2-walk-through-the-folder">Step 2: Walk through the folder</h2>



<p><code>FolderItem.Children</code> lets us loop through a folder with a <code>For Each</code> loop, which keeps the code clear.</p>



<p>We&#8217;ll also reject bad input early:</p>



<ul class="wp-block-list">
<li>the folder is&nbsp;<code>Nil</code></li>



<li>the folder does not exist</li>



<li>the item passed is not actually a folder</li>



<li>the search term is empty</li>
</ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="409" src="https://blog.xojo.com/wp-content/uploads/2026/03/find_in_files_xojo_function_diagram2-1024x409.png" alt="" class="wp-image-16027" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/find_in_files_xojo_function_diagram2-1024x409.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/find_in_files_xojo_function_diagram2-300x120.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/find_in_files_xojo_function_diagram2-768x307.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/find_in_files_xojo_function_diagram2.png 1536w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This process is simple, fast and effective.</p>



<h2 class="wp-block-heading" id="step-3-read-files-line-by-line">Step 3: Read files line by line</h2>



<p>For text files,&nbsp;<code>TextInputStream.Open</code>&nbsp;is the right tool. From there, we can call&nbsp;<code>ReadLine</code>&nbsp;until&nbsp;<code>EndOfFile</code>&nbsp;becomes&nbsp;<code>True</code>.</p>



<p>I prefer this over&nbsp;<code>ReadAll</code>&nbsp;for a utility like this.&nbsp;<code>ReadAll</code>&nbsp;is fine when the file is small and you know what you&#8217;re doing, but line-by-line reading is a better default here. It keeps memory use in check and gives us line numbers for free.</p>



<p>For the sample code, I&#8217;m explicitly using UTF-8:</p>



<pre class="wp-block-code"><code>input.Encoding = Encodings.UTF8</code></pre>



<p>That keeps the sample predictable. It does&nbsp;<strong>not</strong>&nbsp;mean this code can gracefully decode every text file you throw at it. Files with unknown encodings or binary-ish content are a separate problem, and they deserve their own solution.</p>



<h2 class="wp-block-heading" id="step-4-match-the-text">Step 4: Match the text</h2>



<p>For a plain-text search,&nbsp;<code>String.Contains</code>&nbsp;does exactly what we need:</p>



<pre class="wp-block-code"><code>line.Contains(searchTerm, ComparisonOptions.CaseInsensitive)</code></pre>



<p>It handles the case-insensitivity without the overhead, or the headache, of regex.</p>



<h2 class="wp-block-heading" id="step-5-the-full-module">Step 5: The full module and class and function</h2>



<pre class="wp-block-code"><code>Module SearchUtils

  Public Class SearchHit
    Public Property FilePath As String
    Public Property LineNumber As Integer
    Public Property LineText As String

    Public Sub Constructor(filePath As String, lineNumber As Integer, lineText As String)
      Self.FilePath = filePath
      Self.LineNumber = lineNumber
      Self.LineText = lineText
    End Sub
  End Class

  Public Function FindInFiles(targetFolder As FolderItem, searchTerm As String) As SearchHit()
    Var hits() As SearchHit

    If targetFolder Is Nil Then
      Return hits
    End If

    If Not targetFolder.Exists Or Not targetFolder.IsFolder Then
      Return hits
    End If

    If searchTerm.IsEmpty Then
      Return hits
    End If

    For Each item As FolderItem In targetFolder.Children
      If item Is Nil Then Continue
      If item.IsFolder Then Continue
      If Not item.Exists Then Continue
      If Not item.IsReadable Then Continue

      Try
        Var input As TextInputStream = TextInputStream.Open(item)
        input.Encoding = Encodings.UTF8

        Var lineNumber As Integer = 0

        While Not input.EndOfFile
          Var line As String = input.ReadLine
          lineNumber = lineNumber + 1

          If line.Contains(searchTerm, ComparisonOptions.CaseInsensitive) Then
            hits.Add(New SearchHit(item.NativePath, lineNumber, line))
          End If
        Wend

        input.Close

      Catch error As IOException
        ' Skip files that cannot be read as text.
        Continue
      End Try
    Next

    Return hits
  End Function

End Module</code></pre>



<h2 class="wp-block-heading" id="how-it-works">How it works</h2>



<p>Let&#8217;s break down the important parts.</p>



<h3 class="wp-block-heading" id="input-validation">Input validation</h3>



<p>This block prevents pointless work and avoids avoidable runtime problems:</p>



<pre class="wp-block-code"><code>If targetFolder Is Nil Then
  Return hits
End If

If Not targetFolder.Exists Or Not targetFolder.IsFolder Then
  Return hits
End If

If searchTerm.IsEmpty Then
  Return hits
End If</code></pre>



<p>Rule of thumb: reject bad input early.</p>



<h3 class="wp-block-heading" id="folder-iteration">Folder iteration</h3>



<p>This is the core loop:</p>



<pre class="wp-block-code"><code>For Each item As FolderItem In targetFolder.Children</code></pre>



<p>We&#8217;re only scanning the folder&#8217;s immediate contents. If an item is another folder, we skip it.</p>



<pre class="wp-block-code"><code>If item.IsFolder Then Continue</code></pre>



<h3 class="wp-block-heading" id="safe-text-reading">Safe text reading</h3>



<p>Each file is opened with&nbsp;<code>TextInputStream.Open</code>&nbsp;inside a&nbsp;<code>Try...Catch</code>&nbsp;block:</p>



<pre class="wp-block-code"><code>Try
  Var input As TextInputStream = TextInputStream.Open(item)
  input.Encoding = Encodings.UTF8
  ...
Catch error As IOException
  Continue
End Try</code></pre>



<p>That way, one unreadable file does not take down the whole search. It gets skipped and the rest of the folder still gets processed.</p>



<h3 class="wp-block-heading" id="line-by-line-matching">Line-by-line matching</h3>



<p>This is where the actual work happens:</p>



<pre class="wp-block-code"><code>While Not input.EndOfFile
  Var line As String = input.ReadLine
  lineNumber = lineNumber + 1

  If line.Contains(searchTerm, ComparisonOptions.CaseInsensitive) Then
    hits.Add(New SearchHit(item.NativePath, lineNumber, line))
  End If
Wend</code></pre>



<p>Because we&#8217;re reading one line at a time, attaching the correct line number is trivial.</p>



<h3 class="wp-block-heading" id="why-keep-searchhit-inside-the-module">Why keep&nbsp;<code>SearchHit</code>&nbsp;inside the module?</h3>



<p>Because it belongs to this utility. The search function and its result type are part of the same little unit of behavior, so keeping them together makes the project easier to scan and easier to transform it to a&nbsp;<a href="https://documentation.xojo.com/topics/code_management/sharing_code_among_multiple_projects.html" target="_blank" rel="noreferrer noopener">Library</a>.</p>



<p>It also means code outside the module uses the namespaced type:</p>



<pre class="wp-block-code"><code>Var results() As SearchUtils.SearchHit = SearchUtils.FindInFiles(folder, "xojo")</code></pre>



<h2 class="wp-block-heading" id="using-the-function">Using the function</h2>



<p>Here&#8217;s a simple example that lets the user choose a folder and then writes the results to the debug log:</p>



<pre class="wp-block-code"><code>Var folder As FolderItem = FolderItem.ShowSelectFolderDialog
If folder Is Nil Then Return

Var results() As SearchUtils.SearchHit = SearchUtils.FindInFiles(folder, "error")

For Each hit As SearchUtils.SearchHit In results
  System.DebugLog(hit.FilePath + " | line " + hit.LineNumber.ToString + " | " + hit.LineText)
Next</code></pre>



<p>If you want to display the results in a&nbsp;<code>DesktopListBox</code>, that works nicely too:</p>



<pre class="wp-block-code"><code>Var folder As FolderItem = FolderItem.ShowSelectFolderDialog
If folder Is Nil Then Return

Var results() As SearchUtils.SearchHit = FindInFiles(folder, "error")

ListBox1.RemoveAllRows
ListBox1.ColumnCount = 3

For Each hit As SearchUtils.SearchHit In results
  ListBox1.AddRow(hit.FilePath)
  ListBox1.CellTextAt(ListBox1.LastAddedRowIndex, 1) = hit.LineNumber.ToString
  ListBox1.CellTextAt(ListBox1.LastAddedRowIndex, 2) = hit.LineText
Next</code></pre>



<p>A few sample results might look like this:</p>



<pre class="wp-block-code"><code>C:\Logs\app.log | line 18 | Error connecting to database
C:\Logs\app.log | line 42 | Error writing audit record
C:\Configs\service.txt | line 7 | Last error message: timeout</code></pre>



<h2 class="wp-block-heading" id="practical-limitations-of-this-version">Practical limitations of this version</h2>



<p>This utility is useful, but limited.</p>



<h3 class="wp-block-heading" id="it-assumes-utf-8">It assumes UTF-8</h3>



<p>That is fine for plenty of modern text files, but not all of them. If you&#8217;re dealing with mixed encodings, you&#8217;ll need a smarter approach that detects the file encoding.</p>



<h3 class="wp-block-heading" id="it-doesnt-recurse-into-subfolders">It doesn&#8217;t recurse into subfolders</h3>



<p>That is deliberate. Recursive search is useful, but it adds another layer of behavior and another place to make the code harder to read.</p>



<h2 class="wp-block-heading" id="final-thoughts">Final thoughts</h2>



<p>A basic Find in Files function is one of those utilities that looks small but pays off quickly. This is a base-layer utility. Once you have this working, adding recursion or regex is a much smaller lift.</p>



<p>Let&#8217;s discuss in the&nbsp;<a href="https://forum.xojo.com/">forums</a>.</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Reflecting on 30 Years of Xojo</title>
		<link>https://blog.xojo.com/2026/04/01/reflecting-on-30-years-of-xojo/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Wed, 01 Apr 2026 23:42:38 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16110</guid>

					<description><![CDATA[Today marks the 30th anniversary of founding of this company. It&#8217;s hard to believe that nearly half of my life has passed since then. I&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Today marks the 30th anniversary of founding of this company. It&#8217;s hard to believe that nearly half of my life has passed since then. I could not have imagined that I would still be doing this 30 years later. I frequently remind my kids that you can plan all you want but be prepared for things to change. My experience at Xojo is a perfect example of that: things have to change and adapt to survive.</p>



<p>That&#8217;s why Xojo is still here: relentless adaptation.</p>



<p>Back when Xojo was REALbasic, version 1.0 only supported MacOS 8/9 and the 68000 and PowerPC processors. Since then we have seen countless changes in the computer technology landscape. Classic MacOS, Windows NT, Windows 95, Internet Explorer 6, Early versions of GTK on Linux, diskettes, and spinning hard drives are now ancient technology.</p>



<p>Xojo itself has changed dramatically over time as well. Though the basic idea of it, that you should be able to quickly and easily both learn Xojo and build apps, has not changed. Some code from an example project back then would be recognizable to a Xojo user today. Assigning variables, conditional statements, loops, even many classes like Graphics, FolderItem, TextInputStream, would all look familiar. That said, almost everything else has changed:</p>



<ul class="wp-block-list">
<li>The IDE was originally written in C++. It is now written in Xojo.</li>



<li>There entire Xojo framework was originally written in C++. Today it&#8217;s a big blend of languages including quite a bit of Xojo.</li>



<li>It originally had a single pass compiler. The entire compilation process has been rewritten. It is a modern, two-pass system that uses LLVM as its backend.</li>



<li>REALbasic v1 could only produce desktop apps for MacOS 8 and 9 running on 68000 and PowerPC processors. Today, Xojo supports x86 and ARM processors, desktop apps for Linux, MacOS and Windows, mobile apps for Android and iOS and web apps.</li>



<li>The documentation was originally almost entirely in printed form. It cost $30, weighed 49 ounces (just over 3 lbs.) and we shipped it to you right from our office. Now, the documentation is all online.</li>



<li>The way users reported bugs and made feature requests has changed several times over the years.</li>



<li>The community formed in mailing lists, and occasional Xojo events, now exists on our online forum.</li>
</ul>



<p>And that adaption continues. We improve the frameworks with each release. We have added the ability to build Libraries. We are working on making web apps more responsive. We are continuing our march towards updating the Windows framework to WinUI. We are making changes to the Xojo IDE so that you can use AI tools such as Anthropic&#8217;s Claude Code, Google&#8217;s Gemini Code Assist, and Open.AI&#8217;s Codex, which, coincidentally, was almost the name we chose for what is now Xojo.</p>



<p>Companies survive by adapting, and Xojo, Inc. is no exception. Over the years we&#8217;ve changed everything from offices, personnel, and policies. While the team has changed over the years, many members have been with the company a very long time. In the tech industry, the average turnover is 2 to 3 years. Over the last 30 years, our average turnover is 7 years. Counting current team members, however, it&#8217;s a whopping 16.6 years! And among the current engineering team, there are 136 person-years of development on Xojo. We started working out of my apartment, then my house and then into an office here in Austin, Texas. Over time, about half of us found we were working from home a lot, so we decided to go entirely remote in 2008. We have changed many of our internal policies to make Xojo a great place to work. Every member of the Xojo team works so well together that it makes coming to work every day genuinely rewarding.</p>



<p>In general, only about 5% of businesses last 30 years. In tech it&#8217;s closer to 1%. It&#8217;s an honor to be a member of the tech industry&#8217;s 1% club!</p>



<p>What drives all of us at Xojo is helping you turn what started as an idea, into reality. We couldn&#8217;t have done it without all the dedicated Xojo users. That some of you have been with us for the entire journey, so far, is especially gratifying.</p>



<p>On behalf of the entire team, thank you for making Xojo possible.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Jade Improvements</title>
		<link>https://blog.xojo.com/2026/03/31/jade-improvements/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:23:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Code Generation]]></category>
		<category><![CDATA[Jade]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16041</guid>

					<description><![CDATA[For Xojo 2026 Release 1, we’ve made some improvements to Jade, Xojo’s integrated AI assistant. Jade is easily accessible from the toolbar, making it handy&#8230;]]></description>
										<content:encoded><![CDATA[
<p>For Xojo 2026 Release 1, we’ve made some improvements to Jade, Xojo’s integrated AI assistant. Jade is easily accessible from the toolbar, making it handy for getting coding advice and asking general Xojo questions, especially about the documentation.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="52" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x-1024x52.png" alt="" class="wp-image-16061" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x-1024x52.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x-300x15.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x-768x39.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x-1536x79.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-16.40.54@2x.png 1994w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In this release, Jade’s output has been improved to limit scrolling when responses are shown, making it easier to read through the specific information and code samples. In addition, Jade now does a better job of parsing the results it gets, which prevents situations where responses could sometimes get cut off.</p>



<p>Lastly, Jade has had some fixes to improve reliability and has been updated to use Anthropic Claude Sonnet 4.6 for more detailed and accurate responses.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="914" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-1024x914.png" alt="" class="wp-image-16042" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-1024x914.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-300x268.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-768x686.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-1536x1371.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.31.49@2x-2048x1828.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>These improvements may be small, but they allow Jade to continue to be a helpful Xojo coding assistant.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Custom Control Rendering with DrawControlInLayoutEditor</title>
		<link>https://blog.xojo.com/2026/03/31/custom-control-rendering-with-drawcontrolinlayouteditor/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:22:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[DrawControlInLayoutEditor]]></category>
		<category><![CDATA[IDE]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16045</guid>

					<description><![CDATA[One of the notable additions in Xojo 2026 Release 1 is that the&#160;DrawControlInLayoutEditor&#160;event is now available for Desktop and iOS/Android projects, giving you more possibilities&#8230;]]></description>
										<content:encoded><![CDATA[
<p>One of the notable additions in Xojo 2026 Release 1 is that the&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;event is now available for Desktop and iOS/Android projects, giving you more possibilities over how your controls appear in the layout editor.</p>



<p>With this feature you can provide custom drawing for a control at design time, making it easier to visualize your UI without running the project.</p>



<p>If this sounds familiar, it&#8217;s because it brings Desktop and iOS/Android projects closer to what&#8217;s already possible in Web projects with&nbsp;<code>WebSDKUIControl</code>, where custom layout rendering has been available for some time.</p>



<h4 class="wp-block-heading">Why this matters</h4>



<p>Previously your custom Canvas controls would appear as generic placeholders, making it difficult to understand how they would look at runtime. Now you can:</p>



<ul class="wp-block-list">
<li>Render a preview of your control directly in the layout editor</li>



<li>Display dynamic or state-based visuals</li>



<li>Make custom controls much easier to work with at design time</li>
</ul>



<h4 class="wp-block-heading">How it works</h4>



<p>For Desktop projects, you can subclass&nbsp;<code>DesktopUIControl</code>&nbsp;and implement the&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;event. Your drawing code is executed by the IDE as it renders the control in the layout. For iOS and Android projects, this event is available on&nbsp;<code>MobileUIControl</code>.</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> You can also use this event directly with&nbsp;<code>DesktopCanvas</code>&nbsp;and&nbsp;<code>MobileCanvas</code>&nbsp;controls, so you can start drawing in&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;without needing to subclass anything.</p>



<p>This event gives you the flexibility to draw whatever you need—shapes, text, or even simplified representations of runtime content. For example, a custom media player control could display a play button and timeline, or a chart control could render a sample graph.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="661" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1024x661.png" alt="" class="wp-image-16049" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1024x661.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-768x496.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1536x991.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-2048x1322.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">A note about XojoScript limitations</h4>



<p>One important detail to keep in mind is that&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;runs using XojoScript. This allows the IDE to safely execute your drawing code at design time, but it also means not everything you&#8217;d typically expect to use in Xojo is available, especially when it comes to the graphics APIs.</p>



<p>In practice, most common drawing operations—such as shapes, lines, and text—work as expected. However, in some cases these graphics calls use a slightly different API, as is the case with <code>LinearGradientBrush</code>.</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Also, because this runs as XojoScript, you cannot call other methods from within your <code>DrawControlInLayoutEditor</code>code. To access your control&#8217;s properties, you&#8217;ll need to use the built-in  <code>ColorProperty</code>, <code>BooleanProperty</code>, <code>IntegerProperty</code>, <code>DoubleProperty</code>, and <code>StringProperty</code> methods.</p>



<h4 class="wp-block-heading">Support for more Graphics</h4>



<p>In 2026r1, we&#8217;ve expanded the graphics capabilities available to&nbsp;<code>DrawControlInLayoutEditor</code>, building on what was previously supported for&nbsp;<code>WebSDKUIControl</code>. New additions include support for:</p>



<ul class="wp-block-list">
<li>LinearGradientBrush, PictureBrush, and ShadowBrush</li>



<li>LineDash, LineDashOffset, LineCap, LineJoin, and MiterLimit</li>



<li>Outline</li>



<li>Scale, Rotate, and Translate</li>



<li>SaveState, RestoreState</li>



<li>Color constants (Red, Green, Blue, Yellow etc.)</li>
</ul>



<p>Since XojoScript does not support the&nbsp;<code>Pair</code>&nbsp;type, the&nbsp;<code>LinearGradientBrush</code>&nbsp;API was adapted slightly:</p>



<pre class="wp-block-code"><code>Class LinearGradientBrush

  Sub Constructor()

  Sub AddStop(stop As Double, c As Color)

  Property StartPoint As Point
  Property EndPoint As Point

End Class</code></pre>



<p>The main difference is how the brush is constructed and how stops are added, without needing&nbsp;<code>Pair</code>. With this new API, you can turn a basic graph into something much more visually appealing.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="661" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1024x661.png" alt="" class="wp-image-16075" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1024x661.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-768x496.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1536x991.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-2048x1322.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">Turning off this feature</h4>



<p>While many may prefer custom rendering for custom controls, it can become a bottleneck when a large number of controls are rendering content. If you prefer a less resource-intensive experience, you can disable this behavior in Settings → Layout by enabling the Static Rendering option.</p>



<h4 class="wp-block-heading">Finally</h4>



<p>With&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;now available for Desktop and Mobile projects, you can take advantage of the same benefits Web projects have enjoyed for years. Be sure to check out the new DrawControlInLayoutEditor example project, adapted from the WebSDK → CustomButton example. We hope you enjoy designing and previewing your custom controls with this new event—and yes, it also works in Libraries!</p>



<p><em><em><em>William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.</em></em></em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>More New Features for Android: MobileChart, MobileColorPicker, MobilePDFViewer &#038; Zip/Unzip</title>
		<link>https://blog.xojo.com/2026/03/31/more-new-features-for-android/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:22:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Unzip]]></category>
		<category><![CDATA[Zip]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16035</guid>

					<description><![CDATA[The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus ongoing improvements to several controls. Here’s a quick tour of what’s new.</p>



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



<p>Matching the features available for iOS, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilechart.html#mobilechart" target="_blank" rel="noreferrer noopener">MobileChart</a> lets you create a wide variety of charts to show in your Android app.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="483" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png" alt="" class="wp-image-16036" style="width:198px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png 483w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-142x300.png 142w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-768x1628.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-725x1536.png 725w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x.png 918w" sizes="auto, (max-width: 483px) 100vw, 483px" /></figure>



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



<p>This new control, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilecolorpicker.html#mobilecolorpicker" target="_blank" rel="noreferrer noopener">as its name suggests</a>, lets you use the system color picker to select a color.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="481" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png" alt="" class="wp-image-16038" style="width:202px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png 481w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-768x1634.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-722x1536.png 722w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x.png 912w" sizes="auto, (max-width: 481px) 100vw, 481px" /></figure>



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



<p>Last year Android added <a href="https://documentation.xojo.com/api/pdf/pdfdocument.html#pdfdocument" target="_blank" rel="noreferrer noopener">PDFDocument</a> support for creating your own PDFs, and now we’ve added <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilepdfviewer.html#methods" target="_blank" rel="noreferrer noopener">MobilePDFViewer</a> to give you an easy way to show PDF document files from your Android apps.</p>



<h2 class="wp-block-heading"><strong>Zip/Unzip</strong></h2>



<p>The FolderItem class now supports the <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-zip" target="_blank" rel="noreferrer noopener">Zip</a> and <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-unzip" target="_blank" rel="noreferrer noopener">Unzip</a> methods to make it simple to compress and uncompressed Zip files.</p>



<h2 class="wp-block-heading"><strong>Android Keeps Getting Better</strong></h2>



<p>There are also improvements to <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletabpanel.html#mobiletabpanel" target="_blank" rel="noreferrer noopener">MobileTabPanel</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletextarea.html#mobiletextarea" target="_blank" rel="noreferrer noopener">MobileTextArea</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobileslider.html#mobileslider" target="_blank" rel="noreferrer noopener">MobileSlider</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescrollablearea.html#mobilescrollablearea" target="_blank" rel="noreferrer noopener">MobileScrollableArea</a>, <a href="https://documentation.xojo.com/api/hardware/barcode.html#barcode" target="_blank" rel="noreferrer noopener">Barcode</a> and more. With each release, Android gets closer to feature parity with iOS!</p>



<p>And of course, we continue to squash framework and compiler bugs.</p>



<p>Be sure to check out the full <a href="https://documentation.xojo.com/resources/release_notes/2026r1.html" target="_blank" rel="noreferrer noopener">release notes</a> for all the details!</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Watchpoints in Xojo: A Smarter Way to Track Your Data</title>
		<link>https://blog.xojo.com/2026/03/31/watchpoints-in-xojo-a-smarter-way-to-track-your-data/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 13:22:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Watchpoints]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15987</guid>

					<description><![CDATA[Debugging isn’t just about stepping through code anymore, it&#8217;s about understanding how your data behaves over time. With the new watchpoints feature in Xojo, you can&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Debugging isn’t just about stepping through code anymore, it&#8217;s about understanding how your data behaves over time. With the new watchpoints feature in Xojo, you can now monitor variables and object properties more intelligently, without constantly stepping line by line or adding logging just to see when values change.</p>



<h3 class="wp-block-heading">What Are Watchpoints?</h3>



<p>Watchpoints let you pause execution when the value of a variable or property changes. Instead of asking <em>“how did I get here?”</em>, watchpoints help you answer <em>“when did this change?”</em></p>



<p>This is especially useful when:</p>



<ul class="wp-block-list">
<li>A value is being modified unexpectedly</li>



<li>Multiple parts of your code interact with the same object</li>



<li>You’re tracking down subtle state-related bugs</li>
</ul>



<h3 class="wp-block-heading">How Watchpoints Work</h3>



<p>Setting up a watchpoint requires pausing execution where you would like to start monitoring the variable or property of an object.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="677" src="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointSetupClipped-1024x677.jpg" alt="" class="wp-image-16018" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointSetupClipped-1024x677.jpg 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointSetupClipped-300x198.jpg 300w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointSetupClipped-768x508.jpg 768w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointSetupClipped.jpg 1446w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In this example, we want to monitor the <code>count</code> variable, so you can right-click it in the variables debugger list and select <strong>Watch</strong> from the context menu.  Once a watchpoint is set on a variable or property, the debugger keeps track of its value during execution. When the value changes, execution pauses and shows the line that triggered the change. Notice that the watchpoint break line is highlighted differently from the current execution line, and a Watchpoints list is now displayed.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="667" src="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-1024x667.png" alt="" class="wp-image-16014" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-1024x667.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-300x195.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-768x500.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-1536x1000.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointBreak-2048x1333.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This gives you immediate visibility into:</p>



<ul class="wp-block-list">
<li>What code caused the modification</li>



<li>What the previous and new values are</li>



<li>What the surrounding state looks like</li>
</ul>



<h3 class="wp-block-heading">Why This Matters</h3>



<p>Traditionally, tracking down a value change required manually stepping through code or adding temporary logging. Both approaches are time-consuming and error-prone.</p>



<p>Watchpoints eliminate that friction by:</p>



<ul class="wp-block-list">
<li>Reducing the need for repetitive stepping</li>



<li>Highlighting only meaningful changes</li>



<li>Letting you focus on the root cause faster</li>
</ul>



<h3 class="wp-block-heading">Conditional Watchpoints</h3>



<p>Watchpoints in Xojo aren&#8217;t limited to triggering on every change—you can make them conditional. For example, you can break only when a value is equal to, greater than, or less than a specific threshold, or even when it falls within a defined range. For string, both case-sensitive and case-insensitive comparisons are supported. This makes it much easier to focus on the changes that actually matter, especially when a variable updates frequently but only becomes problematic under certain conditions.</p>



<p>To add a condition to a watchpoint, right-click the watched variable or property and choose&nbsp;<strong>Edit Watchpoint Expression</strong> from the context menu.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="695" src="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointExpression-1024x695.png" alt="" class="wp-image-16020" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointExpression-1024x695.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointExpression-300x204.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointExpression-768x522.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/WatchpointExpression.png 1496w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The expression editor adapts based on the type of variable or property you&#8217;re watching, providing hints about what values and conditions you can enter.</p>



<h3 class="wp-block-heading">Handling Object Lifetimes</h3>



<p>One important detail when working with watchpoints is object lifetime.</p>



<p>If a watchpoint is attached to a property of an object that goes out of scope or is destroyed, the debugger can no longer track it. In these cases, Xojo provides feedback through the Messages pane so you know the watchpoint is no longer valid, along with the last known value.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="890" height="180" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-9.33.52-AM.png" alt="" class="wp-image-16021" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-9.33.52-AM.png 890w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-9.33.52-AM-300x61.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-9.33.52-AM-768x155.png 768w" sizes="auto, (max-width: 890px) 100vw, 890px" /></figure>



<h3 class="wp-block-heading">What works and what doesn&#8217;t</h3>



<p>You can set watchpoints on most variables and properties, even variants; however, Arrays, Structures, and computed properties are not supported. Code within <code>#pragma DisableBackgroundTasks</code> or <code>#pragma Debug False</code> blocks will not trigger watchpoint breaks. Watchpoints are also not currently available for Android projects.</p>



<h3 class="wp-block-heading">Final Thoughts</h3>



<p>Watchpoints bring a new level of precision to debugging in Xojo. Instead of chasing bugs through code, you can now let the debugger do the work of tracking down exactly where things go wrong.</p>



<p>Give them a try in your next debugging session—you might find yourself solving problems faster than ever!</p>



<p><em><em><em>William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.</em></em></em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Scan Barcodes, Pick Colors, Toggle: Xojo Web in 2026r1</title>
		<link>https://blog.xojo.com/2026/03/31/scan-barcodes-pick-colors-toggle-xojo-web-in-2026r1/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 13:22:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<category><![CDATA[Xojo Web]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15969</guid>

					<description><![CDATA[If you build web apps with Xojo, 2026r1 is worth a close look. There&#8217;s a good mix of new controls and under-the-hood improvements to explore.&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you build web apps with Xojo, 2026r1 is worth a close look. There&#8217;s a good mix of new controls and under-the-hood improvements to explore. Exciting times!</p>



<h2 class="wp-block-heading">New Controls</h2>



<p>Three new controls have been added to the Web framework in this release, aiming to close the difference gap between Web and the other project types.</p>



<p><code>WebSwitch</code>&nbsp;is a toggle control that mobile developers will already be familiar with. It&#8217;s been available on iOS and Android for a while. It&#8217;s now available for web projects too, so if you&#8217;ve been approximating a toggle switch using a styled checkbox, you can finally retire that workaround.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="690" src="https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1024x690.png" alt="" class="wp-image-15992" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1024x690.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-300x202.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-768x517.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1536x1035.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-2048x1380.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><code>WebColorPicker</code> brings color selection to web apps in the same way <code>DesktopColorPicker</code> does for desktop. Drop it in from the Library, wire up the event and you have a color picker the Xojo way.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="731" src="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1024x731.png" alt="" class="wp-image-15994" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1024x731.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-768x548.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1536x1096.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-2048x1461.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This is how <code>WebColorPicker</code> looks like in your browser:</p>



<figure class="wp-block-video"><video height="1274" style="aspect-ratio: 1488 / 1274;" width="1488" controls src="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-browser.mp4"></video></figure>



<p>The third new control adds barcode reading support. Your web app can now read barcodes directly from the user&#8217;s camera, from desktop or mobile browsers. This opens up a lot of practical use cases: Inventory systems, ticketing, product lookups, that previously would have pushed you toward a native mobile app.</p>



<p>Again, drop the Barcode control into your project and implement the events:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="747" src="https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1024x747.png" alt="" class="wp-image-15995" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1024x747.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-300x219.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-768x560.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1536x1120.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-2048x1494.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>That&#8217;s it! Your web apps can scan a great variety of barcodes now. Including QR, Data Matrix, Aztec, PDF 417 and much more!</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="471" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-471x1024.png" alt="" class="wp-image-16007" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-471x1024.png 471w, https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-138x300.png 138w, https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1.png 555w" sizes="auto, (max-width: 471px) 100vw, 471px" /></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="471" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-471x1024.png" alt="" class="wp-image-16008" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-471x1024.png 471w, https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-138x300.png 138w, https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1.png 555w" sizes="auto, (max-width: 471px) 100vw, 471px" /></figure>
</div>
</div>



<h2 class="wp-block-heading">Icons on WebButtons</h2>



<p><code>WebButton</code>&nbsp;now has an&nbsp;<code>Icon</code>&nbsp;property. You can assign any&nbsp;<code>WebPicture</code>&nbsp;to it, or use one of the Bootstrap icons that are already bundled with the framework. It&#8217;s a small addition, but it makes a noticeable difference when building action-heavy interfaces where a label alone doesn&#8217;t communicate enough at a glance.</p>



<p>Add a button into your project:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="690" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1024x690.png" alt="" class="wp-image-16001" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1024x690.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-300x202.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-768x517.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1536x1035.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-2048x1380.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Configure its Icon property in the <code>Opening</code> event:</p>



<pre class="wp-block-code"><code>Me.Icon = WebPicture.BootstrapIcon("key-fill")</code></pre>



<p>If you don&#8217;t specify a color in BootstrapIcon, it will inherit the button caption color in this case. This is the easiest way to support Dark Mode with the new <code>WebButton.Icon</code> property, without doing any special tricks.</p>



<p>Here is how it looks like at runtime:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1024x889.png" alt="" class="wp-image-15999" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-300x261.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-768x667.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1536x1334.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light.png 1612w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Dark Mode:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1024x889.png" alt="" class="wp-image-16000" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-300x261.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-768x667.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1536x1334.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark.png 1612w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">WebLabel: Semantic HTML and Proper Element Types</h2>



<p>Two related changes landed for&nbsp;<code>WebLabel</code>&nbsp;in this release. The first is a correctness fix: the control was previously rendered using the HTML&nbsp;<code>&lt;label&gt;</code>&nbsp;element, which is semantically meant to label form inputs, not to display general text. That has been corrected.</p>



<p>The more interesting addition is that you can now choose which HTML element&nbsp;<code>WebLabel</code>&nbsp;renders as. If you want a label to be an&nbsp;<code>&lt;h1&gt;</code>&nbsp;or an&nbsp;<code>&lt;h2&gt;</code>, you can set that directly in the Inspector. This is useful not just for visual styling, but for accessibility tools and search engines that rely on page structure to understand content hierarchy.</p>



<p>Improving both, accessibility and making search engines happier, are some of our goals for 2026. You will continue seeing improvements in this sense.</p>



<h2 class="wp-block-heading">WebTextArea Gets AddText</h2>



<p><code>WebTextArea</code>&nbsp;now has an&nbsp;<code>AddText</code>&nbsp;method, consistent with how the control works on Desktop and Mobile. If you&#8217;re writing code that targets multiple platforms, this kind of parity saves you from having to check which target you&#8217;re on, before appending text.</p>



<h2 class="wp-block-heading">Scale Indicator on WebMapViewer</h2>



<p><code>WebMapViewer</code>&nbsp;now has a&nbsp;<code>HasScaleIndicator</code>&nbsp;property. When enabled, a small visual scale appears on the map showing real-world distance. It makes a difference in apps where users need spatial context. Field work, logistics or anything where &#8220;how far is that?&#8221; is a question users might actually ask.</p>



<h2 class="wp-block-heading">Performance and Modernization Under the Hood</h2>



<p>A few changes in this release won&#8217;t be immediately visible, but they improve things for everyone.</p>



<p>Bootstrap has been updated to v5.3.8 which fixes some issues introduced in v5.3.7 impacting Xojo. The TypeScript compiler has been updated to v5.9.3, and the compilation target has been bumped from ES6 to ES2020. Unused code in the Web Framework has been cleaned up to reduce the compiled bundle size.</p>



<p>Xojo has also removed its own internal usage of Modernizr. The library is still present for now so existing apps that rely on it won&#8217;t break, but it&#8217;s no longer used by the framework itself and will be removed in a future release.</p>



<p>If you&#8217;ve been meaning to audit your web app for performance, this is a good moment to look at&nbsp;<code>SendEventsInBatches</code>&nbsp;and&nbsp;<code>LazyLoadDependencies</code>&nbsp;on&nbsp;<code>WebSession</code>&nbsp;as well. Both now default to&nbsp;<code>True</code>&nbsp;on new projects, so if your existing app has them disabled, it&#8217;s worth trying them out. These properties have been around for a while already but were turned off by default.</p>



<h2 class="wp-block-heading">API Consistency Cleanups</h2>



<p>A few methods have been deprecated in favour of names that are consistent with the rest of the framework:</p>



<ul class="wp-block-list">
<li><code>WebApplication.AutoQuit</code>&nbsp;→&nbsp;<code>AllowAutoQuit</code></li>



<li><code>WebListBox.ReloadData</code>&nbsp;→&nbsp;<code>ReloadFromDataSource</code></li>



<li><code>WebRadioGroup.RemoveAllRows</code>&nbsp;→&nbsp;<code>RemoveAll</code>, and&nbsp;<code>RemoveRowAt</code>&nbsp;→&nbsp;<code>RemoveAt</code></li>
</ul>



<p>Your existing code will still compile, but it&#8217;s worth updating these when you get a chance.</p>



<h2 class="wp-block-heading">Wrapping Up</h2>



<p>Between new controls, better HTML semantics, and a leaner runtime, 2026r1 is a worthwhile update for anyone building web apps with Xojo. Check out the&nbsp;<a href="https://documentation.xojo.com/resources/release_notes/2026r1.html">full release notes</a>&nbsp;for the complete list of changes.</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-browser.mp4" length="707463" type="video/mp4" />

			</item>
		<item>
		<title>Team-based Signing Arrives to macOS</title>
		<link>https://blog.xojo.com/2026/03/31/team-based-signing-arrives-to-macos/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 13:21:00 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Apple Developer Account]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15951</guid>

					<description><![CDATA[In Xojo 2026r1 we revised the macOS Developer ID field and replaced it with a Team-based popup menu that aligns with the style found in&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In Xojo 2026r1 we revised the macOS Developer ID field and replaced it with a Team-based popup menu that aligns with the style found in iOS projects. This change aims to offer a cleaner, more intuitive way to manage developer certificates for the distribution of your built macOS app.</p>



<span id="more-15951"></span>



<p>The Developer ID field was introduced in Xojo 2022r1, allowing you to fill in the developer certificate information needed for signing built macOS apps; however, it could be confusing to know exactly what information was expected.</p>



<ul class="wp-block-list">
<li>Developer ID Application</li>



<li>Developer ID Application: Francisco Javier Rodriguez Menendez</li>



<li>Developer ID Application: Francisco Javier Rodriguez Menendez (BW7PU32485)</li>



<li>7D767DB917A45A8976BEB5B92F04E8C18D09501A</li>
</ul>



<p>And… which certificate should be used for Development builds, Direct Distribution, or Mac App Store publishing? That may not be obvious for someone new to all this.</p>



<p>Additionally, what happens if the entered data comes from an expired certificate or if the certificate isn’t in the Keychain?</p>



<h2 class="wp-block-heading">The new approach: How it works</h2>



<p>The Team-based signing chooser for the Mac Developer ID field follows these steps:</p>



<ul class="wp-block-list">
<li><strong>Collects all the developer certificates</strong> found under the user Keychain.</li>



<li><strong>Groups the valid certificates by Team</strong> (what Apple designates as the TeamID).</li>



<li>Based on the previous information, the new popup menu &#8220;Build For&#8221; will offer only the code-signing options available for the current selected Team:
<ul class="wp-block-list">
<li><strong>Development</strong>. This is the equivalent to using the Apple Development certificate.</li>



<li><strong>Direct Distribution</strong>. This is the equivalent to using the Developer ID Application certificate.</li>



<li><strong>App Store</strong>. This is the equivalent to using the Apple Distribution certificate. In addition, the Publish feature will be enabled if, for the selected Team, there is also a valid 3rd‑party Mac Developer Installer certificate available.</li>
</ul>
</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="600" height="540" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.28.02.png" alt="" class="wp-image-15962" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.28.02.png 600w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.28.02-300x270.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>
</div>


<p>If None is selected in the Developer ID popup menu, the macOS app will be built/debugged using Ad-Hoc signing.</p>



<p>Both menus update on the fly, so if new certificates are added (or removed) from the keychain, or if any have expired since last opened, both the Developer ID and Build For popup menus will reflect those changes.</p>



<h2 class="wp-block-heading">macOS Certificates Inspector Window</h2>



<p>Under the Teams popup menu, there is also an Inspect… option. When selected, it opens a new window where you can view and gather additional information for:</p>



<ul class="wp-block-list">
<li>Installed / Missing Apple Intermediate Certificates.</li>



<li>Installed / Missing / Expired Developer Certificates, grouped by Team.</li>
</ul>



<p>At a glance, you’ll see useful details for each certificate, such as:</p>



<ul class="wp-block-list">
<li>The expiration date</li>



<li>The keychain where it is stored.</li>



<li>Serial number, useful for identifying same-kind developer / intermediate certificates under different Macs.</li>



<li>Issuer specific information.</li>
</ul>



<p>Clicking any certificate provides more detailed information about the role it plays in the macOS signing process.</p>


<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="2522" height="1920" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21.png" alt="" class="wp-image-15963" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21.png 2522w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21-300x228.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21-1024x780.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21-768x585.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21-1536x1169.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-18-at-09.30.21-2048x1559.png 2048w" sizes="auto, (max-width: 2522px) 100vw, 2522px" /></figure>
</div>


<p>This Inspector is also useful in order to identify some of the most common issues related with the handling of certificates such as:</p>



<ul class="wp-block-list">
<li><strong>Missing certificates for a given Team</strong>, determining thus the options that are available under the &#8220;Build For&#8221; popup menu.</li>



<li><strong>Expired certificates</strong>. These also determine the options that are available under the &#8220;Build For&#8221; popup menu for a given Team. In addition, if you want to do some cleanup, it is possible to delete these expired certificates directly from the Inspector without needing to open the Keychain Access app.</li>



<li><strong>About to expire certificates</strong>, so you are aware of it and the impact it could have on apps close to be distributed or on already created Provisioning Profiles, for example.</li>



<li><strong>Certificates with their private key missing</strong>. These can&#8217;t be used for signing purposes, so you will be able to re-install them in the keychain (if you have a backup) or install a new certificate.</li>



<li><strong>Developer Certificates where some of the required intermediate certificate is missing</strong>. You will be able to install the missing Intermediate (active Internet connection required).</li>
</ul>



<h2 class="wp-block-heading">Improvements to macOS Builds and Debugged apps</h2>



<p>Although Sandboxing, Entitlements, and Provisioning Profiles have been part of macOS app development, this release brings several enhancements in these areas:</p>



<ul class="wp-block-list">
<li>Now it is possible <strong>debug Sandboxed apps</strong> directly from the IDE.</li>



<li><strong>Entitlements and Provisioning Profile</strong> are applied when the app is debugged from the IDE.</li>



<li>Improvements in how the required Entitlements are added and signed when the macOS app is built; and also a better handling of the user-added entitlements and provisioning profile files (if required).</li>



<li><strong>Debugged and Built apps can be attached to the Instruments app</strong>. Among other things, Instruments can be used to detect issues such as memory leaks in the executed app. The IDE now automatically adds the required entitlement for this when: the app is debugged/built using the &#8220;None&#8221; (Ad-Hoc signing) from the Team popup menu, or, 2) when the app is built for Development (Build For) for a given Team.</li>
</ul>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2026/03/Untitled.mp4"></video></figure>



<p>When Build For is set to Direct Distribution or App Store, the required entitlement for Instruments to attach to the app, will be added only when the app is debugged from the IDE. If you want to use Instruments with a built app signed using these certificates, then you need to add that entitlement explicitly.</p>



<p>This decision is because when get-tasks-allow is set to True (the entitlement required in order Instrument being able to function), there are some well documented vulnerabilities that could be used to escalate privileges or inject code into your app. That&#8217;s not desirable for your distributed apps for sure (whether using Direct Distribution or if your app is installed through the Mac App Store).</p>



<h2 class="wp-block-heading">Looking forward</h2>



<p><br>We know there are still some areas to improve regarding code signing on macOS (and iOS) and we are working on some of them already. In the meantime, you’ll likely find the new Team-based Developer ID option more approachable, especially if this is your first experience dealing with certificates, signing, and distributing your freshly built macOS app.</p>



<p>A big THANK YOU to Richard Grafl for all his help and feedback during the beta-testing cycle of this feature.</p>



<p>Happy macOS code-signing!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p>Learn more about Code Signing in our recent series:</p>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2026/03/Untitled.mp4" length="2577230" type="video/mp4" />

			</item>
		<item>
		<title>Now Available: Xojo 2026r1</title>
		<link>https://blog.xojo.com/2026/03/31/now-available-xojo-2026r1/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 13:20:00 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[2026r1]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16083</guid>

					<description><![CDATA[Xojo 2026r1 is officially out today. It’s our first major update of the year and this post serves as the map for everything new. We’ve&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2026r1 is officially out today. It’s our first major update of the year and this post serves as the map for everything new. We’ve packed in over 50 new features and closed out 120+ bugs.</p>



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



<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">
<h2 class="wp-block-heading">The Debugger gets &#8220;Watchpoints&#8221;</h2>



<p>The biggest workflow change in 2026r1 is the addition of&nbsp;<strong>Watchpoints</strong>. Now, you can tell the debugger to break whenever a specific variable changes or meets a condition you define. It’s a massive time-saver for state-related debugging. <a href="https://blog.xojo.com/2026/03/31/watchpoints-in-xojo-a-smarter-way-to-track-your-data/" target="_blank" rel="noreferrer noopener">Read more: Watchpoints in Xojo – A Smarter Way to Track Your Data</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading">Android: Charts and PDFs</h2>



<p>We are continuing to close the gap between Android and our other targets. This release adds the&nbsp;<code>MobileChart</code>&nbsp;control and the&nbsp;<code>MobilePDFViewer</code>&nbsp;to the Android framework. If you’ve been waiting to bring data visualization or document handling to your Android apps, these are ready for prime time. <a href="https://blog.xojo.com/2026/03/31/more-new-features-for-android/" target="_blank" rel="noreferrer noopener">Read more: More New Features for Android</a></p>
</div>
</div>



<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">
<h2 class="wp-block-heading">Simplified macOS Signing</h2>



<p>Code signing is rarely fun, so we’ve overhauled how the IDE handles it on macOS. This update introduces Team-Based signing, which does a much better job of detecting your Apple Developer certificates and automating provisioning profiles. It makes the jump to Sandboxing or the App Store a lot less painful. <a href="https://blog.xojo.com/2026/03/31/team-based-signing-arrives-to-macos/" target="_blank" rel="noreferrer noopener">Read more: Team-Based Signing Arrives to macOS</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading">Live UI Previews in the IDE</h2>



<p>No more &#8220;placeholder&#8221; boxes for your custom controls. With the new&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;event, your Desktop and Mobile subclasses can now render their actual UI directly inside the Xojo Layout Editor. It means what you see while designing is much closer to what you see at runtime. <a href="https://blog.xojo.com/2026/03/31/custom-control-rendering-with-drawcontrolinlayouteditor/" target="_blank" rel="noreferrer noopener">Read more: Custom Control Rendering with DrawControlInLayoutEditor</a></p>
</div>
</div>



<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">
<h2 class="wp-block-heading">Web and Mobile UI Tweaks</h2>



<p>We’ve added several long-requested UI tools to make your apps more interactive:</p>



<ul class="wp-block-list">
<li><strong>WebSwitch:</strong>&nbsp;A native toggle control for Xojo Web apps.</li>



<li><strong>Barcode Scanning:</strong>&nbsp;Official support for scanning barcodes directly within Web projects.</li>



<li><strong>Native Color Pickers:</strong>&nbsp;We’ve added a&nbsp;<code>WebColorPicker</code>&nbsp;and a&nbsp;<code>MobileColorPicker</code>&nbsp;(for Android) to match the existing desktop and iOS functionality.<br><a href="https://blog.xojo.com/2026/03/31/scan-barcodes-pick-colors-toggle-xojo-web-in-2026r1/" target="_blank" rel="noreferrer noopener">Read more: Scan Barcodes, Pick Colors, and the New WebSwitch</a></li>
</ul>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h2 class="wp-block-heading">AI Assistance: Jade Upgraded</h2>



<p><strong>Jade</strong>, Xojo&#8217;s built-in AI assistant, got a significant improvement in this release. It now defaults to&nbsp;<strong>Claude 4.6</strong>, providing much more accurate and context-aware code suggestions. We’ve also added conversation &#8220;compaction,&#8221; which helps the assistant remember long threads without hitting token limits or slowing down.<br><a href="https://blog.xojo.com/2026/03/31/jade-improvements/" target="_blank" rel="noreferrer noopener">Read more: Jade Improvements in 2026r1</a></p>
</div>
</div>



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



<h2 class="wp-block-heading">Stability and Modernization</h2>



<p>Under the hood, we’ve updated the Web framework to use Bootstrap v5.3.8 and set the TypeScript target to ES2020. Windows users will notice better WinUI support for&nbsp;<code>DesktopTabPanel</code>&nbsp;and&nbsp;<code>DesktopGroupBox</code>, along with fixes for Dark Mode consistency.</p>



<p>You can find the exhaustive list of every change in the&nbsp;<a href="https://documentation.xojo.com/versions/2026r1/resources/release_notes/2026r1.html" target="_blank" rel="noreferrer noopener">Xojo 2026r1 Release Notes</a>.</p>



<p>Xojo 2026r1 is a free update for everyone.<br><strong><a href="https://www.xojo.com/download" target="_blank" rel="noreferrer noopener">Download Xojo 2026r1 now.</a></strong></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Code Signing on macOS: What Developers Need to Know, Part 3</title>
		<link>https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 24 Mar 2026 16:00:00 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple Developer Account]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15944</guid>

					<description><![CDATA[If you followed the previous two articles in this series, you should be set up properly now, right? Your Mac developer certificates are stored in&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you followed the previous two articles in this series, you should be set up properly now, right? Your Mac developer certificates are stored in Keychain Access, so you only need to fill in the Developer ID field under Build Settings &gt; macOS &gt; Sign with the appropriate certificate value, click Build (or Publish), and distribute your new amazing app worldwide. Well, not quite. There are still other pieces to consider when signing and distributing your macOS app.</p>



<span id="more-15944"></span>



<p>For the past 20 years, Apple has increasingly tightened security measures when it comes to running apps distributed by third parties. Let&#8217;s take a look at this summarized timeline of code-signing and security measures added by Apple over years:</p>


<div class="wp-block-image">
<figure class="aligncenter"><a href="https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-scaled.png"><img loading="lazy" decoding="async" width="2560" height="1056" src="https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-scaled.png" alt="" class="wp-image-15945" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-scaled.png 2560w, https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-300x124.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-1024x422.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-768x317.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-1536x634.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/macOS-signing-Timeline-2048x845.png 2048w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></a></figure>
</div>


<p>The most notable developments happened in 2011, 2012 and 2018, when terms like Sandbox and, especially, Containers, Gatekeeper, Hardened Runtime and Notarization were introduced and began to impact other pieces of the puzzle to consider when signing macOS apps. In fact, we could say that technologies such as code-signing, Sandboxing, Entitlements or Provisioning Profiles were among the first iOS technologies to make their way to macOS.</p>



<p>So here is an broad overview what these technologies mean:</p>



<ul class="wp-block-list">
<li><strong>Sandboxing</strong>&#8211; When used, Sandboxing confines applications to a restricted, designated area of the system (its own &#8220;container&#8221;), preventing them from accessing user data, hardware or other apps without explicit permission. The system requires apps to ask for permission to use hardware resources or access user files. Sandboxing is mandatory for apps distributed through the Mac App Store.</li>



<li><strong>Gatekeeper-</strong> This technology is the primary security layer that checks whether a downloaded app comes from a verified/known developer, especially when the application has been Notarized by Apple.</li>



<li><strong>Hardened Runtime</strong>&#8211; Acts as a proactive, system-enforced shield that protects applications while they run, preventing malicious code from exploiting legitimate software. Enabling Hardened Runtime is required for Notarization.</li>



<li><strong>Notarization</strong>&#8211; Notarization is an automated security screening process run by Apple that scans software distributed outside the Mac App Store for malicious components and known security issues. Today, notarization is required for software distributed outside the Mac App Store that has been signed with the Developer ID application certificate. As a result of the process, notarization generates and staples a ticket, signed by an Apple certificate, to the app so Gatekeeper can trust it when executed.</li>
</ul>



<p>So, basically, while Sandboxing is still optional for apps distributed outside the Mac App Store (i.e., signed with your Developer ID certificate), Notarization and Hardened Runtime are the recommended defaults. Enabling Sandboxing for your app is something you should consider based on the needs (features) and the privacy balance you want to offer your users.</p>



<p>If you plan to distribute the app through the Mac App Store as well, it will need to be Sandboxed and signed with your Apple Distribution certificate, while enabling Hardened Runtime is optional.</p>



<h2 class="wp-block-heading">Entitlements and Provisioning Profiles</h2>



<p>Entitlements and Provisioning Profiles are also required for many of these security measures, depending on the features and services your app uses, and they come into play during building and signing.</p>



<p>If you decide to go the Sandboxing route, then using Entitlements is mandatory. The good news is that Sandboxing entitlements are free to use (they don’t require creating or adding a Provisioning Profile to the project). However, if your app needs special access to the Keychain or uses iCloud, Apple Pay, or other services, you’ll need to create a Provisioning Profile in the Apple Developer portal.</p>



<p>Wait—what are Entitlements and Provisioning Profiles, and how do they relate to macOS app code signing?</p>



<h3 class="wp-block-heading">Entitlements</h3>



<p>Entitlements are XML-based .plist files (not unlike the app’s Info.plist) containing a set of key-value pairs. They are embedded directly into the app’s binary as part of the code signing process, typically using your Developer ID Application or Apple Distribution certificates.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="931" height="651" src="https://blog.xojo.com/wp-content/uploads/2026/03/Entitlements.png" alt="" class="wp-image-15946" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Entitlements.png 931w, https://blog.xojo.com/wp-content/uploads/2026/03/Entitlements-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Entitlements-768x537.png 768w" sizes="auto, (max-width: 931px) 100vw, 931px" /></figure>



<h3 class="wp-block-heading">Provisioning Profiles</h3>



<p>While Entitlements are just a file, Provisioning Profiles are a different beast:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="911" height="514" src="https://blog.xojo.com/wp-content/uploads/2026/03/Provisioning-Profiles.png" alt="" class="wp-image-15947" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Provisioning-Profiles.png 911w, https://blog.xojo.com/wp-content/uploads/2026/03/Provisioning-Profiles-300x169.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Provisioning-Profiles-768x433.png 768w" sizes="auto, (max-width: 911px) 100vw, 911px" /></figure>



<p>Provisioning Profiles must be created in the Apple Developer Portal. When you create one, you specify the App ID (the combination of your Team ID and the app bundle identifier which are case sensitive so pay attention). Even if you don’t plan to distribute your macOS app via the Mac App Store, you still need a Provisioning Profile, which requires creating an App ID first in the Developer Portal.</p>



<p>There are two kinds of Provisioning Profiles: Development and Distribution. As part of the provisioning profile creation, you must choose which type you will use.</p>



<ul class="wp-block-list">
<li><strong>Development Provisioning Profiles</strong> are used while you’re developing your app; the app is signed with an Apple Development certificate and is intended to run on a set of Mac computers you’ve registered. During creation, you can add as many Apple Development certificates as you have under your Team ID.</li>



<li><strong>Distribution Provisioning Profiles</strong> are used when distributing your app. For direct distribution, sign with the same Developer ID certificate you’ll use for signing the app; for Mac App Store distribution, sign with the Apple Distribution certificate.</li>



<li><strong>Development and Distribution Provisioning Profiles do expire</strong>. This is something to keep in mind, especially when deploying new or updated versions of your app, because you may need to create new profiles.</li>



<li><strong>Development and Distribution Profiles are editable</strong>. If you make a mistake, note that both types can be edited in the Apple Developer portal, but only for certain fields: the App ID, the profile name, the selected certificate, and (for Development profiles) the included testing devices.</li>
</ul>



<h2 class="wp-block-heading">When Certificates and/or Provisioning Profiles expire…</h2>



<p>We’ve already noted in previous articles that Apple Developer certificates expire one year after they’re created. We’ve also learned that if your app relies on a Distribution Provisioning Profile, that profile can expire as well. So, what does this mean for your already deployed apps?</p>



<p>No worries. Let’s focus first on directly distributed macOS apps (those signed with the Developer ID certificate) and pull one screenshot from the previous article:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1740" height="882" src="https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp.png" alt="" class="wp-image-15948" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp.png 1740w, https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp-300x152.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp-1024x519.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp-768x389.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Timestamp-1536x779.png 1536w" sizes="auto, (max-width: 1740px) 100vw, 1740px" /></figure>



<p>Observe the highlighted Timestamp line. When the app is signed, the date is added automatically (retrieved from Apple’s servers). So, when a user runs an app whose embedded Developer ID Certificate has expired since its release, Gatekeeper will rely on that timestamp, compare it to the embedded certificate’s expiration date, and if everything matches—meaning it was signed before the certificate expired—the app will continue to work, provided the embedded certificate has not been revoked by the developer. In addition, if the app was Notarized, that helps a lot, because the stapled ticket includes its own timestamp and was signed with a longer-lasting Apple Certificate.</p>



<p>If the app is distributed through the Mac App Store, there’s good news. After you submit the app for distribution via App Store Connect and it passes Apple’s review, the app’s signing with your Apple Distribution certificate is replaced by Apple’s own signing. This means that users who install the app from the Mac App Store can continue to run it even if your original Apple Distribution certificate expired long ago.</p>



<p>Distribution Provisioning Profiles behave differently from others: once they expire, the app containing such a Distribution Profile will fail to execute.</p>



<p>The good news is that a Distribution Profile lasts for a very long time (around 18 years) so you’ll likely have ample time to create new distribution provisioning profiles and deploy updates that use renewed profiles well before users are affected.</p>



<p>Of course, as soon as any of your Apple Developer certificates expire, you already know how to request and install new ones in your Mac keychain.</p>



<h2 class="wp-block-heading">Nearly Concluded</h2>



<p>In the next, and last article, we will see how Xojo helps with everything related to signing and distributing your macOS apps. I&#8217;ll also show you how to deal with some of the most common issues related with certificates.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Code Signing on macOS: What Developers Need to Know, Part 2</title>
		<link>https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 18 Mar 2026 14:00:00 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple Developer Account]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15864</guid>

					<description><![CDATA[On the Apple side of code signing with developer certificates, we already know that the required root certificate, acting as the base anchor of the&#8230;]]></description>
										<content:encoded><![CDATA[
<p>On the Apple side of code signing with developer certificates, we already know that the required root certificate, acting as the base anchor of the trust chain, is installed already on our Macs under the System Roots keychain.</p>



<p>But before we can reach our leaf developer certificates,&nbsp;we also need to have the Apple Development Intermediate certificates installed in our keychain. These are typically found in the Login keychain, though they can also be found in the System Roots or System keychains.</p>



<h2 class="wp-block-heading">Installing Apple Developer Intermediate Certificates</h2>



<p>Since Xcode 11.4.1 and later, these can be automatically downloaded and installed in the keychain, but if not, they can also can be downloaded from the <a href="https://www.apple.com/certificateauthority/" target="_blank" rel="noreferrer noopener">Apple PKI</a> webpage. The ones we are interested in are:</p>



<ul class="wp-block-list">
<li>Developer ID &#8211; G2</li>



<li>Worldwide Developer Relations &#8211; G2</li>



<li>Worldwide Developer Relations &#8211; G3</li>



<li>Worldwide Developer Relations &#8211; G4</li>



<li>Worldwide Developer Relations &#8211; G5</li>



<li>Worldwide Developer Relations &#8211; G6</li>
</ul>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Note: The Developer ID &#8211; G2 certificate corresponds to the Developer ID Certification Authority. The WWDR certificates (G2–G6) correspond to the Apple Worldwide Developer Relations Certification Authority.</p>
</blockquote>



<p>As you can see from the list, there are several versions (or generations) for the WWDR Intermediate certificate; so, which one should you download? The short answer: it depends.</p>



<p>On February, 7, 2023 the previous WWDR intermediate certificate expired; so Apple decided to rollout a new renewed version that will expire on February 20, 2030. As part of that update Apple issued additional Intermediate certificates to better segment the purpose of different certificates:</p>



<ul class="wp-block-list">
<li>G2: ECDSA signing for Apple Pay.</li>



<li>G3: Software signing and Services.</li>



<li>G4: Features supported by Apple Push Notification Service.</li>



<li>G5: App Store Signing and Services.</li>



<li>G6: ECDSA signing of Software and Services.</li>
</ul>



<p>In practice, G3, G4, and G5 are sufficient for most scenarios.</p>



<h2 class="wp-block-heading">Developer Certificates: The final goal!</h2>



<p>To focus on the subject, what kind of leaf developer certificates are created from these two types of Intermediate certificates? This scheme will help:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1644" height="912" src="https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust.png" alt="" class="wp-image-15865" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust.png 1644w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust-300x166.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust-1024x568.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust-768x426.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Development-Certificates-Chain-Of-Trust-1536x852.png 1536w" sizes="auto, (max-width: 1644px) 100vw, 1644px" /></figure>



<p>As you can see from the above diagram, there are four main leaf certificates we will use to sign our macOS apps, based on their prefix:</p>



<ul class="wp-block-list">
<li><strong>Developer ID Application</strong>. Use this one to code sign a macOS app distributed outside the Mac App Store.</li>



<li><strong>Developer ID Installer</strong>. Use this one to code sign the Installer, DMG or .pgk file of a macOS app distributed outside the Mac App Store.</li>



<li><strong>Apple Distribution</strong>. This certificate is required to code sign a macOS app sent to the AppStore Connect for its distribution through the Mac App Store.</li>



<li><strong>3rd Party Mac Developer Installer</strong>. This Certificate is required to code sign the package of the app sent to the AppStore Connect. For example, when using the Publish feature from the Xojo IDE.</li>
</ul>



<h2 class="wp-block-heading">Creating and Installing the Developer Certificates</h2>



<p>As stated in the <a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">first article</a> of this series, you need a paid Apple Developer Program membership. Once that’s in place, the easiest way to install these required certificates in your macOS Keychain is through Xcode.</p>



<p>So, if it is the first time you need to install them on a Mac computer:</p>



<ol class="wp-block-list">
<li>Go to Xcode &gt; Preferences.</li>



<li>Select Apple Accounts.</li>



<li>Use your developer credentials to login into your developer account, or select it from the list if you are already logged.</li>



<li>Select the Team from the list.</li>



<li>Click the &#8220;Manage Certificates…&#8221; button.</li>



<li>Click the &#8220;+&#8221; popup menu in the lower-left corner of the resulting window, and select the developer certificate you want to install (all of these if it is the first time you install them).</li>
</ol>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="468" height="398" src="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-25-a-las-15.53.00.png" alt="" class="wp-image-15866" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-25-a-las-15.53.00.png 468w, https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-25-a-las-15.53.00-300x255.png 300w" sizes="auto, (max-width: 468px) 100vw, 468px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Note:</strong> Under the hood, Xcode follows the same process described for installing the developer certificates manually.</p>
</blockquote>



<p>If you prefer to go through the manual process instead:</p>



<ol class="wp-block-list">
<li>Access the <a href="https://developer.apple.com" target="_blank" rel="noreferrer noopener">Apple Developer website</a>.</li>



<li>In <a href="https://developer.apple.com/account/resources" target="_blank" rel="noreferrer noopener">Certificates, Identifiers &amp; Profiles, click Certificates in the sidebar.</a></li>



<li>On the top left, click the add button (+).</li>



<li>Under Software, select Developer ID, then click Continue.
<ul class="wp-block-list">
<li><strong>Developer ID Application</strong>: This certificate is used to code sign your app for distribution outside of the Mac App Store Connect.</li>



<li><strong>Developer ID Installer</strong>: This certificate is used to sign your app’s installer Package for distribution outside of the Mac App Store Connect.</li>



<li><strong>Apple Development</strong>: Used to run and debug apps on macOS during development.</li>



<li><strong>Apple Distribution</strong>: Used to sign apps for submission to App Store Connect.</li>



<li><strong>Mac App Distribution</strong>: Used to sign macOS apps intended to be distributed through the Mac App Store.</li>



<li><strong>Mac Installer Distribution</strong>: Used to send the macOS app to the App Store Connect for TestFlight or distribution through the Mac App Store.</li>
</ul>
</li>



<li>Follow the instructions to <a href="https://developer.apple.com/help/account/certificates/create-a-certificate-signing-request" target="_blank" rel="noreferrer noopener">create a certificate signing request</a>.</li>



<li>Click Choose File.</li>



<li>In the dialog that appears, select the certificate request file (a file with a .certSigningRequest file extension), then click Choose.</li>



<li>Click Continue.</li>



<li>Click Download.</li>



<li>The certificate file (a file with a .cer file extension) appears in your Downloads folder.</li>



<li>To install the certificate in your keychain, double-click the downloaded certificate file. The certificate appears in the My Certificates category in Keychain Access.</li>
</ol>



<h2 class="wp-block-heading">It&#8217;s All About Identities</h2>



<p>While Intermediate and Root certificates only have the Public Key on them, so they can verify other (leaf) certificates, the leaf certificates installed on your macOS Login keychain behave a bit different. Let&#8217;s see how.</p>



<p>Both if you use Xcode or create the CSR request manually to generate the developer certificates, using the Keychain Access app for that, in both of these scenarios <strong>a Private Key will be created and stored locally on your keychain</strong> as part of the process. <strong>Only the public key section of that private key is sent to the Apple servers</strong> so it can be included in the generated developer certificate. Once any of the possible developer certificates is downloaded and installed in the keychain, such certificate will have its private key associated with it:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="872" height="88" src="https://blog.xojo.com/wp-content/uploads/2026/02/Screenshot-2026-02-25-at-4.20.45-PM.png" alt="" class="wp-image-15867" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Screenshot-2026-02-25-at-4.20.45-PM.png 872w, https://blog.xojo.com/wp-content/uploads/2026/02/Screenshot-2026-02-25-at-4.20.45-PM-300x30.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Screenshot-2026-02-25-at-4.20.45-PM-768x78.png 768w" sizes="auto, (max-width: 872px) 100vw, 872px" /></figure>



<p>The pair of the developer certificate and the associated private key is what is called an Identity.</p>



<h2 class="wp-block-heading">Code signing With Developer Certificates</h2>



<p>In fact, while we often say or hear “code signing with certificates,” the real signing of the app is done with the private key associated with that certificate. The certificate itself (and thus the public key portion of that key pair) is included in the signing process. This allows macOS to verify the signature each time the user runs the app</p>



<p>Do you remember the diagram showing how the &#8220;Ad-Hoc&#8221; code signing process works? Let&#8217;s compare it when the same process is done using a &#8220;Developer ID Application&#8221; Certificate… and, most important, the associated private key:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1724" height="812" src="https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing.png" alt="" class="wp-image-15869" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing.png 1724w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing-300x141.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing-1024x482.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing-768x362.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Apple-Certificate-Signing-1536x723.png 1536w" sizes="auto, (max-width: 1724px) 100vw, 1724px" /></figure>



<p>As you can see, in this case the data is cyphered using the private key from the developer certificate and, then, the certificate itself is stored as part of the app itself. So, if for example we build this time an empty Desktop app for macOS using the Developer ID Application, and open the resulting CodeResources file in a text editor we will see something different compared with the Ad-Hoc signed version:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1298" height="974" src="https://blog.xojo.com/wp-content/uploads/2026/02/CodeResources_Signed.png" alt="" class="wp-image-15870" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/CodeResources_Signed.png 1298w, https://blog.xojo.com/wp-content/uploads/2026/02/CodeResources_Signed-300x225.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/CodeResources_Signed-1024x768.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/CodeResources_Signed-768x576.png 768w" sizes="auto, (max-width: 1298px) 100vw, 1298px" /></figure>



<p>In this case the field <strong>requirement&nbsp;</strong>associated with each file and hash value is significantly more strict. In fact, it makes reference to the Chain of Trust Gatekeeper is required to follow and validate. In plain English, the highlighted lines come to say something like:</p>



<ol class="wp-block-list">
<li>Hey! make sure there is a <strong>Developer ID Application</strong> certificate (Apple Extension attribute —OID— <em>1.2.840.113635.100.6.1.13&nbsp;</em>for the X.509 certificate), for the developer with a <strong>TeamID</strong> BW7PU32485.</li>



<li>Next, verify such certificate is issued by the &#8220;<strong>Apple Developer ID Certificate Authority</strong>&#8221; (other of the Apple-specific X.509 extension, attribute or OID. In this case: 1.2.840.113635.100.6.2.6).</li>



<li>And finally, go down through the Chain of Trust and verify the previous one with the <strong>Anchor</strong> certificate (Apple Root CA, do you remember?)</li>
</ol>



<p>So far so good. But how we can know if the app meets these requirements; and what about the certificates themselves? Well, it&#8217;s easy to check both using the codesign tool.</p>



<p>Open a Terminal window and type the following command:</p>



<pre class="wp-block-preformatted">codesign --verify -vvv "MyApp.app"</pre>



<p>The output will be something similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2198" height="336" src="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement.png" alt="" class="wp-image-15871" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement.png 2198w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement-300x46.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement-1024x157.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement-768x117.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement-1536x235.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-SatisfiedRequirement-2048x313.png 2048w" sizes="auto, (max-width: 2198px) 100vw, 2198px" /></figure>



<p>As you can see in the highlighted lines, yes, it satisfies the <strong>Designated Requirements</strong> we saw in our CodeResources file! Also, the previous line states that it is valid on disk. That means:</p>



<ul class="wp-block-list">
<li>All of the expected files are present.</li>



<li>There are no extra files.</li>



<li>None of the files have been modified.</li>



<li>A basic trust evaluation of the leaf certificate was successful.</li>



<li>And it satisfies its own Designated Requirements (DR).</li>
</ul>



<p>It is even possible to see the Chain of Trust for the code signature issuing:</p>



<pre class="wp-block-preformatted">codesign --display -vv "MyApp.app"&nbsp;</pre>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1222" height="340" src="https://blog.xojo.com/wp-content/uploads/2026/02/Codesign-ChainOfTrust.png" alt="" class="wp-image-15872" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Codesign-ChainOfTrust.png 1222w, https://blog.xojo.com/wp-content/uploads/2026/02/Codesign-ChainOfTrust-300x83.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Codesign-ChainOfTrust-1024x285.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Codesign-ChainOfTrust-768x214.png 768w" sizes="auto, (max-width: 1222px) 100vw, 1222px" /></figure>



<p>And if you are curious enough, it is even possible to extract the embedded certificates stored in the <a href="https://www.ietf.org/rfc/rfc3852.txt" target="_blank" rel="noreferrer noopener">CMS structure within the code signature</a>:</p>



<pre class="wp-block-preformatted">codesign --display --extract-certificates "MyApp.app"</pre>



<p>As result it will, usually, create three files. Take a closer look at the &#8220;Issuer&#8221; and &#8220;Subject&#8221; lines; specially on the Subject line for the OU value (Organizative Unit or, using Apple wording, the TeamID) for the codesign0 file. Do you remember the &#8220;leaf[subject.OU=BW7PU32485]&#8221; data from the CodeResources file?&nbsp;:</p>



<p><strong>codesign0.</strong> This is the file for the Leaf certificate; in our example &#8220;Developer ID Application&#8221;.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1820" height="368" src="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate.png" alt="" class="wp-image-15873" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate.png 1820w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate-300x61.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate-1024x207.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate-768x155.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-DeveloperIDCertificate-1536x311.png 1536w" sizes="auto, (max-width: 1820px) 100vw, 1820px" /></figure>



<p><strong>codesign1.</strong> This one is for the Intermediate Certificate; in our example &#8220;Apple Developer ID Certificate Authority&#8221;.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1562" height="366" src="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate.png" alt="" class="wp-image-15874" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate.png 1562w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate-300x70.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate-1024x240.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate-768x180.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-IntermediateCertificate-1536x360.png 1536w" sizes="auto, (max-width: 1562px) 100vw, 1562px" /></figure>



<p><strong>codesign2.</strong> This one is for the Anchor Certificate; in our example &#8220;Apple Root CA&#8221;</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1274" height="344" src="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-RootCertificate.png" alt="" class="wp-image-15875" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/codesign-RootCertificate.png 1274w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-RootCertificate-300x81.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-RootCertificate-1024x276.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/codesign-RootCertificate-768x207.png 768w" sizes="auto, (max-width: 1274px) 100vw, 1274px" /></figure>



<p><br>As shown by the <strong>Issuer</strong> line in the codesign0 file for our “Developer ID Application,” it points to the previous certificate in the trust chain—the Developer ID Certification Authority. The codesign1 file for the extracted Developer ID Certification Authority points to the Apple Certification Authority in its Issuer field. Finally, the codesign1 certificate points to itself because, as the Root Certificate, it serves as the <strong>anchor</strong> for the trust chain.</p>



<h2 class="wp-block-heading">Wrapping up</h2>



<p>In this second article, we delved deeper into how Apple Developer certificates work, how a macOS app is signed (Ad-Hoc or with a specific developer certificate), and how the OS’s security features validate the signing when a user tries to run the app.</p>



<p>In the next article, we will cover more details about signing apps for the two main distribution types: Direct distribution and Mac App Store. We will also discuss what happens when certificates expire and how to troubleshoot the most common issues related to development certificates.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Your Framework, Your Rules: Why I Use Extends for Everything</title>
		<link>https://blog.xojo.com/2026/03/17/your-framework-your-rules-why-i-use-extends-for-everything/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Tue, 17 Mar 2026 15:00:00 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Code Organization]]></category>
		<category><![CDATA[Extends]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15904</guid>

					<description><![CDATA[Over the weekend, I was deep into a side project, parsing a massive server log dump. Strings were everywhere: timestamps were mangled, JSON blobs were&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Over the weekend, I was deep into a side project, parsing a massive server log dump. Strings were everywhere: timestamps were mangled, JSON blobs were half-broken&#8230;I kept writing these clunky utility calls, nesting functions inside functions, my code was turning into a sideways pyramid of parentheses.</p>



<p>Then I remembered&nbsp;<code>Extends</code>.</p>



<p>It&#8217;s one of those features that sits quietly in the language. But once it clicks, it changes how you think about utility code entirely. Using Extends, within twenty minutes, my nested mess became readable.</p>



<h2 class="wp-block-heading" id="the-moment-it-clicks">Extends Methods in Practice</h2>



<p>You know the feeling. You&#8217;re writing&nbsp;<code>ParseLogEntry(rawLine)</code>&nbsp;for the hundredth time, and something feels off. The function works. It&#8217;s in your Utilities module (maybe part of a Library?). But every time you call it, there&#8217;s this tiny friction. Why doesn&#8217;t String just&nbsp;<em>know</em>&nbsp;how to parse itself into a log entry? That&#8217;s what&nbsp;<code>Extends</code>&nbsp;fixes.</p>



<p>It lets you teach existing classes new tricks. You write a method in a module, tag the first parameter with&nbsp;<code>Extends</code>, and suddenly&nbsp;<code>String</code>,&nbsp;<code>DateTime</code>,&nbsp;<code>Dictionary</code>&nbsp;(whatever you need) behaves like it always had that method. No subclassing. No wrapper classes. Just the framework, extended to fit&nbsp;<em>your</em>&nbsp;brain.</p>



<h2 class="wp-block-heading" id="why-it-matters">Reading The Code</h2>



<p>Code is read far more than it&#8217;s written. We both know this. But we still write code that reads backwards.</p>



<pre class="wp-block-code"><code>// The old way
Var result As DateTime = ExtractTimestamp(CleanLogEntry(rawLine))

// With Extends
Var result As DateTime = rawLine.CleanLogEntry.ExtractTimestamp</code></pre>



<p>When you&#8217;re debugging at 2 AM, tracing logic through nested function calls is the last thing you want. Extension methods turn that horizontal scan into a vertical one. </p>



<h2 class="wp-block-heading" id="when-i-reach-for-it">When Extends is Exactly Right</h2>



<p>I don&#8217;t use&nbsp;<code>Extends</code>&nbsp;for everything; it&#8217;s not a replacement for proper inheritance or composition. But there are specific moments when it&#8217;s exactly right.</p>



<p><strong>Built-in types that need one more method.</strong>&nbsp;For my log parser, I needed to extract timestamps, clean junk characters, and pull out ISO dates. So, I extended the String class with my custom utilities and made it feel native.</p>



<p><strong>Framework classes you can&#8217;t touch.</strong>&nbsp;You can&#8217;t subclass everything, but <code>Extends</code> can work around things like things third-party plugins, legacy code.</p>



<p><strong>APIs you wish existed.</strong>&nbsp;I&#8217;ve lost count of how many times I&#8217;ve wanted a property or method on a framework class that just isn&#8217;t there.&nbsp;<code>Extends</code>&nbsp;lets me do just that.</p>



<p>For practical examples like email validation, URL validation, and dictionary helpers, check out this&nbsp;<a href="https://blog.xojo.com/2020/06/03/using-class-extensions-to-validate-email-and-url-data/">article</a>&nbsp;that walks you through real implementations. If you want code you can copy into your project today, it&#8217;s a good place to start.</p>



<h2 class="wp-block-heading" id="a-few-gotchas">A Few Things To Keep In Mind</h2>



<p><strong>Nil doesn&#8217;t forgive.</strong> Call an extension on a Nil object and you&#8217;ll get a <code>NilObjectException</code> before your method even runs. The extension sits on the right side of the dot. That object needs to exist.</p>



<p><strong>No override.</strong>&nbsp;You can&#8217;t replace built-in methods. If you try creating an extension with the same name as an existing method, the compiler will use the original. That&#8217;s a good thing; it means you can&#8217;t accidentally break framework behavior.</p>



<p><strong>No properties.</strong>&nbsp;Extensions add behavior, not state. If you need to store data, you still need a subclass or a wrapper.</p>



<p><strong>Stay organized.</strong>&nbsp;Put extensions in well-named modules like&nbsp;<code>LogParsingExtensions</code>&nbsp;or&nbsp;<code>StringHelpers</code>. Six months from now, you&#8217;ll want to know where that&nbsp;<code>.ExtractTimestamp</code>&nbsp;method came from.</p>



<p><strong>Dependencies can hide.</strong>&nbsp;Extension methods live in modules and behave like native methods, so it&#8217;s not always obvious which module a class depends on. Good naming helps.</p>



<h2 class="wp-block-heading" id="try-it">Trying Extends</h2>



<p>If you&#8217;ve never written an extension method, take five minutes. Add a module to your project and create a method like this:</p>



<pre class="wp-block-code"><code>Public Function ExtractFirstISODate(<strong>Extends source As String</strong>) As DateTime
  Var rx As New RegEx
  rx.SearchPattern = "(\d{4}-\d{2}-\d{2})&#91;Tt]?(\d{2}:\d{2}:\d{2})"
  
  Var match As RegExMatch = rx.Search(source)
  If match &lt;&gt; Nil And match.SubExpressionCount &gt; 1 Then
    Var datePart As String = match.SubExpressionString(1)
    Var timePart As String = match.SubExpressionString(2)
    Var isoString As String = datePart + " " + timePart
    
    Try
      Return DateTime.FromString(isoString)
    Catch err As RuntimeException
      Return Nil
    End Try
  End If
  Return Nil
End Function</code></pre>



<p>Now you can call it directly on any string:</p>



<pre class="wp-block-code"><code>Var logLine As String = "&#91;2025-08-14T14:32:15] ERROR: Connection timeout"

Var timestamp As DateTime = logLine.<strong>ExtractFirstISODate</strong>

If timestamp &lt;&gt; Nil Then
  MessageBox("Found timestamp: " + timestamp.ToString)
Else
  MessageBox("No valid timestamp found")
End If</code></pre>



<p>That&#8217;s it. No utility class to instantiate. No module name to remember. Just&nbsp;<code>stringVar.ExtractFirstISODate</code>.</p>



<p>For more complete examples, check out the&nbsp;<a href="https://documentation.xojo.com/getting_started/using_the_xojo_language/modules.html#getting-started-using-the-xojo-language-modules-extension-methods" target="_blank" rel="noreferrer noopener">Extension Methods topic</a>&nbsp;in the Xojo Documentation.</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Spotlight On: Carsten Kobusch</title>
		<link>https://blog.xojo.com/2026/03/11/spotlight-on-carsten-kobusch/</link>
		
		<dc:creator><![CDATA[Alyssa Foley]]></dc:creator>
		<pubDate>Wed, 11 Mar 2026 15:36:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Spotlight On]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15885</guid>

					<description><![CDATA[Spotlight On posts focus on Xojo community members. We’ll use this space to tell the stories of people using Xojo, share amazing Xojo-made apps and&#8230;]]></description>
										<content:encoded><![CDATA[
<p><em>Spotlight On posts focus on Xojo community members. We’ll use this space to tell the stories of people using Xojo, share amazing Xojo-made apps and spread awareness of community resources. If you have an app, a project or a person you want to see featured in Spotlight On,&nbsp;<a href="mailto:hello@xojo.com" target="_blank" rel="noreferrer noopener">tell us about it</a>!</em></p>



<p>The work Carsten does was brought to my attention when he replied to one of our posts on <a href="https://www.facebook.com/524053083053308/posts/1344900894301852?comment_id=24114497724844901">Facebook</a> talking about Xojo&#8217;s SerialConnection. Carsten said he used SerialConnection to open and monitor cash drawers in his Xojo-written ERP, AWARD+. Read how Carsten has used Xojo alongside PostgreSQL, MBS DynaPDF, and other tools for the last 25 years. </p>



<h3 class="wp-block-heading"><strong>Mac, Windows or Linux?</strong></h3>



<p>All of them.</p>



<h3 class="wp-block-heading"><strong>How would you explain your most recent project to a new developer?</strong></h3>



<p>We often have to keep up to new legal requirements here in the EU, so the last part was the integration of electronic invoices. For doing this we had to gather information about the laws, do&#8217;s and dont&#8217;s and required tools. We had to build a parser and creator for the XML part (a colleague of mine did most of that job in Xojo) and to integrate that into our module for creating and mailing invoices (that is my job). To make things easier, we often accessed existing partial solutions like MBS DynaPDF and Ghostscript to build a required PDF/A.</p>



<h3 class="wp-block-heading"><strong>What is something that has surprised you about coding in the last 5 years?</strong></h3>



<p>I am very surprised that still so many people insist on using C or C++. It&#8217;s like driving an old steam locomotive instead of a new truck. In our time, solutions have to be done very fast and they don&#8217;t last forever. So an IDE like Xojo is faster for prototyping or building. Especially for a small customer base or even individual development.</p>



<h3 class="wp-block-heading"><strong>Xojo isn&#8217;t the only tool in your kit. What is a piece of software more people should know about?</strong></h3>



<p>The software we make heavy use of is PostgreSQL. And we use Git. Do not try to work in a team without having something like Git. Even a single developer benefits from versioning and backups when using a hub. We use every command-line program that may help us, to name a few: ImageMagick, SIPs, qlmanage, Ghostscript and curl.</p>



<h3 class="wp-block-heading">Which three Xojo language features or framework capabilities do you find yourself relying/using on the most?</h3>



<ul class="wp-block-list">
<li>PostgreSqlPlugin</li>



<li>AutoComplete and other integrated help</li>



<li>Navigation inside code editor like &#8220;Go to Function&#8221; using ContextualMenu</li>
</ul>



<h3 class="wp-block-heading"><strong>How did you find Xojo? And when did you start using Xojo?</strong></h3>



<p>I used <a href="https://en.wikipedia.org/wiki/GFA_BASIC">GFA Basic</a> on Amiga and was looking for something similar for Apple Macintosh. Maybe started with REALbasic using v3.</p>



<h3 class="wp-block-heading"><strong>What did you first build with Xojo? And when was that?</strong></h3>



<p>My first job was importing foreign code from 4th Dimension into RealBasic. That started back in late 2000.</p>



<h3 class="wp-block-heading"><strong>What do you build with it now?</strong></h3>



<p>ERP System AWARD+ including merchandise management, webshop, document database, cash register system, ticketing and much more.</p>



<h3 class="wp-block-heading">Looking back, how long did it take for your app vision to evolve from a blank project into a working solution?</h3>



<p>We moved from 4th Dimension to Xojo and SQL (including own PlugIn for PrimeBase) in about two years for the whole big main ERP module. Other tools took much less time.</p>



<h3 class="wp-block-heading"><strong>What is something you worked on that you want to talk about?</strong></h3>



<p>As I mentioned it is of great help to have learned skills outside the world of IT. And don&#8217;t invent the wheel twice. Having tools like SIPs or ImageMagick i.e., there is no need to build up your own thumbnail generator.</p>



<h3 class="wp-block-heading"><strong>Do you earn a living with Xojo?</strong></h3>



<p>I earned my living for the past 25 years with Xojo. Not every day because I also helped as sysadmin. But my main occupation will soon end.</p>



<h3 class="wp-block-heading"><strong>Do you use it for any hobbies?</strong></h3>



<p>Writing small tools for Windows that I am used to having on my Mac and vice versa.</p>



<h3 class="wp-block-heading"><strong>What&#8217;s your biggest Xojo success?</strong></h3>



<p>Every new app or module finished should be the biggest success. This is what I call motivation. Most proud moment? I remember installing &#8220;my&#8221; software in a German State Long-Term Archive. Running it started all those tape robots. What a feeling&#8230;</p>



<h3 class="wp-block-heading">If you were introducing Xojo to a friend, which three words would you use to describe it?</h3>



<ul class="wp-block-list">
<li>Cross Platform</li>



<li>Easy to learn and use</li>



<li>Start for free</li>
</ul>



<p><em>Thank you to Carston Kobusch for answering questions and sharing his Xojo experience with the community.&nbsp;</em></p>



<p><em>If you have an app, a project or a person you want to see featured in Spotlight On,&nbsp;<a href="mailto:hello@xojo.com" target="_blank" rel="noreferrer noopener">tell us about it</a>!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Building an AI Pair Programmer for Xojo Developers</title>
		<link>https://blog.xojo.com/2026/03/09/building-an-ai-pair-programmer-for-xojo-developers/</link>
		
		<dc:creator><![CDATA[Garry Pettet]]></dc:creator>
		<pubDate>Mon, 09 Mar 2026 15:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Code Generation]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Zotto]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15902</guid>

					<description><![CDATA[If you&#8217;ve tried using ChatGPT, Claude, or Gemini for help with Xojo code, you&#8217;ve probably experienced the same frustration most of us have: the AI&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;ve tried using ChatGPT, Claude, or Gemini for help with Xojo code, you&#8217;ve probably experienced the same frustration most of us have: the AI doesn&#8217;t <em>know</em> your project. You end up copying and pasting classes, explaining your architecture, and then watching it hallucinate method or framework names that don&#8217;t exist. It works, sort of, but it&#8217;s clunky.</p>



<p>I wanted something better. Not a generic chatbot that happens to know some Xojo, but a tool that could actually <em>see</em> what I was working on. That&#8217;s why I built Zotto (with Xojo!).</p>



<h2 class="wp-block-heading">What Is Zotto?</h2>



<p>Zotto is a cross-platform macOS and Windows app that acts as an AI pair programmer specifically for Xojo developers. It connects directly to the Xojo IDE, reads the project you&#8217;re working on, and gives the AI real context about your code such as classes, method signatures, properties. Essentially the whole project&#8217;s structure.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="853" src="https://blog.xojo.com/wp-content/uploads/2026/03/appearance-1024x853.png" alt="" class="wp-image-15906" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/appearance-1024x853.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/appearance-300x250.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/appearance-768x640.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/appearance.png 1154w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">The Problem It Solves</h2>



<p>The core issue with using general-purpose AI tools for Xojo development is context. When you ask Claude or ChatGPT a question about your project, the AI has no idea what your codebase looks like. You become the middleman, manually feeding it snippets and hoping it has enough information to give useful advice.</p>



<p>Zotto removes some of that friction. When connected to the IDE, the AI can explore your project on its own using built-in tools:</p>



<ul class="wp-block-list">
<li><strong>ProjectOverview</strong> gives it the high-level folder structure</li>



<li><strong>ListItems</strong> lets it drill into specific folders</li>



<li><strong>GetSignatures</strong> shows method and property signatures without dumping all the code</li>



<li><strong>ReadCode</strong> pulls up full method implementations when needed</li>



<li><strong>SearchCode</strong> does grep-like pattern searches across the codebase</li>



<li><strong>SearchDocs</strong> lets it search and retrieve Xojo documentation directly</li>
</ul>



<p>These tools are designed to be token-efficient. Instead of dumping your entire project into the context window, the AI requests only what it needs, when it needs it. A <code>ProjectOverview</code> call might use 300-500 tokens. A <code>GetSignatures</code> call on a class gives the AI the API surface without the implementation details. This layered approach means even large projects work well within context limits.</p>



<h2 class="wp-block-heading">Read-Only by Design</h2>



<p>One decision I made early on was that Zotto would be read-only. It can read your code, analyse it, suggest changes, and generate snippets — but it cannot modify your project files, create new items, or execute IDE scripts.</p>



<p>This is intentional. I think AI-generated code should be reviewed by a developer before it goes into a project. Zotto gives you copy-pasteable suggestions and lets you decide what to implement. You stay in control.</p>



<h2 class="wp-block-heading">Bring Your Own Model</h2>



<p>Zotto isn&#8217;t locked to a single AI provider. It supports Claude, OpenAI, Gemini, Ollama, LM Studio, and any OpenAI-compatible API (which covers services like Grok and OpenRouter). If you&#8217;re privacy-conscious or working on sensitive code, you can run it entirely offline with a local model through Ollama or LM Studio. Your code never has to leave your machine.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="988" height="961" src="https://blog.xojo.com/wp-content/uploads/2026/03/provider-settings.png" alt="" class="wp-image-15909" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/provider-settings.png 988w, https://blog.xojo.com/wp-content/uploads/2026/03/provider-settings-300x292.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/provider-settings-768x747.png 768w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>



<p>This also means you&#8217;re not paying for Zotto&#8217;s AI usage — you use your own API keys or local models, so you&#8217;re in full control of costs.</p>



<h2 class="wp-block-heading">How It Works in Practice</h2>



<p>A typical workflow looks like this:</p>



<ol class="wp-block-list">
<li>Open your project in the Xojo IDE</li>



<li>Launch Zotto — it detects the IDE automatically</li>



<li>Select which open project to work with</li>



<li>Start chatting</li>
</ol>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="757" src="https://blog.xojo.com/wp-content/uploads/2026/03/chat-window-1024x757.png" alt="" class="wp-image-15908" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/chat-window-1024x757.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/chat-window-300x222.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/chat-window-768x568.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/chat-window.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>From there, you might ask the AI to review a class, suggest how to refactor a method, help you understand unfamiliar code in a project you&#8217;ve inherited, or brainstorm an approach to a new feature. Because the AI can explore the project itself, the conversation feels much more natural than the copy-paste dance with a generic chatbot.</p>



<p>For example, you could ask: &#8220;What does the <code>ProcessOrder</code> method in <code>OrderManager</code> do?&#8221; Instead of you having to find and paste the code, Zotto&#8217;s AI will call <code>ReadCode</code> to look at the method itself, then maybe <code>GetSignatures</code> on the parent class to understand the broader context, and give you a thorough explanation.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="853" src="https://blog.xojo.com/wp-content/uploads/2026/03/coding-settings-1024x853.png" alt="" class="wp-image-15910" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/coding-settings-1024x853.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/coding-settings-300x250.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/coding-settings-768x640.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/coding-settings.png 1154w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Extending with MCP</h2>



<p>For developers who want to go further, Zotto supports the Model Context Protocol (MCP). This lets you add custom tool servers — for file system access, Git operations, database queries, or anything else you might want the AI to have access to during a conversation. It&#8217;s the same protocol that Claude Desktop and other AI tools support, so existing MCP servers work out of the box.</p>



<h2 class="wp-block-heading">Built for the Community</h2>



<p>Zotto exists because I needed it for my own Xojo development. I was spending too much time being the translator between AI tools and my codebase. Once I had something working, it seemed like other Xojo developers would find it useful too.</p>



<p>There&#8217;s a free version you can try that includes full IDE integration and all the built-in tools with a single conversation. A full license is a one-time purchase of £69 — no subscription. You can learn more and download it at <a href="https://zotto.app" target="_blank" rel="noreferrer noopener">zotto.app</a>.</p>



<p>If you have questions or feedback, I&#8217;d love to hear from you on the <a href="https://forum.xojo.com/" target="_blank" rel="noreferrer noopener">forum</a>.</p>



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



<p><em>Garry Pettet is a Consultant Radiologist, Xojo developer and the creator of Zotto. You can find him on the Xojo <a href="https://forum.xojo.com/">forum</a> or at <a href="https://zotto.app" target="_blank" rel="noreferrer noopener">zotto.app</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Code Signing on macOS: What Developers Need to Know, Part 1</title>
		<link>https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 04 Mar 2026 16:00:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple Developer Account]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15856</guid>

					<description><![CDATA[Your macOS app is finished and ready to go. But unless you plan to run it only on your own machine, there’s one essential step&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Your macOS app is finished and ready to go. But unless you plan to run it only on your own machine, there’s one essential step before sharing it with others: code signing with certificates.</p>



<span id="more-15856"></span>



<p>This blog series provides a clear, practical overview of how certificates work, with a focus on signing and distributing macOS applications. Some concepts apply to digital certificates in general, while others are specific to the macOS code signing process. By the end of the series, you’ll understand what certificates are, why they matter, and the role they play when building and distributing a macOS app.</p>



<p>The Developer ID field in the Build Settings &gt; macOS &gt; Sign Inspector Panel is our starting point:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1000" height="574" src="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17.png" alt="" class="wp-image-15857" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17.png 1000w, https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17-300x172.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17-768x441.png 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>By default, this field is empty. When you click Build, the app bundle (and its contents) is signed using a more relaxed security configuration. This does not require an explicit developer certificate and does not verify that the app comes from a known, trusted developer.</p>



<p>This type of signing is called Ad-Hoc signing. It is perfectly fine when debugging from the IDE or when building apps you intend to run locally.</p>



<p>In earlier versions of macOS, it was even possible to distribute and run Ad-Hoc–signed apps on other Macs, as long as the user explicitly chose to trust them. While this is still technically possible on recent versions of macOS, Apple has continued to tighten security, making it increasingly difficult for users to launch Ad-Hoc–signed applications.</p>



<p>In most cases, <a href="https://support.apple.com/en-au/guide/security/sec5599b66df/web" target="_blank" rel="noreferrer noopener">Gatekeeper</a> will intervene and prevent the app from launching. Since the system cannot verify the identity of a trusted developer, it treats the app as unverified. With Ad-Hoc signing, macOS can only confirm that the app has not been modified since it was signed, it cannot validate who created it.</p>



<h2 class="wp-block-heading">Under the hood: How &#8220;Ad-Hoc&#8221; signing works</h2>



<p>Every time an app is signed (including all the contents inside its bundle) macOS uses Apple’s codesign tool. When Ad-Hoc signing is applied, the simplified process works roughly like this:<br></p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1390" height="812" src="https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works.png" alt="" class="wp-image-15858" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works.png 1390w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-300x175.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-1024x598.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-768x449.png 768w" sizes="auto, (max-width: 1390px) 100vw, 1390px" /></figure>



<ul class="wp-block-list">
<li>A hash value (a unique digital fingerprint) is calculated for every file in the app bundle, whether it is executable or not, as well as for the bundle itself.</li>



<li>These hash values are stored inside the app bundle, in the <code>_CodeSignature</code> folder.</li>



<li>If the app contains multiple architectures (for example, x86 and ARM), the process is repeated for each supported architecture.</li>
</ul>



<p>When a user double-clicks the app to launch it, macOS performs a similar verification process:</p>



<ul class="wp-block-list">
<li>It recalculates the hash value for every file in the bundle.</li>



<li>It compares the newly calculated values with those stored in the <code>_CodeSignature</code> folder and if any hash differs from the stored value, macOS determines that the bundle has been modified since it was signed and it will refuse to launch the app.</li>
</ul>



<p>Want to see this in action? Create a new Desktop project in the Xojo IDE, save it to your Documents folder, and build it for macOS.</p>



<p>Next, locate the built app in Finder. Control-click it and choose “Show Package Contents.” Then open the Contents &gt; _CodeSignature folder and inspect the CodeResources file using your favorite text editor. You’ll see a list of hash values and digests corresponding to every file in the app bundle.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1248" height="1344" src="https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile.png" alt="" class="wp-image-15859" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile.png 1248w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-279x300.png 279w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-951x1024.png 951w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-768x827.png 768w" sizes="auto, (max-width: 1248px) 100vw, 1248px" /></figure>



<h2 class="wp-block-heading">Apple Developer Certificates: Establishing Trust on macOS</h2>



<p>What must you do so your apps are recognized as first-class citizens on macOS and can be distributed without Gatekeeper intervening? The answer is likely familiar: enroll in the Apple Developer Program (currently US $99 per year).</p>



<p>Among its many benefits, membership in the Apple Developer Program allows you to create your own Developer ID certificates. When you use these certificates to sign your apps, macOS can validate the signature and identify you as the verified developer distributing the software.</p>



<p>But how is this trust established and verified? To answer that, we need to start at the very root, literally!</p>



<p>Every computer, smartphone, tablet, and many other devices come with preinstalled Root Certificates. These certificates are issued by trusted organizations known as Root Certificate Authorities (CAs), including Apple. They serve as the foundation of a chain of trust, allowing other certificates issued by those authorities to be verified.</p>



<p>Technically speaking, a Root Certificate Authority (CA) is the top-level trusted entity in a public key infrastructure (<a href="https://en.wikipedia.org/wiki/Public_key_infrastructure">PKI</a>). It issues self-signed root certificates that act as the trust anchor for verifying other digital certificates. In other words, it is the foundation upon which the entire certificate trust model is built.</p>



<p>It is easy to take a look to these installed on your Mac:</p>



<ol class="wp-block-list">
<li>Open Keychain Access.</li>



<li>Select Certificates at the top of the window.</li>



<li>In the sidebar, choose System Roots.</li>



<li>You will then see the complete list of root certificates trusted by macOS.</li>
</ol>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2186" height="1264" src="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates.png" alt="" class="wp-image-15860" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates.png 2186w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-300x173.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-1024x592.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-768x444.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-1536x888.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-2048x1184.png 2048w" sizes="auto, (max-width: 2186px) 100vw, 2186px" /></figure>



<p>You’ll notice that there are three different Apple Root CA certificates. Why?</p>



<p>Each <a href="https://en.wikipedia.org/wiki/X.509" target="_blank" rel="noreferrer noopener">X.509</a> certificate contains detailed metadata defining its cryptographic properties and permitted usage. This includes the key type (such as <a href="https://en.wikipedia.org/wiki/RSA_cryptosystem" target="_blank" rel="noreferrer noopener">RSA</a> or <a href="https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm" target="_blank" rel="noreferrer noopener">ECDSA</a>), the public key length, and the signature algorithm used.</p>



<ul class="wp-block-list">
<li><strong>Apple Root CA</strong>: Is a RSA type, with a public key length of 2048 bits that uses the SHA-1 algorithm.</li>



<li><strong>Apple Root CA-G2</strong>: Is a RSA type, with a public key length of 4096 bits that uses the SHA-384 algorithm.</li>



<li><strong>Apple Root CA-G3</strong>: Is a ECDSA type, with a public key length of 384 bits that uses the SHA-384 algorithm.</li>
</ul>



<h2 class="wp-block-heading">Intermediate Certificates and the Chain of Trust</h2>



<p>Root certificates are highly valuable and sensitive, so they are rarely used directly to sign end-user certificates (also called “Leaf” certificates). In the case of macOS app development, the developer’s certificate is the Leaf. This is where Intermediate Certificates come into play.</p>



<p>In simple terms, Intermediate Certificates are signed by Root Certificates and, in turn, are used to sign Leaf certificates. This protects the Root certificate from direct exposure. Together, the Root, Intermediate, and Leaf certificates form what is called the “Chain of Trust.”</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1254" height="932" src="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span.png" alt="" class="wp-image-15861" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span.png 1254w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-300x223.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-1024x761.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-768x571.png 768w" sizes="auto, (max-width: 1254px) 100vw, 1254px" /></figure>



<p>The Chain of Trust verification starts with the Leaf certificate and works upward through the Intermediate to the Root. This same process occurs whenever you visit a secure website, make an online payment, or transmit sensitive data securely.</p>



<p>For example, the Leaf certificate is validated against its Intermediate certificate. If the Intermediate certificate is missing or expired, the Leaf certificate is considered invalid. Similarly, the Intermediate certificate itself must be validated against the Root certificate. If the Root certificate is missing or expired, the Intermediate is invalid, and all Leaf certificates signed by it are also invalid.</p>



<p>The same process happens when you sign your macOS apps: macOS validates the entire certificate chain before allowing the app to run.</p>



<p>Finally, certificates closer to the Root generally have longer validity periods. Leaf certificates must be renewed more frequently, while Root certificates are valid for many years.</p>



<h2 class="wp-block-heading">Wrapping up</h2>



<p>In this first article, we covered the fundamentals of digital certificates and their role in macOS app security. In the next article, we will focus specifically on Apple Developer certificates and how they enable trusted app distribution.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Optimizing Xojo Code, Part 5: Threads and UserInterfaceUpdate</title>
		<link>https://blog.xojo.com/2026/03/02/optimizing-xojo-code-part-5-threads-and-userinterfaceupdate/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Mon, 02 Mar 2026 23:43:13 +0000</pubDate>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Multithreaded Applications]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Threads]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15847</guid>

					<description><![CDATA[In&#160;Part 1, we learned why tight loops with&#160;DoEvents&#160;freeze your UI.&#160;Part 2&#160;showed us Timer controls.&#160;Part 3&#160;moved timers into code.&#160;Part 4&#160;simplified scheduling with&#160;CallLater. But timers have a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In&nbsp;<a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/">Part 1</a>, we learned why tight loops with&nbsp;<code>DoEvents</code>&nbsp;freeze your UI.&nbsp;<a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/">Part 2</a>&nbsp;showed us Timer controls.&nbsp;<a href="https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/">Part 3</a>&nbsp;moved timers into code.&nbsp;<a href="https://blog.xojo.com/2026/02/02/optimizing-xojo-code-part-4-timer-calllater/">Part 4</a>&nbsp;simplified scheduling with&nbsp;<code>CallLater</code>.</p>



<p>But timers have a limit: they still run on the UI thread. If your background work is genuinely heavy (database queries, file I/O, complex calculations), a timer won&#8217;t save you. You need actual background processing and that&#8217;s where threads come in.</p>



<h2 class="wp-block-heading" id="the-core-idea-threads">The Core Idea: Threads</h2>



<p>A thread is a separate execution path that runs outside the UI thread. While your thread does the heavy lifting, the UI stays responsive to clicks, typing, scrolling. When your thread finishes a chunk of work, it notifies the UI thread via&nbsp;<code>UserInterfaceUpdate</code>, and only that callback runs on the main thread.</p>



<p>The rule is simple: threads cannot touch UI controls directly. If you try, you get a crash.&nbsp;<code>UserInterfaceUpdate</code>&nbsp;is your bridge.</p>



<p>For a deeper dive into how Xojo&#8217;s threading model works under the hood, including cooperative vs. preemptive threading, see&nbsp;<a href="https://blog.xojo.com/2024/10/01/cooperative-to-preemptive-weaving-new-threads-into-your-apps/" target="_blank" rel="noreferrer noopener">Cooperative to Preemptive: Weaving New Threads Into Your Apps</a>.</p>



<h2 class="wp-block-heading" id="looking-at-the-code">Let&#8217;s Code</h2>



<p><strong>Prerequisites:</strong>&nbsp;Add a&nbsp;<code>StatusLabel</code>&nbsp;(DesktopLabel), a&nbsp;<code>DesktopButton</code>, and a&nbsp;<code>Thread</code>&nbsp;control. Also define:</p>



<pre class="wp-block-code"><code>kCountTo As Integer = 100</code></pre>



<h3 class="wp-block-heading" id="the-thread-control">The Thread Control</h3>



<p>Drag a&nbsp;<code>Thread</code>&nbsp;from the library into your window and name it&nbsp;<code>BackgroundWorker</code>.</p>



<h3 class="wp-block-heading" id="the-button-start-the-thread">The Button (Start the Thread)</h3>



<p>Place this in the&nbsp;<code>Pressed</code>&nbsp;event of a button:</p>



<pre class="wp-block-code"><code>Sub Pressed()
  If BackgroundWorker.ThreadState = Thread.ThreadStates.NotRunning Then
    BackgroundWorker.Start
  End If
End Sub</code></pre>



<p>This checks if the thread is already running. If not, start it. This prevents multiple threads from piling up if someone clicks fast.</p>



<h3 class="wp-block-heading" id="the-run-method-background-work">The Thread.Run Method (Background Work)</h3>



<p>Implement the&nbsp;<code>Run</code>&nbsp;method on your Thread:</p>



<pre class="wp-block-code"><code>Sub Run()
  For i As Integer = 0 To kCountTo
    
    ' Do background work here. No UI access allowed.
    ' It can be: database query, file read, API call, pretty much anything that might block "freeze" the UI of the app
    
    ' Prepare a Dictionary payload for the UI
    Var info As New Dictionary
    info.Value("progress") = i
    info.Value("message") = "working"
    Me.AddUserInterfaceUpdate(info)
    
    ' Sleep (optional)
    Thread.SleepCurrent(10)   // Sleep 10 ms
  Next
End Sub</code></pre>



<p>The key line is&nbsp;<code>Me.AddUserInterfaceUpdate(info)</code>. This queues data for the UI thread to process. Each call adds one item to a queue, and the UI thread drains it in&nbsp;<code>UserInterfaceUpdate</code>.</p>



<h3 class="wp-block-heading" id="the-userinterfaceupdate-method-ui-sync">The Thread.UserInterfaceUpdate Method (UI Sync)</h3>



<p>Implement this event to handle updates from the thread:</p>



<pre class="wp-block-code"><code>Sub UserInterfaceUpdate(data() As Dictionary)
  ' Runs on the main UI thread. Safe to update controls here.
  
  ' Guard against empty or malformed data
  If data = Nil Or data.Count &lt; 0 Then Return
  
  Var d As Dictionary = data(0)
  
  ' Extract the progress value safely
  Var progress As Integer = 0
  If d.HasKey("progress") Then
    progress = d.Value("progress").IntegerValue
  End If
  
  ' Update the UI
  StatusLabel.Text = progress.ToString
  
  ' Mark completion when we hit the target
  If progress &gt;= kCountTo Then
    StatusLabel.Text = "done"
  End If
End Sub</code></pre>



<p><strong>Important notes:</strong></p>



<ul class="wp-block-list">
<li><code>data()</code>&nbsp;is an array of Dictionaries.</li>



<li>Always check&nbsp;<code>HasKey</code>&nbsp;before accessing a value to avoid runtime errors.</li>



<li>Use&nbsp;<code>.IntegerValue</code>&nbsp;(or&nbsp;<code>.StringValue</code>, etc.) to safely extract values.</li>



<li>This runs on the UI thread, so it is safe to update&nbsp;<code>StatusLabel</code>&nbsp;and any other visual controls.</li>
</ul>



<h2 class="wp-block-heading" id="how-it-works">How It Works</h2>



<ol class="wp-block-list">
<li><strong>Button press:</strong>&nbsp;Click the button and the thread starts.</li>



<li><strong>Background loop:</strong>&nbsp;The thread iterates from 0 to&nbsp;<code>kCountTo</code>, sleeping 10 ms each step. After each step, it queues an update.</li>



<li><strong>Responsiveness:</strong>&nbsp;While the thread works, you can still interact with the rest of your application. No freezing.</li>
</ol>



<h2 class="wp-block-heading" id="a-note-on-thread-safety">A Note on Thread Safety</h2>



<p>Threads are powerful but risky if misused. Here is the boundary:</p>



<ul class="wp-block-list">
<li><strong>Safe in Run():</strong>&nbsp;Anything that doesn&#8217;t touch UI controls. File I/O, database queries, calculations, network calls.</li>



<li><strong>Unsafe in Run():</strong>&nbsp;Reading or writing UI control properties directly.&nbsp;<code>StatusLabel.Text = ...</code>&nbsp;is a no no!</li>



<li><strong>Safe in UserInterfaceUpdate():</strong>&nbsp;All UI control access. This runs on the main thread.</li>
</ul>



<p>If you forget this rule and try to update a label from inside&nbsp;<code>Run()</code>, your app will crash with a <a href="https://documentation.xojo.com/api/language/runtime.html#runtime">ThreadAccessingUIException</a>. Instead pass data through&nbsp;<code>AddUserInterfaceUpdate</code>.</p>



<h2 class="wp-block-heading" id="when-to-use-threads-vs-timers">When to Use Threads vs. Timers</h2>



<p>Use timers for:</p>



<ul class="wp-block-list">
<li>Short, frequent tasks (10-50 ms ticks).</li>



<li>Simple progress updates.</li>



<li>Cases where you are just deferring work a bit.</li>
</ul>



<p>Use threads for:</p>



<ul class="wp-block-list">
<li>Long-running operations (seconds, minutes, hours).</li>



<li>Genuinely blocking work (I/O, network, heavy calculations).</li>



<li>Multiple independent background tasks.</li>
</ul>



<p>In this series, we moved from blocking the UI to using timers on the UI thread, then to actual background threads. Each approach solves a different problem.</p>



<h2 class="wp-block-heading" id="wrapping-up">Wrapping Up</h2>



<p>Threads are the heavy artillery of responsive design. They run independent of the UI and communicate safely via&nbsp;<code>UserInterfaceUpdate</code>. Once you grasp the boundary between thread code and UI code, you can build applications that never freeze, no matter how much work is happening behind the scenes.</p>



<p>See the&nbsp;<a href="https://documentation.xojo.com/api/language/threading/thread.html">Thread documentation</a>&nbsp;for more details on priority, stack size, and advanced patterns.</p>



<p>Until then, happy threading!</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Optimizing Code Series:</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 1: Getting Started</a></li>



<li><a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 2: Using a Timer to Keep the UI Responsive</a></li>



<li><a href="https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 3: Programmatic Timers and AddHandler</a></li>



<li><a href="https://blog.xojo.com/2026/02/02/optimizing-xojo-code-part-4-timer-calllater/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 4: Timer.CallLater</a></li>



<li><a href="https://blog.xojo.com/2026/03/02/optimizing-xojo-code-part-5-threads-and-userinterfaceupdate/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 5: Threads and UserInterfaceUpdate</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Scatter Chart: Connecting the Points</title>
		<link>https://blog.xojo.com/2026/02/09/scatter-chart-connecting-the-points/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Mon, 09 Feb 2026 16:26:56 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Charts]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15826</guid>

					<description><![CDATA[A user recently asked whether it’s possible to connect the (x, y) points in a Scatter chart using DesktopChart, and if so, how to do&#8230;]]></description>
										<content:encoded><![CDATA[
<p>A user recently asked whether it’s possible to connect the (x, y) points in a Scatter chart using DesktopChart, and if so, how to do it. The short answer is yes, it is possible. Read on and I’ll show you just how easy it is.</p>



<span id="more-15826"></span>



<p>For this example, we’ll use the x and y coordinate values of the sine and cosine functions as the data for our scatter DataSets. Go ahead and create a new Desktop project in the Xojo IDE.</p>



<p>Next, select the default Window1 and drag a DesktopChart control from the Library panel into the Layout Editor for Window1. Adjust the right margin to the recommended right layout guide, then lock the Top, Left, and Right layout locks for the Chart1 instance using the Inspector. At this point, your design should look similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2560" height="1800" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-scaled.png" alt="" class="wp-image-15827" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-scaled.png 2560w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-300x211.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-1024x720.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-768x540.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-1536x1080.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart1-2048x1440.png 2048w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>While you’re there, select Chart1 and, in the Inspector, set the option Behavior &gt; Mode to Scatter.</p>



<p>Next, with Window1 selected, add two properties using the following values:</p>



<p><strong>Property 1:</strong></p>



<ul class="wp-block-list">
<li><strong>Name:</strong> CosStyle</li>



<li><strong>Type:</strong> ChartLinearStyle</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p><strong>Property 2</strong></p>



<ul class="wp-block-list">
<li><strong>Name:</strong> SineStyle</li>



<li><strong>Type:</strong> ChartLinearStyle</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p>These properties will be used to store references to the Style objects associated with the cosine and sine function DataSets.</p>



<p>Finally, with Window1 still selected, add the Opening event and enter the following lines of code into the associated code editor:</p>



<pre class="wp-block-preformatted">CosStyle = New ChartLinearStyle<br>CosStyle.Line = ChartLinearStyle.LineTypes.Dashed<br><br>SineStyle = New ChartLinearStyle<br>SineStyle.Line = ChartLinearStyle.LineTypes.Solid<br><br>DrawScatterChart</pre>



<p>In brief, this code creates new ChartLinearStyle instances for the properties added earlier. It assigns a solid line style to connect the cosine function data points and a dashed line style to connect the sine function data points. After that, it calls the DrawScatterChart method, which is responsible for rendering the sine and cosine functions on the Chart1 instance.</p>



<p>Now, let’s create that method on Window1 using the following values in the Inspector:</p>



<ul class="wp-block-list">
<li><strong>Name:</strong> DrawScatterChart</li>



<li><strong>Scope:</strong> Private</li>
</ul>



<p>Type the following snippet of code in the associated Code Editor for the method:</p>



<pre class="wp-block-code"><code>// These are the Array variables in charge of storing the Scatter data points
// for the Sine and Cosine functions
Var sinePoints() As ChartScatterDatapoint
Var cosinePoints() As ChartScatterDatapoint

// …and these variables will handle the DataSet instances
// for the previous arrays of data points on both functions
Var sineDataSet As ChartScatterDataset
var cosDataSet As ChartScatterDataset

Const pi = 3.14159265359
Var y As Double
Var maxXValue As Double = 2.0 * pi

// Using a simple loop to feed the x and y
// values for the Sine and Cosine
For x As Double = 0.0 To maxXValue Step 0.5
  
  y = Sin(x)
  sinePoints.Add(New ChartScatterDatapoint(x, y, 1))
  
  y = Cos(x)
  cosinePoints.Add(new ChartScatterDatapoint(x, y, 1))
  
Next

// Next, we create the new instances for the Scatter DataSets
sineDataSet = New ChartScatterDataset(Color.Blue, sinePoints)
cosDataSet = New ChartScatterDataset(color.Red, cosinePoints)

// …and we set the Style to be used on each of them
sineDataSet.Style = SineStyle
cosDataSet.Style = CosStyle

// … and of course the labels to be shown on the Legend section
// of the chart itself
sineDataSet.Label = "Sine Function"
cosDataSet.Label = "Cos Function"

// As the last step, we add both DataSets to the chart
// so these can be rendered
Chart1.AddDatasets(sineDataSet, cosDataSet)</code></pre>



<p>Run the app, and it should look similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1424" height="1088" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart2.png" alt="" class="wp-image-15828" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart2.png 1424w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-300x229.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-1024x782.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart2-768x587.png 768w" sizes="auto, (max-width: 1424px) 100vw, 1424px" /></figure>



<h2 class="wp-block-heading">A change of Style… on the fly!</h2>



<p>As with many aspects of DesktopChart, any changes made at runtime are reflected immediately, without the need to redraw the chart, re-feed the data sets, or perform any other complex operations. Let’s take advantage of this by changing the sine and cosine styles at runtime, allowing users of our example app to toggle whether the points are connected.</p>



<p>Add two DesktopCheckBox controls below the bottom margin of the Chart1 instance on Window1. Set the Caption of the first checkbox to “Connect Sine Points” and the second to “Connect Cos Points.” For both checkboxes, use the Inspector to set Initial State &gt; Visual State to Checked.</p>



<p>The final layout should look similar to this:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1292" height="954" src="https://blog.xojo.com/wp-content/uploads/2026/02/Chart3.png" alt="" class="wp-image-15829" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Chart3.png 1292w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-300x222.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-1024x756.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Chart3-768x567.png 768w" sizes="auto, (max-width: 1292px) 100vw, 1292px" /></figure>



<p>Lastly, add the ValueChanged event to both CheckBox instances. Then, for the checkbox with the caption “Connect Sine Points,” add the following lines of code to its event handler:</p>



<pre class="wp-block-code"><code>If Me.Value Then
  SineStyle.Line = ChartLinearStyle.LineTypes.Dashed
Else
  SineStyle.Line = ChartLinearStyle.LineTypes.None
End If</code></pre>



<p>Add the following lines of code to the ValueChanged event handler for the checkbox with the caption “Connect Cos Points”:</p>



<pre class="wp-block-code"><code>If Me.Value Then
  CosStyle.Line = ChartLinearStyle.LineTypes.Solid
Else
  CosStyle.Line = ChartLinearStyle.LineTypes.None
End If</code></pre>



<p>Run the app again and, this time, click each checkbox to see how the points are no longer connected when a checkbox is unchecked, and are connected when it is selected.</p>



<figure class="wp-block-video"><video controls src="https://blog.xojo.com/wp-content/uploads/2026/02/Grabacion-de-pantalla-2026-02-02-a-las-13.53.35.mp4"></video></figure>



<h2 class="wp-block-heading">Summary</h2>



<p>As you can see, styles can be used not only to connect points in a Scatter chart, but also to customize the point endpoints beyond the default appearance. For example, you can set the endpoint to “None” or choose from many other available options. Even better, any changes made to a style at runtime are applied immediately.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2026/02/Grabacion-de-pantalla-2026-02-02-a-las-13.53.35.mp4" length="171622" type="video/mp4" />

			</item>
		<item>
		<title>Optimizing Xojo Code, Part 4: Timer.CallLater</title>
		<link>https://blog.xojo.com/2026/02/02/optimizing-xojo-code-part-4-timer-calllater/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Mon, 02 Feb 2026 21:25:28 +0000</pubDate>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CallLater]]></category>
		<category><![CDATA[CancelCallLater]]></category>
		<category><![CDATA[Developer Challenge]]></category>
		<category><![CDATA[Timers]]></category>
		<category><![CDATA[UI Responsiveness]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15786</guid>

					<description><![CDATA[In&#160;Part 1&#160;of this series, we looked at a common but discouraged approach using a tight loop with&#160;DoEvents&#160;to keep the UI from freezing. In&#160;Part 2, we&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In&nbsp;<a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/">Part 1</a>&nbsp;of this series, we looked at a common but discouraged approach using a tight loop with&nbsp;<code>DoEvents</code>&nbsp;to keep the UI from freezing. In&nbsp;<a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/">Part 2</a>, we explored a better alternative by replacing that loop with a Timer control dragged onto a Window. In&nbsp;<a href="https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/">Part 3</a>, we advanced to creating Timers programmatically with&nbsp;<code>AddHandler</code>&nbsp;for use in classes and modules.</p>



<p>Now, for even simpler one-off or chained delayed tasks, Xojo offers&nbsp;<code>Timer.CallLater</code>: no Timer instance required.</p>



<h2 class="wp-block-heading" id="the-strategy-timercalllater">The Strategy: Timer.CallLater</h2>



<p><code>Timer.CallLater(milliseconds, AddressOf MethodName, arg As Variant)</code>&nbsp;schedules your method to run after the specified delay on the main UI thread. Pass data via the Variant parameter. To chain calls (like our countdown), re-call it from within the method. Use&nbsp;<code>Timer.CancelCallLater(AddressOf MethodName)</code>&nbsp;to abort pending calls.</p>



<p>For full details, see the&nbsp;<a href="https://documentation.xojo.com/api/language/timer.html" target="_blank" rel="noreferrer noopener">Timer documentation</a>.</p>



<h2 class="wp-block-heading" id="looking-at-the-code">Looking at the Code</h2>



<p>Prerequisites: Add a <code>StatusLabel</code> (DesktopLabel control) and a constant <code>kCountTo As Integer = 20000</code>.</p>



<p>Let&#8217;s look at how we implement this.</p>



<h3 class="wp-block-heading" id="the-setup-button-pressed">The Setup (Button Pressed)</h3>



<p>Place the following code in the&nbsp;<code>Pressed</code>&nbsp;event handler of a button control:</p>



<pre class="wp-block-code"><code>Sub Pressed()
  Timer.CancelCallLater(AddressOf UpdateProgress)
  
  StatusLabel.Text = "0"
  
  Timer.CallLater(100, AddressOf UpdateProgress, 100)
End Sub</code></pre>



<h3 class="wp-block-heading" id="the-handler-recursive-chain">The Handler (Recursive Chain)</h3>



<p>Create the following method that handles the recursive chain of delayed updates:</p>



<pre class="wp-block-code"><code>Sub UpdateProgress(elapsedMs As Variant)
  Var elapsed As Integer = elapsedMs.IntegerValue
  
  If elapsed &gt;= kCountTo Then

    StatusLabel.Text = "done"

  Else

    StatusLabel.Text = elapsed.ToString
    Timer.CallLater(100, AddressOf UpdateProgress, elapsed + 100)

  End If
End Sub</code></pre>



<p><strong>Crucial Note:</strong>&nbsp;The handler method must accept a&nbsp;<code>Variant</code>&nbsp;parameter to receive the argument passed to&nbsp;<code>CallLater</code>. Always use type-safe extraction like&nbsp;<code>.IntegerValue</code>.</p>



<h2 class="wp-block-heading" id="how-it-works">How It Works</h2>



<ol class="wp-block-list">
<li>Initial Schedule: The button cancels any pending calls and schedules the first <code>UpdateProgress</code> after 100ms, passing <code>100</code> as the elapsed time (just in case we like pressing a button multiple times quickly).</li>



<li>Recursion: Each call updates the UI and, if not finished, schedules the next one 100ms in the future with incremented elapsed time.</li>



<li>Automatic Management: No Timer properties or handlers to manage; Xojo handles scheduling and cleanup.</li>



<li>Cancellation: Ensures only one chain runs at a time.</li>
</ol>



<h2 class="wp-block-heading" id="wrapping-up">Wrapping Up</h2>



<p><code>Timer.CallLater</code>&nbsp;shines for delayed UI updates or chained tasks without the overhead of Timer objects. It&#8217;s concise, safe, and powerful for responsive apps.</p>



<p>In Part 5, we&#8217;ll tackle true background processing with&nbsp;<code>Threads</code>&nbsp;and&nbsp;<code>UserInterfaceUpdate</code>.</p>



<p>Until then, happy coding!</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Optimizing Code Series:</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 1: Getting Started</a></li>



<li><a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 2: Using a Timer to Keep the UI Responsive</a></li>



<li><a href="https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 3: Programmatic Timers and AddHandler</a></li>



<li><a href="https://blog.xojo.com/2026/02/02/optimizing-xojo-code-part-4-timer-calllater/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 4: Timer.CallLater</a></li>



<li><a href="https://blog.xojo.com/2026/03/02/optimizing-xojo-code-part-5-threads-and-userinterfaceupdate/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 5: Threads and UserInterfaceUpdate</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo + XAML + Goto = &#x1f525;</title>
		<link>https://blog.xojo.com/2026/01/22/xojo-xaml-goto/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Thu, 22 Jan 2026 20:50:59 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[DesktopXAMLContainer]]></category>
		<category><![CDATA[XAML]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15790</guid>

					<description><![CDATA[For decades, Goto has been treated as a programming faux pas—something to avoid at all costs. Like most rules though, there are exceptions. The Goto&#8230;]]></description>
										<content:encoded><![CDATA[
<p>For decades, Goto has been treated as a programming faux pas—something to avoid at all costs. Like most rules though, there are exceptions. The Goto I’m talking about here is one of them… and it can quite literally light your app on fire—programmatically speaking.</p>



<p>One of the hidden gems in <a href="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Xojo 2025r3</a> is support for XAML transitions, which makes it possible to add lightweight animations to your UI without writing any custom animation code in Xojo. Instead, you define visual states in XAML and let the XAML engine handle the animation for you.</p>



<p>At a high level, the workflow looks like this:</p>



<ol class="wp-block-list">
<li>Define one or more&nbsp;<strong>VisualStates</strong>&nbsp;in XAML.</li>



<li>Attach transitions to those states (for example, moving or fading an element).</li>



<li>From Xojo code, switch between states using&nbsp;<code>Invoke("GotoState", ...)</code>.</li>
</ol>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" />&nbsp;<strong>Pro Tip</strong><br><code>DesktopXAMLContainer</code>&nbsp;subscribes to&nbsp;<code>Operator_Lookup</code>, so you don’t have to call&nbsp;<code>Invoke</code>&nbsp;directly. Instead of writing<code> XAMLContainer1.Invoke("GotoState", "WhichState")</code>, you can simply call <code>XAMLContainer1.GotoState("WhichState")</code>.</p>



<h3 class="wp-block-heading">Visual States in XAML</h3>



<p>A&nbsp;<em>VisualState</em>&nbsp;represents a named configuration of UI properties. When you transition from one state to another, XAML can automatically animate the change.</p>



<p>Below is a simple example that animates a fire emoji <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> moving upward, similar to a candle flame flickering or burning upward.</p>



<h3 class="wp-block-heading">Example XAML</h3>



<p>This example uses a&nbsp;<code>TextBlock</code>&nbsp;to display the fire emoji and animates its vertical position with a&nbsp;<code>TranslateTransform</code>. Note that visual states must be defined on a control, so we attach them to a&nbsp;<code>UserControl</code>, allowing it to participate in&nbsp;<code>GotoState</code>&nbsp;transitions.</p>



<pre class="wp-block-preformatted">&lt;UserControl&gt;<br>  &lt;Grid&gt;<br>    &lt;VisualStateManager.VisualStateGroups&gt;<br>      &lt;VisualStateGroup Name="FlameStates"&gt;<br><br>        &lt;VisualState Name="Bottom"&gt;<br>          &lt;Storyboard&gt;<br>            &lt;DoubleAnimation<br>              Storyboard.TargetName="FlameTransform"<br>              Storyboard.TargetProperty="Y"<br>              To="40"<br>              Duration="0:0:1" /&gt;<br>          &lt;/Storyboard&gt;<br>        &lt;/VisualState&gt;<br><br>        &lt;VisualState Name="Top"&gt;<br>          &lt;Storyboard&gt;<br>            &lt;DoubleAnimation<br>              Storyboard.TargetName="FlameTransform"<br>              Storyboard.TargetProperty="Y"<br>              To="-100"<br>              Duration="0:0:1" /&gt;<br>          &lt;/Storyboard&gt;<br>        &lt;/VisualState&gt;<br><br>      &lt;/VisualStateGroup&gt;<br>    &lt;/VisualStateManager.VisualStateGroups&gt;<br><br>    &lt;TextBlock<br>      Text="<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" />"<br>      FontSize="32"<br>      HorizontalAlignment="Center"<br>      VerticalAlignment="Bottom"&gt;<br><br>      &lt;TextBlock.RenderTransform&gt;<br>        &lt;TranslateTransform Name="FlameTransform" /&gt;<br>      &lt;/TextBlock.RenderTransform&gt;<br><br>    &lt;/TextBlock&gt;<br>  &lt;/Grid&gt;<br>&lt;/UserControl&gt;</pre>



<p>In this XAML:</p>



<ul class="wp-block-list">
<li>The&nbsp;<code>VisualStateGroup</code>&nbsp;named&nbsp;<strong>FlameStates</strong>&nbsp;contains two states:
<ul class="wp-block-list">
<li><strong>Bottom</strong>&nbsp;– moves the emoji downward.</li>



<li><strong>Top</strong>&nbsp;– moves the emoji upward.</li>
</ul>
</li>



<li>The&nbsp;<code>DoubleAnimation</code>&nbsp;targets the&nbsp;<code>Y</code>&nbsp;property of a&nbsp;<code>TranslateTransform</code>.</li>



<li>The transition duration is handled entirely by XAML.</li>
</ul>



<h3 class="wp-block-heading">Triggering the Transition from Xojo</h3>



<p>Once the visual states are defined, switching between them from Xojo is straightforward. Assuming this XAML is hosted in a&nbsp;<code>XAMLContainer</code>&nbsp;named&nbsp;<code>XAMLContainer1</code>, you can trigger the animation like this:</p>



<pre class="wp-block-code"><code>XAMLContainer1.GotoState("Top")</code></pre>



<p>And to move it back down:</p>



<pre class="wp-block-code"><code>XAMLContainer1.GotoState("Bottom")</code></pre>



<h3 class="wp-block-heading">Why This Is Powerful</h3>



<p>What makes this feature especially useful is that:</p>



<ul class="wp-block-list">
<li>The animation logic stays in XAML, where it naturally belongs.</li>



<li>Xojo code remains clean and declarative—just tell the UI&nbsp;<em>which state</em>&nbsp;to go to.</li>



<li>More complex effects (opacity, scaling, rotation, easing functions) can be added without changing any Xojo code.</li>
</ul>



<p>Here&#8217;s a more interesting variation, where the flames drift upward rather than moving in a straight line:</p>



<pre class="wp-block-code"><code>&lt;UserControl&gt;
  &lt;Grid Width="160" Height="240"&gt;

    &lt;!-- Fire emoji 1 --&gt;
    &lt;TextBlock Name="Fire1"
           Text="&#x1f525;"
           FontSize="32"
           VerticalAlignment="Bottom"
           HorizontalAlignment="Center"&gt;
      &lt;TextBlock.RenderTransform&gt;
        &lt;TranslateTransform Name="Move1"/&gt;
      &lt;/TextBlock.RenderTransform&gt;
    &lt;/TextBlock&gt;

    &lt;!-- Fire emoji 2 --&gt;
    &lt;TextBlock Name="Fire2"
           Text="&#x1f525;"
           FontSize="26"
           VerticalAlignment="Bottom"
           HorizontalAlignment="Center"
           Margin="20,0,0,0"
           Opacity="0.8"&gt;
      &lt;TextBlock.RenderTransform&gt;
        &lt;TranslateTransform Name="Move2"/&gt;
      &lt;/TextBlock.RenderTransform&gt;
    &lt;/TextBlock&gt;

    &lt;!-- Fire emoji 3 --&gt;
    &lt;TextBlock Name="Fire3"
           Text="&#x1f525;"
           FontSize="22"
           VerticalAlignment="Bottom"
           HorizontalAlignment="Center"
           Margin="-20,0,0,0"
           Opacity="0.7"&gt;
      &lt;TextBlock.RenderTransform&gt;
        &lt;TranslateTransform Name="Move3"/&gt;
      &lt;/TextBlock.RenderTransform&gt;
    &lt;/TextBlock&gt;

    &lt;VisualStateManager.VisualStateGroups&gt;
      &lt;VisualStateGroup Name="FireStates"&gt;

        &lt;VisualState Name="Off"/&gt;

        &lt;VisualState Name="On"&gt;
          &lt;Storyboard RepeatBehavior="Forever"&gt;

            &lt;!-- Fire 1 --&gt;
            &lt;DoubleAnimation Storyboard.TargetName="Move1"
                     Storyboard.TargetProperty="Y"
                     From="0"
                     To="-180"
                     Duration="0:0:1.2"/&gt;

            &lt;DoubleAnimation Storyboard.TargetName="Move1"
                     Storyboard.TargetProperty="X"
                     From="0"
                     To="10"
                     Duration="0:0:0.6"
                     AutoReverse="True"/&gt;

            &lt;!-- Fire 2 --&gt;
            &lt;DoubleAnimation Storyboard.TargetName="Move2"
                     Storyboard.TargetProperty="Y"
                     From="0"
                     To="-160"
                     Duration="0:0:1.0"
                     BeginTime="0:0:0.3"/&gt;

            &lt;DoubleAnimation Storyboard.TargetName="Move2"
                     Storyboard.TargetProperty="X"
                     From="0"
                     To="-12"
                     Duration="0:0:0.5"
                     AutoReverse="True"/&gt;

            &lt;!-- Fire 3 --&gt;
            &lt;DoubleAnimation Storyboard.TargetName="Move3"
                     Storyboard.TargetProperty="Y"
                     From="0"
                     To="-140"
                     Duration="0:0:1.4"
                     BeginTime="0:0:0.15"/&gt;

            &lt;DoubleAnimation Storyboard.TargetName="Move3"
                     Storyboard.TargetProperty="X"
                     From="0"
                     To="8"
                     Duration="0:0:0.7"
                     AutoReverse="True"/&gt;

          &lt;/Storyboard&gt;
        &lt;/VisualState&gt;

      &lt;/VisualStateGroup&gt;
    &lt;/VisualStateManager.VisualStateGroups&gt;

  &lt;/Grid&gt;
&lt;/UserControl&gt;</code></pre>



<p>To light up the flames we&#8217;ll simply invoke the &#8220;On&#8221; state:</p>



<pre class="wp-block-code"><code>XAMLContainer1.GotoState("On")</code></pre>



<figure class="wp-block-video"><video height="720" style="aspect-ratio: 1280 / 720;" width="1280" controls loop src="https://blog.xojo.com/wp-content/uploads/2026/01/XAMLFire.mp4" playsinline></video></figure>



<p>For subtle UI polish—like animated indicators, highlights, or playful effects such as this candle flame—XAML transitions provide a surprisingly powerful new tool in Xojo.</p>



<p><em><em><em>William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.</em></em></em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2026/01/XAMLFire.mp4" length="177770" type="video/mp4" />

			</item>
		<item>
		<title>Detecting UI Compatibility Mode in macOS Apps with Xojo</title>
		<link>https://blog.xojo.com/2026/01/14/detecting-ui-compatibility-mode-in-macos-apps-with-xojo/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 14 Jan 2026 22:49:34 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Declares]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15762</guid>

					<description><![CDATA[As you may already know, starting with Xojo 2025r3, macOS apps can be developed and compiled with UI Compatibility Mode either enabled or disabled. Now&#8230;]]></description>
										<content:encoded><![CDATA[
<p>As you may already know, starting with Xojo 2025r3, macOS apps can be developed and compiled with UI Compatibility Mode either enabled or disabled. Now imagine you are creating a Library intended for use in other projects and, as part of its UI-related functionality, the Library needs to determine whether the host application is running with UI Compatibility Mode enabled. How can you do that? Read on to find out.</p>



<span id="more-15762"></span>



<p>To determine whether a macOS app is running with UI Compatibility Mode enabled, we’ll use a small set of <a href="https://documentation.xojo.com/topics/declares/calling_native_macos_apis.html">Declares</a> inside a method contained in a Module, purely for the purposes of this example. Begin by creating a new Desktop project and adding a new Module to it (for example, a simple “Module1”). Next, add a new method to the Module with the following signature:</p>



<p><code>IsCompatibilityModeEnabled As Boolean</code></p>



<p>Then add the following code to the method:</p>



<pre class="wp-block-code"><code>#If TargetMacOS Then
  
  If System.Version.MajorVersion >= 26 Then
    
    Declare Function NSClassFromString Lib "Foundation" (clsName As CFStringRef) As Ptr
    Declare Function NSMainBundle Lib "AppKit" Selector "mainBundle" (obj As Ptr) As Ptr
    Declare Function NSInfoDictionary Lib "AppKit" Selector "infoDictionary" (obj As Ptr) As Ptr
    Declare Function NSDictValueForKey Lib "AppKit" Selector "valueForKey:" (obj As Ptr, key As CFStringRef) As Ptr
    Declare Function NSGetBoolValue Lib "AppKit" Selector "boolValue" (obj As Ptr) As Boolean
    
    Var Bundle As Ptr = NSClassFromString("NSBundle")
    
    If Bundle &lt;> Nil Then
      Var MainBundle As Ptr = NSMainBundle(Bundle)
      
      If MainBundle &lt;> Nil then
        Var infoDictionaryPlist As Ptr = NSInfoDictionary(MainBundle)
        
        If infoDictionaryPlist &lt;> Nil Then
          Var valueObj As Ptr = NSDictValueForKey(infoDictionaryPlist, "UIDesignRequiresCompatibility")
          
          If valueObj &lt;> Nil Then 
            Return NSGetBoolValue(valueObj)
          End If
          
        End If
        
      End If
      
    End If
  End If
  
  Return False
  
#EndIf</code></pre>



<p>In short, the previous code retrieves the app’s Info.plist from the macOS bundle and loads it into an NSDictionary object (similar to Xojo’s Dictionary). It then attempts to access the value associated with the key <code>UIDesignRequiresCompatibility</code>. If the returned object is Nil, it means the Info.plist does not contain that key and the app is therefore running in native macOS Tahoe mode. If the key is present, the method returns the Boolean value associated with it; a value of True indicates that the app is running with UI Compatibility Mode enabled under macOS Tahoe. That’s all there is to it!</p>



<h2 class="wp-block-heading">Testing the Method</h2>



<p>Now add a DesktopButton to the project’s default window and implement its Pressed event. Next, insert the following line of code into the associated Code Editor:</p>



<pre class="wp-block-code"><code>MessageBox("Compatibility Mode Enabled: " +  IsCompatibilityModeEnabled.ToString)</code></pre>



<p>For testing purposes, select Build Settings &gt; macOS in the Project Browser and enable UI Compatibility Mode, which can be found under the Build section of the Inspector. Run the app and, if your Mac is running macOS 26 or later, you will see the following message:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1204" height="860" src="https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.26.54.png" alt="" class="wp-image-15763" srcset="https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.26.54.png 1204w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.26.54-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.26.54-1024x731.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.26.54-768x549.png 768w" sizes="auto, (max-width: 1204px) 100vw, 1204px" /></figure>



<p>Quit the app and return to Build Settings &gt; macOS to disable UI Compatibility Mode. Run the app again and this time you will see the following message:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1204" height="866" src="https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.28.22.png" alt="" class="wp-image-15764" srcset="https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.28.22.png 1204w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.28.22-300x216.png 300w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.28.22-1024x737.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/01/Captura-de-pantalla-2026-01-08-a-las-14.28.22-768x552.png 768w" sizes="auto, (max-width: 1204px) 100vw, 1204px" /></figure>



<h2 class="wp-block-heading">In Summary</h2>



<p>As you can see, Declares are a powerful feature in Xojo’s extensive toolbox, allowing developers to directly access and use APIs provided by the operating system. In this case, they enable you to retrieve the app’s Info.plist from the main bundle, load it into a dictionary, and read the value associated with a specific key.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Optimizing Xojo Code, Part 3: Programmatic Timers and AddHandler</title>
		<link>https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Wed, 14 Jan 2026 16:27:11 +0000</pubDate>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AddHandler]]></category>
		<category><![CDATA[Code Optimization]]></category>
		<category><![CDATA[Developer Challenge]]></category>
		<category><![CDATA[Timers]]></category>
		<category><![CDATA[UI Responsiveness]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15768</guid>

					<description><![CDATA[In&#160;Part 1&#160;of this Optimizing Xojo Code series, we looked at a working but discouraged approach using a tight loop with&#160;DoEvents&#160;to keep the UI from freezing.&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In&nbsp;<a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/">Part 1</a>&nbsp;of this Optimizing Xojo Code series, we looked at a working but discouraged approach using a tight loop with&nbsp;<code>DoEvents</code>&nbsp;to keep the UI from freezing. In&nbsp;<a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/">Part 2</a>, we explored a better alternative by replacing that loop with a Timer control dragged onto a DesktopWindow. This is a simple and effective solution that takes advantage of Xojo’s object-oriented nature.</p>



<p>But what if you need a timer inside a Class or a Module where you can&#8217;t drop a visual control?</p>



<h2 class="wp-block-heading" id="the-strategy-addhandler">The Strategy: AddHandler</h2>



<p>When you use a Timer control from the library, you double-click it to add an&nbsp;<code>Action</code>&nbsp;event. When we create a Timer in code, we don&#8217;t have a &#8220;code editor&#8221; for it in the same way. Instead, we use the&nbsp;<code>AddHandler</code>&nbsp;command to tell Xojo: &#8220;When this timer fires its Action event, run this specific method instead.&#8221;</p>



<h2 class="wp-block-heading" id="looking-at-the-code">Looking at the Code</h2>



<p>Let&#8217;s look at how we implement this. In our example project, we have a button that initializes our timer and a separate method to handle the &#8220;ticks.&#8221;</p>



<h3 class="wp-block-heading" id="the-setup-opening-the-gate">The Setup</h3>



<p>First, we define a property on our window (or class) to hold our timer:&nbsp;<code>mWaitTimer As Timer</code></p>



<p>Then, in the&nbsp;<strong>Pressed</strong>&nbsp;event of our button, we instantiate it:</p>



<pre class="wp-block-code"><code>Sub Pressed() Handles Pressed
  ' 1. Cleanup
  If mWaitTimer &lt;&gt; Nil Then
    mWaitTimer.RunMode = Timer.RunModes.Off
    mWaitTimer = Nil
  End If
  
  ' 2. Initialization
  mElapsedMs = 0
  StatusLabel.Text = "0"
  
  ' 3. Create the dynamic timer
  mWaitTimer = New Timer
  mWaitTimer.Period = 100 ' 100 ms tick
  mWaitTimer.RunMode = Timer.RunModes.Multiple
  
  ' 4. The Magic: Link the Action event to our WaitTick method
  AddHandler mWaitTimer.Action, AddressOf WaitTick
End Sub</code></pre>



<h3 class="wp-block-heading" id="the-handler-doing-the-work">The Handler (Doing the Work)</h3>



<p>Now, let&#8217;s create the method named&nbsp;<code>WaitTick</code>.&nbsp;<strong>Crucial Note:</strong>&nbsp;When using&nbsp;<code>AddHandler</code>&nbsp;for a Timer, the first parameter of your receiving method must be of the type&nbsp;<code>Timer</code>&nbsp;so it knows which object triggered it.</p>



<pre class="wp-block-code"><code>Sub WaitTick(t As Timer)
  mElapsedMs = mElapsedMs + t.Period
  
  If mElapsedMs &gt;= kCountTo Then
    ' Achievement unlocked! Stop the timer and clean up
    t.RunMode = Timer.RunModes.Off
    StatusLabel.Text = "done"
    
    ' It's good practice to remove the handler when done
    RemoveHandler t.Action, AddressOf WaitTick
  Else
    StatusLabel.Text = mElapsedMs.ToString
  End If
End Sub</code></pre>



<h2 class="wp-block-heading" id="how-it-works">How It Works</h2>



<ol class="wp-block-list">
<li><strong>New Timer:</strong>&nbsp;We create a new instance of the Timer class in memory.</li>



<li><strong>AddHandler:</strong>&nbsp;This command connects the&nbsp;<code>Action</code>&nbsp;event of our new timer to the&nbsp;<code>WaitTick</code>&nbsp;method. The&nbsp;<code>AddressOf</code>&nbsp;operator tells Xojo the memory location of the code we want to run.</li>



<li><strong>Passing the Object:</strong>&nbsp;Because&nbsp;<code>WaitTick</code>&nbsp;receives&nbsp;<code>t As Timer</code>&nbsp;as a parameter, you can actually use the same handler for multiple different timers and knows exactly which one is calling for attention.</li>
</ol>



<h2 class="wp-block-heading" id="wrapping-up">Wrapping Up</h2>



<p>By moving your Timers into code, you take a significant step toward writing more modular Xojo applications. You’ve moved the logic from &#8220;Global UI state&#8221; into &#8220;Managed Code execution.&#8221;</p>



<p>In the upcoming Part 4, we’ll look at a shortcut that makes one-off background tasks a breeze:&nbsp;<code>Timer.CallLater</code>.</p>



<p>Until then, happy coding and don&#8217;t forget to add your own solution in the <a href="https://forum.xojo.com/" data-type="link" data-id="https://forum.xojo.com/" target="_blank" rel="noreferrer noopener">Xojo Forum</a>!</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Optimizing Code Series:</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2025/11/20/optimizing-xojo-code-part-1-getting-started/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 1: Getting Started</a></li>



<li><a href="https://blog.xojo.com/2025/11/25/optimizing-xojo-code-part-2-using-a-timer-to-keep-the-ui-responsive/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 2: Using a Timer to Keep the UI Responsive</a></li>



<li><a href="https://blog.xojo.com/2026/01/14/optimizing-xojo-code-part-3-programmatic-timers-and-addhandler/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 3: Programmatic Timers and AddHandler</a></li>



<li><a href="https://blog.xojo.com/2026/02/02/optimizing-xojo-code-part-4-timer-calllater/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 4: Timer.CallLater</a></li>



<li><a href="https://blog.xojo.com/2026/03/02/optimizing-xojo-code-part-5-threads-and-userinterfaceupdate/" target="_blank" rel="noreferrer noopener">Optimizing Xojo Code, Part 5: Threads and UserInterfaceUpdate</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
