<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: junian</title>
    <description>The latest articles on DEV Community by junian (@junian).</description>
    <link>https://dev.to/junian</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F59990%2F17d6c594-9888-4914-ac0a-bd897ffdaff6.png</url>
      <title>DEV Community: junian</title>
      <link>https://dev.to/junian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/junian"/>
    <language>en</language>
    <item>
      <title>Using Touch ID for sudo on Mac</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Wed, 30 Sep 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/junian/using-touch-id-for-sudo-on-mac-3l50</link>
      <guid>https://dev.to/junian/using-touch-id-for-sudo-on-mac-3l50</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This article was originally posted at &lt;a href="https://www.junian.dev/blog/mac-sudo-touch-id/" rel="noopener noreferrer"&gt;junian.dev&lt;/a&gt;. A video with the same content is also available on &lt;a href="https://youtu.be/Q9KJcovMX_4" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Touch ID is one of the greatest things on my MacBook.&lt;br&gt;
I can authenticate a lot of stuff just by resting my finger on it.&lt;br&gt;
I can log in to any website using either passkey or the built-in password manager quickly too.&lt;/p&gt;

&lt;p&gt;I wish I could use it from Terminal though.&lt;br&gt;
It would be super convenient if I could use Touch ID to authenticate &lt;code&gt;sudo&lt;/code&gt; when executing a terminal command.&lt;/p&gt;

&lt;p&gt;By default, macOS will ask for your password whenever you execute a command with &lt;code&gt;sudo&lt;/code&gt;.&lt;br&gt;
But did you know that macOS actually supports Touch ID to authenticate &lt;code&gt;sudo&lt;/code&gt;?&lt;br&gt;
I didn't know, but the feature is there.&lt;br&gt;
You just need to update the config file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzeo4wa67s6j4uwqjckso.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzeo4wa67s6j4uwqjckso.png" alt="macOS Touch ID sudo prompt" width="360" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Video&lt;/li&gt;
&lt;li&gt;Enabling Touch ID for sudo on macOS 14 Sonoma or later&lt;/li&gt;
&lt;li&gt;Enabling Touch ID for sudo on macOS 13 Ventura or earlier&lt;/li&gt;
&lt;li&gt;Enabling Touch ID for sudo using mole&lt;/li&gt;
&lt;li&gt;Final Thoughts&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;Not in the mood for reading? &lt;a href="https://youtu.be/Q9KJcovMX_4" rel="noopener noreferrer"&gt;Watch the video&lt;/a&gt; instead.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Q9KJcovMX_4" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling Touch ID for sudo on macOS 14 Sonoma or later
&lt;/h2&gt;

&lt;p&gt;The solution is quite simple.&lt;/p&gt;

&lt;p&gt;On macOS 14 (Sonoma) and later, there is a template file ready to use.&lt;br&gt;
The template is located at &lt;code&gt;/etc/pam.d/sudo_local.template&lt;/code&gt;.&lt;br&gt;
Here's the content of the file on my macOS 27 Golden Gate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/pam.d/sudo_local.template
&lt;span class="c"&gt;# sudo_local: local config file which survives system update and is included for sudo&lt;/span&gt;
&lt;span class="c"&gt;# uncomment following line to enable Touch ID for sudo&lt;/span&gt;
&lt;span class="c"&gt;#auth       sufficient     pam_tid.so&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To enable Touch ID for &lt;code&gt;sudo&lt;/code&gt;, copy the template file into &lt;code&gt;sudo_local&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cp&lt;/span&gt; /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to edit the &lt;code&gt;sudo_local&lt;/code&gt; file.&lt;br&gt;
You can use &lt;code&gt;vim&lt;/code&gt; or any other text editor to do it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; vim /etc/pam.d/sudo_local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All we need to do is to uncomment the 3rd line and save the file.&lt;br&gt;
The final &lt;code&gt;/etc/pam.d/sudo_local&lt;/code&gt; file will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo_local: local config file which survives system update and is included for sudo
# uncomment following line to enable Touch ID for sudo
auth       sufficient     pam_tid.so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once it's done, open a new Terminal session and test it.&lt;br&gt;
Execute something with &lt;code&gt;sudo&lt;/code&gt;, you can try something simple like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time, a Touch ID dialog will show up, and you can authenticate it using your fingerprint instead of entering your password manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling Touch ID for sudo on macOS 13 Ventura or earlier
&lt;/h2&gt;

&lt;p&gt;To use Touch ID to authenticate &lt;code&gt;sudo&lt;/code&gt; on macOS 13 Ventura or older, you need to edit the &lt;code&gt;/etc/pam.d/sudo&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Just for reference, here's the default content on my macOS 27 Golden Gate (might differ for each macOS version).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/pam.d/sudo
&lt;span class="c"&gt;# sudo: auth account password session&lt;/span&gt;
auth       include        sudo_local
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's add a new config that will use Touch ID to authenticate &lt;code&gt;sudo&lt;/code&gt;.&lt;br&gt;
Open &lt;code&gt;Terminal.app&lt;/code&gt; and edit using &lt;code&gt;vim&lt;/code&gt; or any other text editor.&lt;br&gt;
You need to use &lt;code&gt;sudo&lt;/code&gt; to edit the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; vim /etc/pam.d/sudo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following line at the top of the config file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;auth       sufficient     pam_tid.so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the new changes. In my case, the new &lt;code&gt;/etc/pam.d/sudo&lt;/code&gt; config will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;auth       sufficient     pam_tid.so
auth       include        sudo_local
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once it's done, open a new Terminal session and test it.&lt;br&gt;
Execute something with &lt;code&gt;sudo&lt;/code&gt;, you can try something simple like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt; ~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time, a Touch ID dialog will show up, and you can authenticate it using your fingerprint instead of entering your password manually.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;code&gt;/etc/pam.d/sudo&lt;/code&gt; is a default macOS file, so it will be overwritten by system updates. You need to re-apply this change after each time you update macOS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Enabling Touch ID for sudo using mole
&lt;/h2&gt;

&lt;p&gt;Another alternative is to use &lt;code&gt;mole&lt;/code&gt; to configure Touch ID for &lt;code&gt;sudo&lt;/code&gt;.&lt;br&gt;
You can first install &lt;code&gt;mole&lt;/code&gt; using &lt;code&gt;brew&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;mole
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then execute the following command and follow the instructions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mo touchid
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it, &lt;code&gt;mole&lt;/code&gt; will add the configuration automatically, similar to the manual methods above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;That's all I can write for today.&lt;br&gt;
Thanks for reading, and see you in my next post.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>sudo</category>
      <category>touchid</category>
    </item>
    <item>
      <title>How to Delete All OpenCode Sessions</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Sat, 29 Aug 2026 23:30:00 +0000</pubDate>
      <link>https://dev.to/junian/how-to-delete-all-opencode-sessions-1056</link>
      <guid>https://dev.to/junian/how-to-delete-all-opencode-sessions-1056</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.junian.dev/blog/opencode-delete-all-sessions/" rel="noopener noreferrer"&gt;Junian Dev Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;I've been using OpenCode a lot lately.&lt;br&gt;
One thing I didn't notice was that every time I start &lt;code&gt;opencode&lt;/code&gt;, even in the same directory, it always starts a new session.&lt;br&gt;
Over time, there are a lot of saved sessions.&lt;/p&gt;

&lt;p&gt;I checked using the &lt;code&gt;opencode session list&lt;/code&gt; command and it has a bunch of sessions like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;opencode session list
Session ID                      Title                                   Updated
────────────────────────────────────────────────────────────────────────────────────────────
ses_01a79c031ffeoTF781ma9DAYiR  New session - 2026-08-09T07:56:48.462Z  10:14 PM ·  8/9/2026
ses_02142df4bffeJZJCNI2flGgZiw  New session - 2026-08-08T00:19:24.468Z   7:07 AM ·  8/9/2026
ses_03051a679ffe7LNdjOeQQs8hC8  New session - 2026-08-05T02:08:57.735Z   9:10 AM ·  8/5/2026
ses_03fb4423effeJSOWB6yROH3mzp  New session - 2026-08-02T02:26:57.089Z   9:35 AM ·  8/2/2026
ses_25fdf08f1ffetxmcBDVYGfI1Me  Code functionality review                5:33 PM · 4/18/2026
ses_260544176ffe1iW1RyEcxgz102  Codebase review                          3:20 PM · 4/18/2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One beautiful day, I wanted to start a project with a fresh, clean slate.&lt;br&gt;
No existing session should be available.&lt;br&gt;
So what I had to do was to delete all sessions.&lt;/p&gt;

&lt;p&gt;Unfortunately, &lt;code&gt;opencode&lt;/code&gt; didn't have (yet) a way to delete all sessions in one command.&lt;br&gt;
You can only delete a single session like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;opencode session delete &lt;span class="nv"&gt;$sessionID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But, with the power of the command line, you can still delete all opencode sessions using a one-line terminal command.&lt;/p&gt;

&lt;p&gt;To make it work, you need to install the &lt;code&gt;jq&lt;/code&gt; command line first.&lt;br&gt;
For example, you can install &lt;code&gt;jq&lt;/code&gt; on macOS with the Homebrew package manager like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;jq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, here's how to remove all &lt;code&gt;opencode&lt;/code&gt; sessions with a one-line command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;opencode session list &lt;span class="nt"&gt;--format&lt;/span&gt; json &lt;span class="se"&gt;\&lt;/span&gt;
  | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.[].id'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | xargs &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nt"&gt;-n1&lt;/span&gt; opencode session delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, you just need to list the OpenCode's sessions in JSON format, extract all the IDs using &lt;code&gt;jq&lt;/code&gt;, and execute the standard &lt;code&gt;opencode session delete&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That's it.&lt;br&gt;
Now you can always fresh clean up your &lt;code&gt;opencode&lt;/code&gt; sessions easily from Terminal.&lt;/p&gt;

&lt;p&gt;As usual, if you have any questions or a better method, leave a comment below.&lt;br&gt;
Thanks for reading, and see you next time!&lt;/p&gt;

</description>
      <category>opencode</category>
      <category>macos</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Installing Multiple .NET Versions on macOS with Homebrew</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Wed, 01 Oct 2025 02:25:59 +0000</pubDate>
      <link>https://dev.to/junian/installing-multiple-net-versions-on-macos-with-homebrew-2gp6</link>
      <guid>https://dev.to/junian/installing-multiple-net-versions-on-macos-with-homebrew-2gp6</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.junian.dev/blog/install-multiple-dotnet-macos-homebrew/" rel="noopener noreferrer"&gt;Junian Dev Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;If you're a .NET developer using macOS, you may want to install multiple .NET SDK versions side by side.&lt;br&gt;
While you can do this manually, it can become a headache to maintain in the long term. As you install more SDKs, leftover files can accumulate and fill up your storage.&lt;/p&gt;

&lt;p&gt;Uninstalling older versions manually can also be tedious. You can refer to the &lt;a href="https://learn.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-macos" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; for removal instructions. I even wrote &lt;a href="https://dev.to/dev/dotnet-sdk-runtime-macos-removal/"&gt;an uninstallation guide&lt;/a&gt; to remind myself how to do it properly.&lt;/p&gt;

&lt;p&gt;A more elegant solution is to use the &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;Homebrew&lt;/a&gt; package manager to manage .NET SDK installations on macOS.&lt;/p&gt;

&lt;p&gt;However, the official Homebrew cask for .NET does not allow multiple SDK versions to be installed at the same time. When you install one version, it prevents you from using others.&lt;/p&gt;

&lt;p&gt;This can be problematic if you need to work on projects that require different .NET versions. While upgrading projects to the latest .NET version is often ideal, sometimes it's not feasible.&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;To address this, I created a dedicated &lt;a href="https://github.com/junian/homebrew-dotnet" rel="noopener noreferrer"&gt;Homebrew tap for .NET&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using it is simple.&lt;/p&gt;

&lt;p&gt;Before using this Homebrew .NET tap, first uninstall any existing &lt;code&gt;dotnet-sdk&lt;/code&gt; formula from the core Homebrew cask if you have it installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew uninstall &lt;span class="nt"&gt;--zap&lt;/span&gt; dotnet-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once that's done, tap my repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap junian/homebrew-dotnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, to install the .NET 10 SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;dotnet-sdk@10.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! Now you can use .NET 10 on your macOS system.&lt;/p&gt;

&lt;p&gt;Let's consider a scenario:&lt;/p&gt;

&lt;p&gt;Suppose a client needs a bug fix for a project that still uses .NET 6.0. You can install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;dotnet-sdk@6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can use .NET 6.0 to work on that project.&lt;/p&gt;

&lt;p&gt;Later, if the client wants to migrate to .NET 9, you can install it as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;dotnet-sdk@9.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you no longer need .NET 6.0, simply remove it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew uninstall dotnet-sdk@6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll still have .NET 9 and .NET 10 installed on your macOS. It's that easy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;That's all for today. I hope this simple guide helps you manage .NET SDKs on your macOS.&lt;/p&gt;

&lt;p&gt;For more details, check out the &lt;a href="https://github.com/junian/homebrew-dotnet" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; for the Homebrew .NET tap.&lt;/p&gt;

&lt;p&gt;If you have any questions or suggestions, feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Thanks for reading, and see you next time!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/junian/homebrew-dotnet" rel="noopener noreferrer"&gt;junian/homebrew-dotnet: Install .NET SDK side-by-side on macOS with Homebrew package manager.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dotnet</category>
      <category>macos</category>
      <category>csharp</category>
    </item>
    <item>
      <title>Troubleshooting Flutter Android App to Target SDK 35 Upgrade</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Mon, 29 Sep 2025 18:31:42 +0000</pubDate>
      <link>https://dev.to/junian/troubleshooting-flutter-android-app-to-target-sdk-35-upgrade-50gk</link>
      <guid>https://dev.to/junian/troubleshooting-flutter-android-app-to-target-sdk-35-upgrade-50gk</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.junian.dev/blog/flutter-android-sdk-35-upgrade/" rel="noopener noreferrer"&gt;Junian Dev Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Another year, another chore: upgrading the Android app target SDK. This year, Google requires Target SDK 35.&lt;/p&gt;

&lt;p&gt;So, here’s my experience upgrading an existing Flutter Android app. There were a few issues, but every problem has a solution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; At the time of writing this tutorial, I was using Flutter &lt;code&gt;v3.10.6&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Set Target SDK to 35
&lt;/h2&gt;

&lt;p&gt;First, update the Android target SDK version manually by editing the &lt;code&gt;android/local.properties&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-flutter.compileSdkVersion=34
&lt;/span&gt;&lt;span class="gi"&gt;+flutter.compileSdkVersion=35
&lt;/span&gt;&lt;span class="gd"&gt;-flutter.targetSdkVersion=34
&lt;/span&gt;&lt;span class="gi"&gt;+flutter.targetSdkVersion=35
&lt;/span&gt; flutter.minSdkVersion=21
 flutter.ndkVersion=26.1.10909125
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After updating, build the Android bundle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter build appbundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As expected, some issues appeared.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update Gradle to 8.5
&lt;/h2&gt;

&lt;p&gt;The first error was &lt;code&gt;RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
&amp;gt; A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   &amp;gt; Android resource linking failed
     aapt2 E 09-30 01:01:15 26752 18645483 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
     aapt2 E 09-30 01:01:15 26752 18645483 ApkAssets.cpp:149] Failed to load resources table in APK '/opt/homebrew/share/android-commandlinetools/platforms/android-35/android.jar'.
     error: failed to load include path /opt/homebrew/share/android-commandlinetools/platforms/android-35/android.jar.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This happened because I was still using Gradle &lt;code&gt;v7.3&lt;/code&gt;. Upgrade to at least &lt;code&gt;v8.5&lt;/code&gt; (I chose &lt;code&gt;v8.9&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;android/
./gradlew wrapper &lt;span class="nt"&gt;--gradle-version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8.9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then update the Gradle plugin version in &lt;code&gt;android/build.gradle&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;dependencies {
&lt;/span&gt;&lt;span class="gd"&gt;-    classpath 'com.android.tools.build:gradle:7.3.0'
&lt;/span&gt;&lt;span class="gi"&gt;+    classpath 'com.android.tools.build:gradle:8.5.0'
&lt;/span&gt;    // ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rebuild the app after updating.&lt;br&gt;
Naturally, another issue came up. No surprises there.&lt;/p&gt;
&lt;h2&gt;
  
  
  Flutter In-App WebView Issue
&lt;/h2&gt;

&lt;p&gt;Next, an error related to &lt;code&gt;:flutter_inappwebview&lt;/code&gt; appeared:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;&lt;span class="nl"&gt;FAILURE:&lt;/span&gt; &lt;span class="n"&gt;Build&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;exception&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;What&lt;/span&gt; &lt;span class="n"&gt;went&lt;/span&gt; &lt;span class="nl"&gt;wrong:&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;problem&lt;/span&gt; &lt;span class="n"&gt;occurred&lt;/span&gt; &lt;span class="n"&gt;configuring&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt; &lt;span class="s1"&gt;':flutter_inappwebview'&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Could&lt;/span&gt; &lt;span class="n"&gt;not&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;instance&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;type&lt;/span&gt; &lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;android&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;impl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;LibraryVariantBuilderImpl&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
   &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Namespace&lt;/span&gt; &lt;span class="n"&gt;not&lt;/span&gt; &lt;span class="n"&gt;specified&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;Specify&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;module&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt; &lt;span class="nl"&gt;file:&lt;/span&gt; &lt;span class="s"&gt;/Users/&lt;/span&gt;&lt;span class="n"&gt;junian&lt;/span&gt;&lt;span class="s"&gt;/.pub-cache/&lt;/span&gt;&lt;span class="n"&gt;hosted&lt;/span&gt;&lt;span class="s"&gt;/pub.dev/&lt;/span&gt;&lt;span class="n"&gt;flutter_inappwebview&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;5.8&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="s"&gt;/android/&lt;/span&gt;&lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;gradle&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;See&lt;/span&gt; &lt;span class="nl"&gt;https:&lt;/span&gt;&lt;span class="c1"&gt;//d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.&lt;/span&gt;

     &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;ve&lt;/span&gt; &lt;span class="n"&gt;specified&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;attribute&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="n"&gt;AndroidManifest&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;xml&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;use&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;AGP&lt;/span&gt; &lt;span class="n"&gt;Upgrade&lt;/span&gt; &lt;span class="n"&gt;Assistant&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;migrate&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;Refer&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nl"&gt;https:&lt;/span&gt;&lt;span class="c1"&gt;//d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Based on &lt;a href="https://stackoverflow.com/questions/77814414/a-problem-occurred-configuring-project-flutter-inappwebview/79080934#79080934" rel="noopener noreferrer"&gt;this Stack Overflow answer&lt;/a&gt;, add the following &lt;code&gt;subprojects&lt;/code&gt; section to &lt;code&gt;android/build.gradle&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;

&lt;span class="nf"&gt;subprojects&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;afterEvaluate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;android&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;android&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The journey was not over. There were more issues ahead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java 8 Desugaring Support
&lt;/h2&gt;

&lt;p&gt;If your project uses Java 8, you may see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;A failure occurred &lt;span class="k"&gt;while &lt;/span&gt;executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
&lt;span class="gp"&gt;   &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;An issue was found when checking AAR metadata:
&lt;span class="go"&gt;
       1.  Dependency ':flutter_local_notifications' requires core library desugaring to be enabled
           for :app.

           See https://developer.android.com/studio/write/java8-support.html for more
           details.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable desugaring by setting &lt;code&gt;coreLibraryDesugaringEnabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and adding the dependency in &lt;code&gt;android/app/build.gradle&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;android&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;

    &lt;span class="nf"&gt;compileOptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;coreLibraryDesugaringEnabled&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
        &lt;span class="n"&gt;sourceCompatibility&lt;/span&gt; &lt;span class="nc"&gt;JavaVersion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VERSION_1_8&lt;/span&gt;
        &lt;span class="n"&gt;targetCompatibility&lt;/span&gt; &lt;span class="nc"&gt;JavaVersion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VERSION_1_8&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ...&lt;/span&gt;

&lt;span class="nf"&gt;dependencies&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;

    &lt;span class="n"&gt;coreLibraryDesugaring&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;android&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;desugar_jdk_libs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;2.0.3&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One final problem ahead!&lt;/p&gt;

&lt;h2&gt;
  
  
  Kotlin Version Update
&lt;/h2&gt;

&lt;p&gt;Another issue when building the Android bundle was something to do with Kotlin version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;&lt;span class="nl"&gt;FAILURE:&lt;/span&gt; &lt;span class="n"&gt;Build&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;exception&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;What&lt;/span&gt; &lt;span class="n"&gt;went&lt;/span&gt; &lt;span class="nl"&gt;wrong:&lt;/span&gt;
&lt;span class="n"&gt;Execution&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="s1"&gt;':app:compileReleaseKotlin'&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;failure&lt;/span&gt; &lt;span class="n"&gt;occurred&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;executing&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;jetbrains&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;kotlin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;compilerRunner&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;GradleCompilerRunnerWithWorkers&lt;/span&gt;&lt;span class="n"&gt;$GradleKotlinCompilerWorkAction&lt;/span&gt;
   &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Compilation&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;See&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;more&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end of the error message, there was a note:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[!] Your project requires a newer version of the Kotlin Gradle plugin.                                                                                             │
Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update /Users/junian/Projects/flutter-app/android/build.gradle: 
ext.kotlin_version = '&amp;lt;latest-version&amp;gt;'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The solution was to update the Kotlin version from &lt;code&gt;v1.7&lt;/code&gt; to &lt;code&gt;v1.9&lt;/code&gt; in the &lt;code&gt;buildscript&lt;/code&gt; section of &lt;code&gt;android/build.gradle&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;buildscript {
&lt;/span&gt;&lt;span class="gd"&gt;-    ext.kotlin_version = '1.7.10'
&lt;/span&gt;&lt;span class="gi"&gt;+    ext.kotlin_version = '1.9.25'
&lt;/span&gt;}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see if there was another bug to smash.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Build. Finally!
&lt;/h2&gt;

&lt;p&gt;With all fixes applied, I could finally build the Android bundle successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter build appbundle
&lt;span class="go"&gt;Running Gradle task 'bundleRelease'...                             52.0s
✓ Built build/app/outputs/bundle/release/app-release.aab (39.7MB).
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I submitted the new &lt;code&gt;.aab&lt;/code&gt; release to Google Play and waiting for review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading! I hope your upgrade to Android Target SDK 35 goes smoothly.&lt;/p&gt;

&lt;p&gt;If you have questions or want to discuss, feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Thank you and see you next time!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/78778617/android-resource-linking-failed-with-android-35-sdk-during-flutter-release-build/78778798#78778798" rel="noopener noreferrer"&gt;gradle - Android resource linking failed with android-35 SDK during Flutter release build - Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/77814414/a-problem-occurred-configuring-project-flutter-inappwebview/79080934#79080934" rel="noopener noreferrer"&gt;android - A problem occurred configuring project ':flutter_inappwebview' - Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/79158012/dependency-flutter-local-notifications-requires-core-library-desugaring-to-be/79171577#79171577" rel="noopener noreferrer"&gt;android - Dependency ':flutter_local_notifications' requires core library desugaring to be enabled for :app - Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>android</category>
    </item>
    <item>
      <title>Solving the Xamarin.Forms iOS 'Could Not Load the Framework IDEDistribution' Issue</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Thu, 13 Feb 2025 09:03:36 +0000</pubDate>
      <link>https://dev.to/junian/solving-the-xamarinforms-ios-could-not-load-the-framework-idedistribution-issue-glb</link>
      <guid>https://dev.to/junian/solving-the-xamarinforms-ios-could-not-load-the-framework-idedistribution-issue-glb</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.junian.dev/blog/xamarin-forms-ios-framework-idedistribution-issue/" rel="noopener noreferrer"&gt;Junian Dev Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/rnwKEtFM0vM" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" title="Subscribe to Junian Dev YouTube Channel" alt="Subscribe to Junian Dev YouTube Channel" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Xamarin.Forms is deprecated as of May 2024. I get it.&lt;br&gt;
But some of us are still trying to maintain legacy Xamarin projects.&lt;/p&gt;

&lt;p&gt;It's 2025, and I tried to run a Xamarin.Forms iOS project with the latest Xcode version on macOS.&lt;br&gt;
It failed with the following error message.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;error HE0004: Could not load the framework 'IDEDistribution' (path: /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution): &lt;br&gt;
dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning&lt;br&gt;
  Referenced from: &amp;lt;6F88EF9E-AE57-3231-9DD6-36E9CC59D914&amp;gt; /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution&lt;br&gt;
  Reason: tried: '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/MonoBundle/AppThinning.framework/Versions/A/AppThinning' (no such file)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The latest &lt;code&gt;Xamarin.iOS&lt;/code&gt; version is &lt;code&gt;16.4.0.23&lt;/code&gt;.&lt;br&gt;
There are no more updates, and I guess it's incompatible with Xcode 16.&lt;/p&gt;

&lt;p&gt;Luckily, the solution is simple.&lt;/p&gt;

&lt;p&gt;First, go to the &lt;code&gt;Xamarin.iOS.framework&lt;/code&gt; directory, specifically to the &lt;code&gt;mlaunch.app&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new directory called &lt;code&gt;Frameworks&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir &lt;/span&gt;Frameworks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, copy the &lt;code&gt;AppThinning.framework&lt;/code&gt; from Xcode to the newly-created &lt;code&gt;Frameworks&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; /Applications/Xcode.app/Contents/SharedFrameworks/AppThinning.framework ./Frameworks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! Now you can build and run your Xamarin.iOS app again.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtrack.jetbrains.com/issue/RIDER-117599/Could-not-load-the-framework-IDEDistribution-on-MacOS-15.0#focus=Comments-27-10817458.0-0" rel="noopener noreferrer"&gt;Could not load the framework IDEDistribution on MacOS 15.0 : RIDER-117599&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dotnet</category>
      <category>xamarin</category>
      <category>ios</category>
    </item>
    <item>
      <title>How to Fix 'File Access Denied' Issue on Windows</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Thu, 21 Nov 2024 07:04:14 +0000</pubDate>
      <link>https://dev.to/junian/how-to-fix-file-access-denied-issue-on-windows-3jd2</link>
      <guid>https://dev.to/junian/how-to-fix-file-access-denied-issue-on-windows-3jd2</guid>
      <description>&lt;p&gt;Have you ever tried to delete or move a file in Windows File Explorer, only to encounter an error message like this?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;File Access Denied&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;You need permission to perform this action.  &lt;/p&gt;

&lt;p&gt;You require permission from PC-NAME\username to make changes to this file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ytimg.com%2Fvi%2FAHntqlpzYoc%2Fmaxresdefault.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ytimg.com%2Fvi%2FAHntqlpzYoc%2Fmaxresdefault.jpg" title="Windows File Explorer File Access Denied" alt="Windows File Explorer File Access Denied" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're not alone, and here's how to resolve it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Right-click the file and select &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Security&lt;/strong&gt; tab and click the &lt;strong&gt;Advanced&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Change&lt;/strong&gt; button next to the &lt;strong&gt;Owner&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;Enter your username, click &lt;strong&gt;Check Names&lt;/strong&gt; to verify it, then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Permissions&lt;/strong&gt; tab, click &lt;strong&gt;Add&lt;/strong&gt; to assign full control permission.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Select a principal&lt;/strong&gt;; a new dialog box will appear.&lt;/li&gt;
&lt;li&gt;Enter your username again, click &lt;strong&gt;Check Names&lt;/strong&gt; to verify, then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Back in the &lt;strong&gt;Permission Entry&lt;/strong&gt; dialog, check the &lt;strong&gt;Full control&lt;/strong&gt; permission.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; on all dialogs to apply the changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once you complete these steps, you should be able to modify, delete, or move the file.&lt;/p&gt;

&lt;p&gt;Here's a video to help visualize the process:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/AHntqlpzYoc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading. I hope you found this helpful. See you next time!&lt;/p&gt;

</description>
      <category>windows</category>
    </item>
    <item>
      <title>How to Run Safari Browser without CORS Restriction</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Sun, 17 Nov 2024 04:28:56 +0000</pubDate>
      <link>https://dev.to/junian/how-to-run-safari-browser-without-cors-restriction-1d3c</link>
      <guid>https://dev.to/junian/how-to-run-safari-browser-without-cors-restriction-1d3c</guid>
      <description>&lt;p&gt;As a web developer, you likely need to test your REST API locally. When using a browser like Safari, you might encounter issues such as the following messages.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Origin &lt;a href="http://localhost:8081" rel="noopener noreferrer"&gt;http://localhost:8081&lt;/a&gt; is not allowed by Access-Control-Allow-Origin. Status code: 200&lt;/p&gt;

&lt;p&gt;Fetch API cannot load &lt;a href="http://localhost:8080/api/" rel="noopener noreferrer"&gt;http://localhost:8080/api/&lt;/a&gt; due to access control checks.&lt;/p&gt;

&lt;p&gt;Failed to load resource: Origin &lt;a href="http://localhost:8081" rel="noopener noreferrer"&gt;http://localhost:8081&lt;/a&gt; is not allowed by Access-Control-Allow-Origin. Status code: 200&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't worry, this is actually a strong security feature implemented by modern web browsers.&lt;/p&gt;

&lt;p&gt;I won't overwhelm you with details about CORS—you can read more in the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;. However, if you're interested, here's a summary from &lt;a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cross-origin resource sharing (CORS) is a mechanism to safely bypass the Same-origin policy, that is, it allows a web page to access restricted resources from a server on a domain different than the domain that served the web page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's an example of a cross-origin request: the front-end JavaScript code served from https://&lt;strong&gt;example.com&lt;/strong&gt;/ uses &lt;code&gt;fetch()&lt;/code&gt; to request https://&lt;strong&gt;example.org&lt;/strong&gt;/api/data.json.&lt;/p&gt;

&lt;p&gt;Luckily, bypassing CORS restrictions in Safari is straightforward.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution to Disable CORS in Safari
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;strong&gt;Safari&lt;/strong&gt; in the top menu bar and select &lt;strong&gt;Settings...&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Go to the &lt;strong&gt;Advanced&lt;/strong&gt; tab and check the &lt;strong&gt;Show features for web developers&lt;/strong&gt; option.&lt;/li&gt;
&lt;li&gt;A new &lt;strong&gt;Developer&lt;/strong&gt; tab will appear.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Developer&lt;/strong&gt; tab and enable the &lt;strong&gt;Disable cross-origin restrictions&lt;/strong&gt; option.&lt;/li&gt;
&lt;li&gt;Return to Safari and refresh the page. It should work now!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;Here is the video to visualize the steps above.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/EKxWqRB_OqY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Disabling CORS on Safari through the settings is quite simple.&lt;br&gt;
I do wish there were a command-line solution, but let's be grateful for any method available.&lt;/p&gt;

&lt;p&gt;Thanks for reading, and see you around!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>safari</category>
      <category>macos</category>
    </item>
    <item>
      <title>412. Fizz Buzz | LeetCode in C#</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Thu, 14 Nov 2024 05:01:57 +0000</pubDate>
      <link>https://dev.to/junian/412-fizz-buzz-leetcode-in-c-56gl</link>
      <guid>https://dev.to/junian/412-fizz-buzz-leetcode-in-c-56gl</guid>
      <description>&lt;p&gt;The Fizz Buzz problem is a classic exercise that is often used to teach basic programming concepts such as loops and conditionals.&lt;/p&gt;

&lt;p&gt;In this article, I'll show you my attempt to solve this problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intuition
&lt;/h2&gt;

&lt;p&gt;When breaking down the problem, the task is to iterate through a sequence of numbers while applying simple divisibility rules to determine the correct output for each number.&lt;/p&gt;

&lt;p&gt;The logic is straightforward: replace numbers with specific words based on their divisibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;To solve the Fizz Buzz problem, we can use a simple loop and a series of conditional checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initialize a List&lt;/strong&gt;: Start by creating a list to store the results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate through Numbers&lt;/strong&gt;: Loop through numbers from 1 to &lt;code&gt;n&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Divisibility&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;If a number is divisible by both 3 and 5, it should be labeled "FizzBuzz".&lt;/li&gt;
&lt;li&gt;Else, if it's divisible by 3, label it "Fizz".&lt;/li&gt;
&lt;li&gt;Else, if it's divisible by 5, label it "Buzz".&lt;/li&gt;
&lt;li&gt;If none of these conditions are met, add the number itself as a string.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add to List&lt;/strong&gt;: For each number, append the appropriate label or number to the results list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return the Result&lt;/strong&gt;: Finally, return the list containing all the strings.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time complexity&lt;/strong&gt;: The time complexity is &lt;code&gt;O(n)&lt;/code&gt; because we process each number from 1 to &lt;code&gt;n&lt;/code&gt; exactly once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;: The space complexity is &lt;code&gt;O(n)&lt;/code&gt; because we store a string result for each number in the &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IList&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;FizzBuzz&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;{};&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;++)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"FizzBuzz"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Fizz"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Buzz"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/nU-lZ8XLIuI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This approach provides an efficient way to implement the Fizz Buzz logic by using a loop and conditional checks.&lt;/p&gt;

&lt;p&gt;The function generates the desired output for any valid positive integer &lt;code&gt;n&lt;/code&gt;, allowing it to handle a wide range of input values effectively.&lt;/p&gt;

&lt;p&gt;This solution is not only concise but also clear, making it easy to understand for anyone familiar with basic programming constructs.&lt;/p&gt;

&lt;p&gt;This explanation captures the essence of how the Fizz Buzz problem can be addressed programmatically with a simple and clean loop-and-conditional structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/fizz-buzz/description/" rel="noopener noreferrer"&gt;Fizz Buzz - LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>leetcode</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>9. Palindrome Number | LeetCode in C#</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Sun, 10 Nov 2024 10:03:55 +0000</pubDate>
      <link>https://dev.to/junian/palindrome-number-leetcode-in-c-1l4</link>
      <guid>https://dev.to/junian/palindrome-number-leetcode-in-c-1l4</guid>
      <description>&lt;h2&gt;
  
  
  Intuition
&lt;/h2&gt;

&lt;p&gt;A number is a palindrome if it reads the same forwards and backwards. The first thought might be to convert the number into a string and check if it matches its reverse. However, the challenge is to solve this without converting the integer to a string, which calls for a numerical approach. &lt;/p&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;To determine if an integer is a palindrome without using string conversion, we reverse the integer by repeatedly extracting its last digit and appending it to a new reversed number. Here's how:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Negative Numbers&lt;/strong&gt;: Start by handling negative numbers. Any negative number cannot be a palindrome since the negative sign only appears on one side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse Integer&lt;/strong&gt;: Initialize &lt;code&gt;reverseNumber&lt;/code&gt; to zero and a copy of the input &lt;code&gt;x&lt;/code&gt; called &lt;code&gt;y&lt;/code&gt;. While &lt;code&gt;y&lt;/code&gt; is greater than zero, repeatedly:

&lt;ul&gt;
&lt;li&gt;Extract the last digit (&lt;code&gt;y % 10&lt;/code&gt;) from &lt;code&gt;y&lt;/code&gt; and append it to &lt;code&gt;reverseNumber&lt;/code&gt; by multiplying &lt;code&gt;reverseNumber&lt;/code&gt; by 10 and adding the digit.&lt;/li&gt;
&lt;li&gt;Remove the last digit from &lt;code&gt;y&lt;/code&gt; by performing integer division by 10.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comparison&lt;/strong&gt;: After constructing the reversed integer, compare it to the original number &lt;code&gt;x&lt;/code&gt;. If they are identical, &lt;code&gt;x&lt;/code&gt; is a palindrome.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach effectively reconstructs the reversed number without needing the original number's length or auxiliary string manipulations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time complexity&lt;/strong&gt;: The time complexity is &lt;code&gt;O(log(n))&lt;/code&gt; because we iterate through all the digits of the number &lt;code&gt;x&lt;/code&gt;, where &lt;code&gt;n&lt;/code&gt; is the input value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;: The space complexity is &lt;code&gt;O(1)&lt;/code&gt; as we only use a few extra variables to store numbers, regardless of the input size.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="nf"&gt;IsPalindrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;reverseNumber&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;reverseNumber&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reverseNumber&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reverseNumber&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/QpOQCKxRImw" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By reversing the integer numerically, this algorithm cleverly checks for palindromes without converting the number to a string, thus adhering to the problem's constraints while maintaining an efficient space complexity. This method ensures that we can handle large integers within the problem's constraints effectively.&lt;/p&gt;

&lt;p&gt;This discussion provides a clear understanding of how to determine if a number is a palindrome via integer arithmetic, avoiding the pitfalls of converting to a string.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/palindrome-number/description/" rel="noopener noreferrer"&gt;Palindrome Number - LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>leetcode</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>26. Remove Duplicates From Sorted Array | LeetCode in C#</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Sat, 09 Nov 2024 07:46:13 +0000</pubDate>
      <link>https://dev.to/junian/remove-duplicates-from-sorted-array-leetcode-in-c-4nek</link>
      <guid>https://dev.to/junian/remove-duplicates-from-sorted-array-leetcode-in-c-4nek</guid>
      <description>&lt;p&gt;This post is a journal about how I solved the &lt;strong&gt;Remove Duplicates from Sorted Array&lt;/strong&gt; problem from &lt;a href="https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/" rel="noopener noreferrer"&gt;LeetCode&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intuition
&lt;/h2&gt;

&lt;p&gt;The problem requires us to remove duplicates from a sorted array in-place while maintaining the original order of elements. Since the array is sorted, duplicates are consecutive. This means we can efficiently identify and skip duplicates by comparing each element to the last unique element identified.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;The key is to keep track of the position at which the next unique element should be placed. We start with an index pointing to the first position. As we iterate through the array, we compare each element with the last unique element found. If an element is greater than this last unique element, it means we have encountered a new unique number. We then place this new unique element at the current index and increment the index.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize a variable &lt;code&gt;currentNumber&lt;/code&gt; to store the last added unique number. Set it to a value less than the smallest possible element (e.g., &lt;code&gt;int.MinValue&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Use an &lt;code&gt;index&lt;/code&gt; variable to track the position to insert the next unique number. Start with 0.&lt;/li&gt;
&lt;li&gt;Iterate over each element in &lt;code&gt;nums&lt;/code&gt;.

&lt;ul&gt;
&lt;li&gt;If the current element &lt;code&gt;num&lt;/code&gt; is greater than &lt;code&gt;currentNumber&lt;/code&gt;, it is a unique number not yet added.&lt;/li&gt;
&lt;li&gt;Update &lt;code&gt;currentNumber&lt;/code&gt; with &lt;code&gt;num&lt;/code&gt; and place &lt;code&gt;num&lt;/code&gt; at the current &lt;code&gt;index&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Increment &lt;code&gt;index&lt;/code&gt; to prepare for the next possible unique number.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;After processing, &lt;code&gt;index&lt;/code&gt; will be the count of unique numbers, and the first &lt;code&gt;index&lt;/code&gt; elements in &lt;code&gt;nums&lt;/code&gt; will be the unique elements.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time complexity&lt;/strong&gt;: The algorithm iterates through the array once, making the time complexity (O(n)) where (n) is the length of the array.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Space complexity&lt;/strong&gt;: The algorithm uses a constant amount of extra space, so the space complexity is (O(1)).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;RemoveDuplicates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;currentNumber&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MinValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;currentNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;currentNumber&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;++]&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;currentNumber&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/MKWTSQzvd58" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With this approach, we efficiently remove duplicates in-place resulting in the desired number of unique elements at the beginning of the array without using any additional space beyond a few variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/" rel="noopener noreferrer"&gt;Remove Duplicates from Sorted Array - LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>leetcode</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>1. Two Sum | LeetCode in C# | Hash Table Solution</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Fri, 08 Nov 2024 11:51:32 +0000</pubDate>
      <link>https://dev.to/junian/two-sum-leetcode-in-c-hash-table-solution-1k74</link>
      <guid>https://dev.to/junian/two-sum-leetcode-in-c-hash-table-solution-1k74</guid>
      <description>&lt;h2&gt;
  
  
  Intuition
&lt;/h2&gt;

&lt;p&gt;Upon revisiting the Two Sum problem, my initial thought was that while a brute force method can solve it, there should be a more efficient way to leverage the data itself to keep track of needed values. A hash table seemed promising, as it could allow for quick look-ups to find whether the complement needed to reach the target sum has been encountered before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;The approach involves using a dictionary to store each number in the array as a key, and its index as the value. As we iterate through the array, for each number 'a', we calculate its complement 'b' such that &lt;code&gt;b = target - a&lt;/code&gt;. We then check if 'b' already exists in the dictionary. If it does, it means we have found the two numbers that make up the target sum, and we can return their indices. If 'b' is not found, we add 'a' to the dictionary with its index. This way, we only traverse the list once, making it much more efficient than the brute force approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time complexity:&lt;/strong&gt; The time complexity is &lt;code&gt;O(n)&lt;/code&gt;, where 'n' is the number of elements in the input array, since we make a single pass over the array and look up operations have constant time complexity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Space complexity:&lt;/strong&gt; The space complexity is also &lt;code&gt;O(n)&lt;/code&gt;because, in the worst case, we might store all the numbers in the dictionary.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Solution&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="nf"&gt;TwoSum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;dict&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Dictionary&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;++)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ContainsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]{&lt;/span&gt;&lt;span class="n"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ContainsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                &lt;span class="n"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]{&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/SlTQmEMW0M0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" width="300" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This approach efficiently solves the problem by reducing the number of operations needed to find the solution, making it suitable for larger datasets compared to the brute force method. Using a dictionary allows for fast look-up times to check the presence of complements, thereby optimizing the solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/problems/two-sum/" rel="noopener noreferrer"&gt;Two Sum - LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>leetcode</category>
      <category>csharp</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Removing Full-Screen Intent Permission from Flutter Android</title>
      <dc:creator>junian</dc:creator>
      <pubDate>Sat, 12 Oct 2024 06:13:36 +0000</pubDate>
      <link>https://dev.to/junian/removing-full-screen-intent-permission-from-flutter-android-12a3</link>
      <guid>https://dev.to/junian/removing-full-screen-intent-permission-from-flutter-android-12a3</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.junian.dev/blog/flutter-android-remove-permission-use-full-screen-intent/" rel="noopener noreferrer"&gt;Junian Dev Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/re-KKieAO_Q" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@JunianDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1acku8dbhpflbouscbk.png" title="Subscribe to Junian Dev YouTube Channel" alt="Subscribe to Junian Dev YouTube Channel" width="300" height="114"&gt;&lt;/a&gt;&lt;br&gt;
Today I'm trying to submit a new version of the Flutter Android app to Google Play Store.&lt;br&gt;
I didn't put any new features, just some bug fixes.&lt;br&gt;
I didn't even change the dependencies.&lt;br&gt;
Normally no issue whatsoever when I send it to the Google Play Store.&lt;/p&gt;

&lt;p&gt;But, something unexpected happened.&lt;br&gt;
I got an error message from the Play Store with the following message.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your app uses the USE_FULL_SCREEN_INTENT permission. From May 31, 2024, some apps may no longer be eligible to have this permission pre-granted at install. Apps that aren't eligible or approved for this, must request permission from the user to launch an activity with full-screen intent. If the permission isn't granted and you don't check for this, your app will crash when full-screen intent is being used.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, this is unusual.&lt;/p&gt;

&lt;p&gt;I didn't use that permission in my app.&lt;br&gt;
So it's probably coming from one of my dependencies.&lt;/p&gt;

&lt;p&gt;Luckily, it's an easy fix.&lt;/p&gt;



&lt;p&gt;To fix this issue, we just need to add a few lines to the &lt;code&gt;AndroidManifest.xml&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;You can find the manifest file at &lt;code&gt;android/app/src/main/AndroidManifest.xml&lt;/code&gt;.&lt;br&gt;
Here's what the content of my manifest file looks like before I fix the issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class="na"&gt;xmlns:android=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.WRITE_EXTERNAL_STORAGE"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.READ_EXTERNAL_STORAGE"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.INTERNET"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;application&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- ... --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's fix it by adding some configuration lines.&lt;/p&gt;

&lt;p&gt;The first one is to add following snippet to &lt;code&gt;manifest&lt;/code&gt; tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;xmlns:tools="http://schemas.android.com/tools"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you also need to add the following user permission removal under the &lt;code&gt;manifest&lt;/code&gt; tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt;
    &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.USE_FULL_SCREEN_INTENT"&lt;/span&gt;
    &lt;span class="na"&gt;tools:node=&lt;/span&gt;&lt;span class="s"&gt;"remove"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final &lt;code&gt;AndroidManifest.xml&lt;/code&gt; file will look something like the following snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class="na"&gt;xmlns:android=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/apk/res/android"&lt;/span&gt;
          &lt;span class="na"&gt;xmlns:tools=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.android.com/tools"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.WRITE_EXTERNAL_STORAGE"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.READ_EXTERNAL_STORAGE"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.INTERNET"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;uses-permission&lt;/span&gt;
        &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.USE_FULL_SCREEN_INTENT"&lt;/span&gt;
        &lt;span class="na"&gt;tools:node=&lt;/span&gt;&lt;span class="s"&gt;"remove"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;application&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- ... --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you make the changes, update your app version, and republish to Google Play Store.&lt;br&gt;
This time it won't have any issue!&lt;/p&gt;

&lt;p&gt;Thanks for reading and have a good day!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>playstore</category>
    </item>
  </channel>
</rss>
