<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ macOS - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ macOS - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:30:21 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/macos/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Install Java on Mac in 2026 ]]>
                </title>
                <description>
                    <![CDATA[ Java is the most widely used programming language for enterprise software, Android development, and university computer science courses. Apple doesn't include Java with macOS, so you need to install i ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-install-java-on-mac/</link>
                <guid isPermaLink="false">69987a933dc17c4862f4c18d</guid>
                
                    <category>
                        <![CDATA[ Java ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Development Tools ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Kehoe ]]>
                </dc:creator>
                <pubDate>Fri, 20 Feb 2026 15:15:31 +0000</pubDate>
                <media:content url="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/5e1e335a7a1d3fcc59028c64/ab23255a-f10d-485b-9fd2-ee247138ed9e.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Java is the most widely used programming language for enterprise software, Android development, and university computer science courses. Apple doesn't include Java with macOS, so you need to install it yourself.</p>
<p>If you search for "install Java on Mac," you'll find a confusing number of vendors, version numbers, and installation methods. To make it easy, I'll cut through the confusion and show you a recommended Java installation path that takes about five minutes.</p>
<p>Here's my recommendation: Install <strong>Java 25</strong> using <strong>Homebrew</strong> with the <strong>Eclipse Temurin</strong> distribution. Java 25 is the current LTS (Long-Term Support) release and your best choice unless your work team or university course uses an older version. With Homebrew, one terminal command accommodates the entire installation. The Temurin distribution is free, certified, and unencumbered by Oracle's licensing restrictions.</p>
<p>Now I’ll walk you through the process.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><p><a href="#heading-what-you-need-before-you-begin">What You Need Before You Begin</a></p>
</li>
<li><p><a href="#heading-how-to-check-if-java-is-already-installed">How to Check if Java Is Already Installed</a></p>
</li>
<li><p><a href="#heading-why-eclipse-temurin-and-why-not-oracle">Why Eclipse Temurin and Why Not Oracle</a></p>
</li>
<li><p><a href="#heading-how-to-install-java-with-homebrew">How to Install Java with Homebrew</a></p>
</li>
<li><p><a href="#heading-how-to-verify-the-installation">How to Verify the Installation</a></p>
</li>
<li><p><a href="#heading-how-to-set-javahome-for-build-tools">How to Set JAVA_HOME for Build Tools</a></p>
</li>
<li><p><a href="#heading-how-to-troubleshoot-common-problems">How to Troubleshoot Common Problems</a></p>
</li>
<li><p><a href="#heading-alternative-installation-methods">Alternative Installation Methods</a></p>
</li>
<li><p><a href="#heading-whats-next">What's Next</a></p>
</li>
</ol>
<h2 id="heading-what-you-need-before-you-begin">What You Need Before You Begin</h2>
<p>With this recommended path, you only need two things before you install Java: a terminal application and the Homebrew package manager.</p>
<h3 id="heading-terminal">Terminal</h3>
<p>Terminal is the built-in <a href="https://mac.install.guide/terminal/">Mac terminal application</a>. If you don’t know, you can learn <a href="https://mac.install.guide/terminal/open">how to open Terminal here</a>. You'll use it to run the installation commands.</p>
<h3 id="heading-homebrew">Homebrew</h3>
<p>Homebrew is a package manager you can use to install software programs for the command line. Check if you already have it like this:</p>
<pre><code class="language-bash">$ brew --version
Homebrew 5.0.11
</code></pre>
<p>If you see a version number, you're ready. If you see <a href="https://mac.install.guide/homebrew/zsh-command-not-found-brew">zsh: command not found: brew</a> you need to install Homebrew first. Follow the instructions at <a href="https://mac.install.guide/homebrew/3">Install Homebrew</a>.</p>
<h2 id="heading-how-to-check-if-java-is-already-installed">How to Check if Java Is Already Installed</h2>
<p>Run this command to check for an existing Java installation:</p>
<pre><code class="language-bash">$ java -version
</code></pre>
<p>You'll see one of two results.</p>
<p><strong>If Java is installed,</strong> you'll see output like this:</p>
<pre><code class="language-bash">openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-25.0.1+8 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (build 25.0.1+8-LTS, mixed mode)
</code></pre>
<p>If the version number shows 25, you already have the latest Java and you can stop here.</p>
<p><strong>If Java is not installed,</strong> you'll see a message, "The operation couldn't be completed. Unable to locate a Java Runtime." You'll need to install Java as described below.</p>
<p>If you previously installed Java but see this dialog, something is wrong with your installation. See <a href="https://mac.install.guide/java/unable-to-locate">Unable to Locate a Java Runtime</a> for troubleshooting. For detailed guidance on Java version output, see <a href="https://mac.install.guide/java/version">Check Java Version on Mac</a>.</p>
<h2 id="heading-why-eclipse-temurin-and-why-not-oracle">Why Eclipse Temurin and Why Not Oracle</h2>
<p>If you search for Java downloads, you'll encounter several potentially confusing terms. Here's what they mean.</p>
<p><strong>JDK</strong> stands for Java Development Kit. It contains the compiler, runtime, and developer tools you need to build and run Java applications. Vendors used to offer a JRE (Java Runtime Environment) for non-developers, but now the JDK does everything.</p>
<p><strong>OpenJDK</strong> is the official open-source implementation of Java. All major Java vendors build from this same source code, so the core functionality is identical across vendors.</p>
<p><strong>Eclipse Temurin</strong> is the distribution many developers recommend. It comes from the Adoptium project and is backed by IBM, Microsoft, Red Hat, and Google, among others. It's completely free for any use, including commercial production. Temurin is TCK-certified, meaning it passes Oracle's official compatibility tests (over 139,000 of them). You can trust that your Java code will run correctly.</p>
<p><strong>Why not Oracle JDK?</strong> Oracle changed its licensing in January 2023. The new model charges per employee across the entire organization, not per Java user. A 500-person company would pay $90,000 per year. Oracle actively audits for compliance.</p>
<p>Temurin is functionally identical to Oracle JDK and is free to use under its open‑source license, avoiding Oracle’s Java subscription fees.</p>
<p>If you deploy to AWS, Amazon Corretto is another good free option. If you need Java 8 for legacy code, Azul Zulu provides well-supported builds. For a comparison of Java distributions, see <a href="https://mac.install.guide/java/jdk">Install JDK on Mac</a>.</p>
<h2 id="heading-how-to-install-java-with-homebrew">How to Install Java with Homebrew</h2>
<p>Homebrew offers two ways to install Java: the cask method and the formula method. The cask method is easier because it installs the vendor's macOS package to the standard system location. Apple's macOS discovers it automatically with no extra configuration.</p>
<p>Run these two commands:</p>
<pre><code class="language-bash">$ brew update
$ brew install --cask temurin@25
</code></pre>
<p>The first command refreshes Homebrew's package list. The second downloads and installs Eclipse Temurin JDK 25.</p>
<p>Homebrew places the JDK at <code>/Library/Java/JavaVirtualMachines/temurin-25.jdk/</code>. This is the standard macOS location for Java installations. Apple's macOS includes a Java launcher at <code>/usr/bin/java</code> that automatically searches this directory. You don't need to configure your PATH.</p>
<p>Homebrew also detects your Mac's chip architecture automatically. You'll get the correct native build whether you have an Apple Silicon or Intel Mac.</p>
<p>For more details about the Homebrew installation process, including the alternative formula method and troubleshooting, see <a href="https://mac.install.guide/java/brew-cask">Brew Install Java, Cask Method</a>.</p>
<h2 id="heading-how-to-verify-the-installation">How to Verify the Installation</h2>
<p>After installation, open a new Terminal window. Existing windows may not detect the new installation.</p>
<p>Check the Java version:</p>
<pre><code class="language-bash">$ java -version
openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-25.0.1+8 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (build 25.0.1+8-LTS, mixed mode)
</code></pre>
<p>This confirms three things: the version number (25.0.1), the distribution (Temurin), and that the 64-Bit Server VM is active.</p>
<p>Check the compiler:</p>
<pre><code class="language-bash">$ javac -version
javac 25.0.1
</code></pre>
<p>List all installed JDKs:</p>
<pre><code class="language-bash">$ /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
    25.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 25.0.1" /Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
</code></pre>
<p>If all three commands produce the expected output, Java is installed and working.</p>
<h2 id="heading-how-to-set-javahome-for-build-tools">How to Set JAVA_HOME for Build Tools</h2>
<p>For most users, Java works immediately after installation. The <code>java</code> and <code>javac</code> commands are available with no additional setup.</p>
<p>However, some build tools require the <code>JAVA_HOME</code> environment variable. Apache Maven, Gradle, and Android SDK all look for it. If you see errors mentioning "JAVA_HOME is not set," you need this step.</p>
<p>If you only run Java applications or use IntelliJ IDEA (which manages Java paths internally), you can skip this section.</p>
<p>Add this line to your <code>~/.zprofile</code> file:</p>
<pre><code class="language-bash">export JAVA_HOME=$(/usr/libexec/java_home)
</code></pre>
<p>This uses Apple's <code>java_home</code> utility to find the installed JDK automatically. After saving the file, you'll need to run <code>source ~/.zprofile</code> or close and reopen your terminal. Verify it works:</p>
<pre><code class="language-bash">\( echo \)JAVA_HOME
/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
</code></pre>
<p>For complete configuration instructions, see <a href="https://mac.install.guide/java/java-home">Set JAVA_HOME on Mac</a>.</p>
<h2 id="heading-how-to-troubleshoot-common-problems">How to Troubleshoot Common Problems</h2>
<p><strong>"Unable to locate a Java Runtime" message keeps appearing.</strong> Run <code>java -version</code> to verify Java is installed. If you just installed Java, see <a href="https://mac.install.guide/java/unable-to-locate">Unable to Locate a Java Runtime</a>.</p>
<p><strong>Wrong Java version appears.</strong> You have multiple JDKs installed and macOS selected a different one. Run <code>/usr/libexec/java_home -V</code> to list all installed versions. See <a href="https://mac.install.guide/java/java-home">Set JAVA_HOME on Mac</a> to point to the version you want.</p>
<h2 id="heading-alternative-installation-methods">Alternative Installation Methods</h2>
<p>Homebrew is the fastest path, but other options exist.</p>
<ol>
<li><p><strong>Manual download</strong>: You can download the .pkg installer directly from <a href="http://adoptium.net">adoptium.net</a> and double-click to install. This is a good choice if you don't use Homebrew. See <a href="https://mac.install.guide/java/install">Install Java on Mac</a> for detailed instructions.</p>
</li>
<li><p><strong>Homebrew formula.</strong> The command <code>brew install openjdk@25</code> installs a Homebrew-managed build. This approach requires manual symlink configuration before macOS can discover it. See <a href="https://mac.install.guide/java/brew-formula">Brew Install Java, Formula Method</a> for details.</p>
</li>
<li><p><strong>Version managers.</strong> Tools like SDKMAN and mise can install and switch between multiple Java versions per project. If you work on codebases that require different Java versions, see <a href="https://mac.install.guide/java/version-managers">Java Version Managers</a>.</p>
</li>
</ol>
<h2 id="heading-whats-next">What's Next</h2>
<p>You now have Java 25 installed on your Mac. You've verified it works and configured <code>JAVA_HOME</code> for build tools. You're ready to compile and run Java applications.</p>
<p>If your team or university course requires Java 21 instead, see <a href="https://mac.install.guide/java/java-21">Install Java 21 on Mac</a>. If you need to remove Java, see <a href="https://mac.install.guide/java/uninstall">Uninstall Java on Mac</a>.</p>
<p>This article is based on my guides that offer additional details about how to <a href="https://mac.install.guide/java/install">install Java on Mac</a> and choose the <a href="https://mac.install.guide/java/new">latest Java version</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Fix the Python ENOENT Error When Setting Up MCP Servers – A Complete Guide ]]>
                </title>
                <description>
                    <![CDATA[ Getting the "spawn python ENOENT" error while setting up an MCP (Model Context Protocol) server on macOS can be frustrating. But don't worry – in this tutorial, I'll guide you through fixing it by rebuilding your Python virtual environment. By the en... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-fix-the-python-enoent-error-when-setting-up-mcp-servers-a-complete-guide/</link>
                <guid isPermaLink="false">68963890790ac4491c15b00a</guid>
                
                    <category>
                        <![CDATA[ mcp server ]]>
                    </category>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blockchain ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Developer ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Beginner Developers ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Idris Olubisi ]]>
                </dc:creator>
                <pubDate>Fri, 08 Aug 2025 17:49:04 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754675334533/6a05e45a-9703-49c0-b427-6c4960c01d86.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Getting the "spawn python ENOENT" error while setting up an MCP (Model Context Protocol) server on macOS can be frustrating. But don't worry – in this tutorial, I'll guide you through fixing it by rebuilding your Python virtual environment.</p>
<p>By the end, you'll have a fully functional MCP server integrated with Claude Desktop in about 10 minutes. This solution applies to any MCP setup facing this standard error after Python upgrades.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><p><a class="post-section-overview" href="#heading-what-causes-the-enoent-error">What Causes the ENOENT Error?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-prerequisites">Prerequisites</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-diagnose-your-broken-virtual-environment">How to Diagnose Your Broken Virtual Environment</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-completely-rebuild-your-virtual-environment">How to Completely Rebuild Your Virtual Environment</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-install-mcp-server-dependencies">How to Install MCP Server Dependencies</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-locate-your-server-files">How to Locate Your Server Files</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-test-your-server-setup">How to Test Your Server Setup</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-configure-claude-desktop">How to Configure Claude Desktop</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-restart-claude-desktop-and-test-integration">How to Restart Claude Desktop and Test Integration</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-understanding-mcp-server-capabilities">Understanding MCP Server Capabilities</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-alternative-installation-methods">Alternative Installation Methods</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-method-1-direct-package-installation">Method 1: Direct Package Installation</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-method-2-using-uv-package-manager">Method 2: Using UV Package Manager</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-prevent-future-enoent-errors">How to Prevent Future ENOENT Errors</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-troubleshooting-common-issues">Troubleshooting Common Issues</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ol>
<h2 id="heading-what-causes-the-enoent-error">What Causes the ENOENT Error?</h2>
<p>The ENOENT (Error NO ENTry) error means your system can’t locate the Python executable at the specified path. This occurs when the file is missing or inaccessible.</p>
<p>On macOS, this typically happens when:</p>
<ul>
<li><p>You've upgraded Python through Homebrew</p>
</li>
<li><p>The <code>brew cleanup</code> command removed old Python versions</p>
</li>
<li><p>Your virtual environment's symlinks now point to non-existent files</p>
</li>
</ul>
<p>What makes this particularly challenging is that your virtual environment folder still exists – it looks fine from the outside, but the Python executable inside is completely broken.</p>
<p>When MCP servers try to spawn Python processes using these broken paths, you get the dreaded ENOENT error. This affects any Python-based MCP server, whether you're building custom tools, connecting to APIs, or working with file systems.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>To follow this tutorial, you'll need:</p>
<ul>
<li><p>macOS with <a target="_blank" href="https://brew.sh/">Homebrew</a> installed</p>
</li>
<li><p>Python 3.10 or higher</p>
</li>
<li><p>An MCP server repository cloned locally</p>
</li>
<li><p><a target="_blank" href="https://claude.ai/download">Claude Desktop</a> installed</p>
</li>
<li><p>Basic familiarity with terminal commands and Python virtual environments</p>
</li>
</ul>
<p>If you haven't cloned an MCP server repository yet, you can start with any open-source MCP server. For this tutorial, I'll use generic examples that work with any MCP setup:</p>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> https://github.com/your-username/your-mcp-server.git
<span class="hljs-built_in">cd</span> your-mcp-server
</code></pre>
<h2 id="heading-how-to-diagnose-your-broken-virtual-environment">How to Diagnose Your Broken Virtual Environment</h2>
<p>First, you need to confirm that your virtual environment is actually the problem. Open your terminal and navigate to your MCP directory:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> /path/to/your/mcp-server
</code></pre>
<p>Now check if your Python executable exists:</p>
<pre><code class="lang-bash">ls -la venv/bin/python*
</code></pre>
<p>If you see broken symlinks or get "No such file or directory" errors, you've found your problem. You might see output like:</p>
<pre><code class="lang-bash">lrwxr-xr-x  1 username  staff  16 Jan  1 12:00 python -&gt; /usr/<span class="hljs-built_in">local</span>/bin/python3.11
lrwxr-xr-x  1 username  staff  16 Jan  1 12:00 python3 -&gt; /usr/<span class="hljs-built_in">local</span>/bin/python3.11
</code></pre>
<p>But when you try to run these Python executables:</p>
<pre><code class="lang-bash">./venv/bin/python --version
</code></pre>
<p>You'll get an error because the target files no longer exist. This confirms your virtual environment is broken and needs rebuilding.</p>
<h2 id="heading-how-to-completely-rebuild-your-virtual-environment">How to Completely Rebuild Your Virtual Environment</h2>
<p>The most reliable solution is to rebuild your virtual environment from scratch. This ensures all paths and dependencies are correctly configured for your current Python installation.</p>
<p>Here's your step-by-step rebuild process:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Make sure you're in the MCP server directory</span>
<span class="hljs-built_in">cd</span> /path/to/your/mcp-server

<span class="hljs-comment"># Remove the corrupted virtual environment</span>
rm -rf venv

<span class="hljs-comment"># Create a fresh virtual environment</span>
python3 -m venv venv

<span class="hljs-comment"># Activate the new environment</span>
<span class="hljs-built_in">source</span> venv/bin/activate
</code></pre>
<p>You should now see <code>(venv)</code> in your terminal prompt, indicating the virtual environment is active. This prefix confirms you're working within the isolated Python environment.</p>
<h2 id="heading-how-to-install-mcp-server-dependencies">How to Install MCP Server Dependencies</h2>
<p>With your fresh virtual environment active, install the MCP server and its dependencies. The exact installation command depends on your specific MCP server, but typically follows one of these patterns:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># For package-based installation</span>
pip install -e .

<span class="hljs-comment"># Or for requirements file</span>
pip install -r requirements.txt

<span class="hljs-comment"># Or for specific MCP frameworks</span>
pip install fastmcp
</code></pre>
<p>Common MCP server dependencies include:</p>
<ul>
<li><p>FastMCP for the server framework</p>
</li>
<li><p>JSON-RPC libraries for communication protocols</p>
</li>
<li><p>HTTP clients for API integrations</p>
</li>
<li><p>File system utilities for local operations</p>
</li>
</ul>
<p>The installation process displays all packages as they install. Don't worry if you see deprecation warnings – they're normal and won't affect functionality.</p>
<h2 id="heading-how-to-locate-your-server-files">How to Locate Your Server Files</h2>
<p>After installation, identify where your main server file lives. Run this command to find all server.py files:</p>
<pre><code class="lang-bash">find . -name <span class="hljs-string">"server.py"</span> -<span class="hljs-built_in">type</span> f
</code></pre>
<p>You may see results like:</p>
<ul>
<li><p><code>./server.py</code> (in the root directory)</p>
</li>
<li><p><code>./src/server.py</code> (in a source directory)</p>
</li>
<li><p><code>./mcp_server/server.py</code> (in a package directory)</p>
</li>
</ul>
<p>Check your current directory structure:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>Look for the main server entry point. Most MCP servers follow standard Python project structures with either a root-level server file or one nested in a package directory.</p>
<h2 id="heading-how-to-test-your-server-setup">How to Test Your Server Setup</h2>
<p>Now you’ll want to test your server to ensure it's working correctly. Start with the main server file you identified:</p>
<pre><code class="lang-bash">python server.py
</code></pre>
<p>If this is the correct server and everything is configured correctly, you'll see output similar to:</p>
<pre><code class="lang-typescript">╭─ MCP Server ───────────────────────────────────────────────────────────────╮
│ 🖥️  Server name: Example-MCP                                              │
│ 📦 Transport: STDIO                                                        │
│ 🤝 Protocol: <span class="hljs-built_in">JSON</span>-RPC                                                      │
╰────────────────────────────────────────────────────────────────────────────╯
[INFO] Starting MCP server <span class="hljs-keyword">with</span> transport <span class="hljs-string">'stdio'</span>
[INFO] Server ready <span class="hljs-keyword">for</span> connections
</code></pre>
<p>This output confirms your MCP server is working correctly. The server uses standard input/output (STDIO) for communication, which is perfect for Claude Desktop integration. You can stop the server with <code>Ctrl+C</code>.</p>
<h2 id="heading-how-to-configure-claude-desktop">How to Configure Claude Desktop</h2>
<p>Now that your server runs properly, configure Claude Desktop to connect to it. The configuration file location depends on your operating system:</p>
<p><strong>For macOS:</strong></p>
<pre><code class="lang-bash">~/Library/Application Support/Claude/claude_desktop_config.json
</code></pre>
<p><strong>For Windows:</strong></p>
<pre><code class="lang-bash">%APPDATA%\Claude\claude_desktop_config.json
</code></pre>
<p><strong>For Linux:</strong></p>
<pre><code class="lang-bash">~/.config/Claude/claude_desktop_config.json
</code></pre>
<p>Create or edit this file with your exact paths. Your configuration should look like this:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"mcpServers"</span>: {
    <span class="hljs-attr">"example-mcp"</span>: {
      <span class="hljs-attr">"command"</span>: <span class="hljs-string">"/Users/yourusername/path/to/mcp-server/venv/bin/python"</span>,
      <span class="hljs-attr">"args"</span>: [<span class="hljs-string">"/Users/yourusername/path/to/mcp-server/server.py"</span>],
      <span class="hljs-attr">"cwd"</span>: <span class="hljs-string">"/Users/yourusername/path/to/mcp-server"</span>
    }
  }
}
</code></pre>
<p>Replace <code>/Users/yourusername/path/to/mcp-server/</code> with your actual path. You can get your precise path by running <code>pwd</code> in your MCP server directory.</p>
<p>The configuration tells Claude Desktop:</p>
<ul>
<li><p>Which Python interpreter to use (from your virtual environment)</p>
</li>
<li><p>Where to find the server script</p>
</li>
<li><p>Which directory to run the server from</p>
</li>
</ul>
<h2 id="heading-how-to-restart-claude-desktop-and-test-integration">How to Restart Claude Desktop and Test Integration</h2>
<p>After saving your configuration file, altogether quit Claude Desktop (not just close the window). On macOS, use <code>Cmd+Q</code> or right-click the dock icon and select Quit. Then restart Claude Desktop.</p>
<p>Once Claude Desktop is running again, test your MCP integration. You can verify the connection by:</p>
<ol>
<li><p>Looking for your MCP server name in Claude's interface</p>
</li>
<li><p>Testing basic MCP functionality with prompts like:</p>
<ul>
<li><p>"What MCP tools are available?"</p>
</li>
<li><p>"Can you check the MCP server status?"</p>
</li>
<li><p>"Show me the available MCP commands"</p>
</li>
</ul>
</li>
</ol>
<p>If everything is working correctly, Claude will respond using the MCP server tools, confirming successful integration.</p>
<h2 id="heading-understanding-mcp-server-capabilities">Understanding MCP Server Capabilities</h2>
<p>MCP servers extend Claude's capabilities by providing structured access to external tools and data sources. Common MCP server implementations include:</p>
<ol>
<li><p>File system operations: MCP servers can provide controlled access to local files, allowing Claude to read, analyze, and process documents while maintaining security boundaries.</p>
</li>
<li><p>API integrations: Connect Claude to external services through MCP servers that handle authentication, rate limiting, and data formatting for various APIs.</p>
</li>
<li><p>Database connections: Query databases safely through MCP servers that manage connections, handle credentials securely, and format results for Claude's consumption.</p>
</li>
<li><p>Custom tools: Build specialized tools for your workflow, from code analysis to data processing, all accessible through the standardized MCP interface.</p>
</li>
</ol>
<p>The beauty of MCP is its flexibility – you can create servers for virtually any tool or service you need Claude to interact with.</p>
<h2 id="heading-alternative-installation-methods">Alternative Installation Methods</h2>
<p>If you want more streamlined approaches for future setups, here are two excellent alternatives:</p>
<h3 id="heading-method-1-direct-package-installation">Method 1: Direct Package Installation</h3>
<p>For MCP servers available as packages, you can install directly:</p>
<pre><code class="lang-bash">pip install mcp-server-package
</code></pre>
<p>Then use this simpler configuration:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"mcpServers"</span>: {
    <span class="hljs-attr">"example-mcp"</span>: {
      <span class="hljs-attr">"command"</span>: <span class="hljs-string">"mcp-server-command"</span>
    }
  }
}
</code></pre>
<p>This method works when the MCP server provides a command-line entry point through its setup configuration.</p>
<h3 id="heading-method-2-using-uv-package-manager">Method 2: Using UV Package Manager</h3>
<p>UV provides more robust dependency management – perfect if you're tired of Python version conflicts:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Install UV</span>
curl -LsSf https://astral.sh/uv/install.sh | sh

<span class="hljs-comment"># Use UV in your configuration</span>
{
  <span class="hljs-string">"mcpServers"</span>: {
    <span class="hljs-string">"example-mcp"</span>: {
      <span class="hljs-string">"command"</span>: <span class="hljs-string">"uv"</span>,
      <span class="hljs-string">"args"</span>: [
        <span class="hljs-string">"run"</span>,
        <span class="hljs-string">"--with"</span>, <span class="hljs-string">"fastmcp"</span>,
        <span class="hljs-string">"python"</span>,
        <span class="hljs-string">"/path/to/mcp-server/server.py"</span>
      ],
      <span class="hljs-string">"cwd"</span>: <span class="hljs-string">"/path/to/mcp-server"</span>
    }
  }
}
</code></pre>
<p>UV automatically manages Python versions and dependencies, reducing the likelihood of environment-related errors.</p>
<h2 id="heading-how-to-prevent-future-enoent-errors">How to Prevent Future ENOENT Errors</h2>
<p>To avoid this issue in the future, follow these best practices:</p>
<h3 id="heading-1-use-virtual-environment-copies-instead-of-symlinks">1. Use Virtual Environment Copies Instead of Symlinks</h3>
<p>When creating virtual environments, use the <code>--copies</code> flag:</p>
<pre><code class="lang-bash">python3 -m venv venv --copies
</code></pre>
<p>This creates actual copies of files instead of symlinks, making your environment more resilient to Python upgrades.</p>
<h3 id="heading-2-pin-your-homebrew-python-version">2. Pin Your Homebrew Python Version</h3>
<p>Prevent automatic Python upgrades that break environments:</p>
<pre><code class="lang-bash">brew pin python@3.11
</code></pre>
<p>Remember to unpin when you're ready to upgrade intentionally.</p>
<h3 id="heading-3-create-a-health-check-script">3. Create a Health Check Script</h3>
<p>Save this script as <code>health_check.sh</code> in your MCP server directory:</p>
<pre><code class="lang-bash"><span class="hljs-meta">#!/bin/bash</span>
<span class="hljs-comment"># health_check.sh</span>
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Checking Python virtual environment..."</span>
<span class="hljs-built_in">source</span> venv/bin/activate

python -c <span class="hljs-string">"import sys; print(f'Python: {sys.executable}')"</span>
python -c <span class="hljs-string">"print('✓ Python is working')"</span>

<span class="hljs-comment"># Check for common MCP dependencies</span>
python -c <span class="hljs-string">"import json; print('✓ JSON module available')"</span>
python -c <span class="hljs-string">"import asyncio; print('✓ Asyncio available')"</span>

<span class="hljs-built_in">echo</span> <span class="hljs-string">"Health check complete!"</span>
</code></pre>
<p>Make it executable and run it periodically:</p>
<pre><code class="lang-bash">chmod +x health_check.sh
./health_check.sh
</code></pre>
<h3 id="heading-4-document-your-python-version">4. Document Your Python Version</h3>
<p>Create a <code>.python-version</code> file in your project:</p>
<pre><code class="lang-bash">python --version &gt; .python-version
</code></pre>
<p>This helps you remember which Python version the project was built with.</p>
<h2 id="heading-troubleshooting-common-issues">Troubleshooting Common Issues</h2>
<p>Even with the fix applied, you might encounter these challenges:</p>
<h3 id="heading-import-errors">Import Errors</h3>
<p>If you see import-related errors, ensure all dependencies are installed:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">source</span> venv/bin/activate
pip list  <span class="hljs-comment"># Check installed packages</span>
pip install -r requirements.txt  <span class="hljs-comment"># Reinstall if needed</span>
</code></pre>
<h3 id="heading-permission-denied-errors">Permission Denied Errors</h3>
<p>Make sure your server file is executable:</p>
<pre><code class="lang-bash">chmod +x server.py
</code></pre>
<h3 id="heading-claude-desktop-not-finding-the-server">Claude Desktop Not Finding the Server</h3>
<p>Double-check your configuration paths are absolute, not relative:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Good - absolute path</span>
<span class="hljs-string">"/Users/username/projects/mcp-server/server.py"</span>

<span class="hljs-comment"># Bad - relative path</span>
<span class="hljs-string">"./server.py"</span>
</code></pre>
<h3 id="heading-server-starts-but-claude-cant-connect">Server Starts, But Claude Can't Connect</h3>
<p>Verify that the transport method matches between your server and the configuration. Most MCP servers use STDIO, but some might use HTTP or WebSocket transports.</p>
<h3 id="heading-multiple-python-installations">Multiple Python Installations</h3>
<p>If you have multiple Python versions, be explicit about which one to use:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Check available Python versions</span>
ls -la /usr/<span class="hljs-built_in">local</span>/bin/python*

<span class="hljs-comment"># Use a specific version</span>
/usr/<span class="hljs-built_in">local</span>/bin/python3.11 -m venv venv
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>You've successfully fixed the "spawn python ENOENT" error by rebuilding your Python virtual environment and properly configuring your MCP server for Claude Desktop. You've also learned how to prevent future mistakes and troubleshoot common issues.</p>
<p>With your MCP server running smoothly, you can now:</p>
<ul>
<li><p>Build custom tools that extend Claude's capabilities</p>
</li>
<li><p>Create integrations with your favorite services</p>
</li>
<li><p>Develop specialized workflows for your specific needs</p>
</li>
<li><p>Share your MCP servers with the community</p>
</li>
</ul>
<p>The <a target="_blank" href="https://www.anthropic.com/news/model-context-protocol">MCP</a> ecosystem is growing rapidly, with new servers and tools being developed constantly. Whether you're building file system tools, API integrations, or custom utilities, you now have the foundation to create and maintain robust MCP servers.</p>
<p>Happy building, and enjoy your error-free development journey! For more tutorials, follow my work on <a target="_blank" href="https://github.com/Olanetsoft">GitHub</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Apple Code Signing Handbook ]]>
                </title>
                <description>
                    <![CDATA[ In this handbook, I’ll demystify the Apple app code signing process. Apple's ecosystem is powerful, but its distribution mechanisms – with various identifiers, certificates, and profiles – can appear complex. This guide attempts to make that journey ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/apple-code-signing-handbook/</link>
                <guid isPermaLink="false">68489084490c709f6b3070ed</guid>
                
                    <category>
                        <![CDATA[ Apple ]]>
                    </category>
                
                    <category>
                        <![CDATA[ iOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Apps ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ handbook ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sravan Karuturi ]]>
                </dc:creator>
                <pubDate>Tue, 10 Jun 2025 20:07:32 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1749585600223/49e9c922-0b5d-4a98-a619-eedfd7a8b617.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this handbook, I’ll demystify the Apple app code signing process. Apple's ecosystem is powerful, but its distribution mechanisms – with various identifiers, certificates, and profiles – can appear complex. This guide attempts to make that journey more manageable and straightforward for you.</p>
<p>Throughout this handbook, you will learn how to:</p>
<ul>
<li><p>Correctly establish and manage an app's unique identity.</p>
</li>
<li><p>Understand the roles of different Apple developer certificates and how to create and manage them.</p>
</li>
<li><p>Differentiate between various types of provisioning profiles and know when to use each one.</p>
</li>
</ul>
<p>This guide is geared towards new developers who want to learn how the code signing process works, but it should also be useful experienced developers who want or need to refresh their memory.</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>While there are no hard prerequisites to understanding the certificates, bundles, and provisioning profiles for distributing on Apple platforms, it helps to have an Apple developer account to follow along.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-app-ids-bundle-ids-your-apps-identity">App IDs, Bundle IDs – Your App’s Identity</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-understanding-distribution-a-deep-dive-into-certificates">Understanding Distribution: A Deep Dive into Certificates</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-bridge-between-everything-provisioning-profiles">Bridge between everything: Provisioning Profiles</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-device-management-development-and-ad-hoc-builds">Device management – Development and Ad Hoc Builds</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-possibilities-enabling-capabilities-and-services">Possibilities: Enabling Capabilities and Services</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-app-ids-bundle-ids-your-apps-identity"><strong>App IDs, Bundle IDs — Your App’s Identity</strong></h2>
<p>The Bundle ID and the corresponding App ID registered with Apple form the basis of an application’s identity. Establishing these correctly from the beginning is very important, as errors or misconfigurations here can lead to significant complications down the line, particularly once you’ve submitted your app to App Store Connect.</p>
<h3 id="heading-understanding-cfbundleidentifier-bundle-id">Understanding <code>CFBundleIdentifier</code> (Bundle ID)</h3>
<h4 id="heading-what-is-the-bundle-id">What is the “Bundle ID”?</h4>
<p>Think of the Bundle ID as a unique name or a fingerprint for your app. The <code>CFBundleIdentifier</code>, more commonly known as the <strong>Bundle ID</strong>, is a string that uniquely identifies your application.</p>
<p>This identifier is not just a name – it serves multiple crucial purposes.</p>
<ul>
<li><p>The operating system relies on it to apply specific preferences and settings to an app.</p>
</li>
<li><p>This is used to launch the application from other apps etc.</p>
</li>
<li><p>It plays an essential role in the validation of an app's code signature, ensuring the app's integrity and authenticity.</p>
</li>
<li><p>The Bundle ID defined in an app's Info.plist file must exactly match the Bundle ID registered for the app in App Store Connect for successful submission and distribution.</p>
</li>
</ul>
<p>The Bundle ID string must adhere to specific character limitations: it can only contain alphanumeric characters <code>A-Z, a-z, 0-9</code>, hyphens <code>-</code>, and periods <code>.</code>. It's important to note that Bundle IDs are treated as <strong>case-insensitive</strong> by the system.</p>
<h3 id="heading-how-to-choose-and-format-your-bundle-id-reverse-dns-and-best-practices">How to Choose and Format Your Bundle ID (Reverse-DNS and Best Practices)</h3>
<p>Apple highly recommends, and it is standard practice, to use a reverse-DNS (Domain Name System) format for Bundle IDs.</p>
<p>A common example would be <code>com.yourcompanyname.appname</code>. This convention leverages the global uniqueness of domain names to help ensure the global uniqueness of Bundle IDs.</p>
<p>If an organization uses its unique domain name (for example, <code>sravan.gg</code> becomes <code>gg.sravan</code> ) as the prefix, and the app name is unique within that organization, the resulting Bundle ID (for example, <code>gg.sravan.mycoolapp</code> ) is highly likely to be unique worldwide.</p>
<p><strong>Sidenote</strong>: While Xcode won’t stop you from creating something like <code>com.google.mapping</code> or something like that even if you don’t work at Google, this will most likely get rejected when it goes through the AppStore review process. This is because this implies ownership of that domain. So, while it’s technically possible when starting out, you shouldn’t use domains that don’t belong to you.</p>
<p>The fundamental nature of the Bundle ID as a unique, system-wide identifier – coupled with its immutability after an app is first uploaded to App Store Connect – means that you should treat its selection with the same seriousness as choosing a <strong>permanent, unchangeable identifier</strong> for a critical entity. A mistake in the Bundle ID after this point can necessitate creating an entirely new app listing on the App Store.</p>
<h3 id="heading-app-ids-in-the-apple-developer-portal-explicit-vs-wildcard">App IDs in the Apple Developer Portal: Explicit vs. Wildcard</h3>
<h4 id="heading-which-one-do-you-need">Which One Do You Need?</h4>
<p>In the Apple Developer Portal, developers register an "App ID." This App ID is a record that links one or more applications from a single development team to specific app services (capabilities) and is used in provisioning profiles. We’ll learn more about this in the following sections.</p>
<p>There are two main types of App IDs:</p>
<ul>
<li><p><strong>Explicit App ID:</strong> This type is used for a single application. The Bundle ID specified within an explicit App ID must be an exact match for the CFBundleIdentifier in the app's Info.plist file (for example, <code>com.mycompany.myapp</code>). Explicit App IDs are required for apps that use many of Apple's specific services and capabilities, such as In-App Purchases (which are enabled by default for explicit App IDs), Push Notifications, iCloud, HealthKit, and Sign in with Apple.</p>
</li>
<li><p><strong>Wildcard App ID:</strong> This type can be used for a set of applications that share a common Bundle ID prefix. It contains an asterisk (*) as the last part of its Bundle ID string (for example, <code>com.mycompany.*</code>). This wildcard App ID would match any app whose Bundle ID starts with <code>com.mycompany.</code>, such as <a target="_blank" href="http://com.mycompany.app"><code>com.mycompany.app</code></a> or <code>com.mycompany.utility</code>. But you can’t use wildcard App IDs if the app requires services or capabilities that mandate an explicit App ID.</p>
</li>
</ul>
<p>The choice between an explicit and a wildcard App ID has significant implications. The App ID acts as a central registration point, and the capabilities are "enabled" for this registration – more on capabilities later in this handbook.</p>
<p>You can think of an explicit App ID as a specific key designed to unlock extra "keyholes" (capabilities). A wildcard App ID, being more generic, might not fit these extra keyholes. If you choose a wildcard App ID initially for convenience, but you need a feature requiring an explicit App ID (like Push Notifications) later, you’ll be forced to create a new explicit App ID and reconfigure associated settings and provisioning profiles.</p>
<p>So, make sure you carefully consider your current and future app features when selecting an App ID type. The following table provides a quick comparison**.**</p>
<p>My personal recommendation is always go with explicit App Ids unless you need the flexibility of wildcard app ids.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Feature</strong></td><td><strong>Explicit App ID</strong></td><td><strong>Wildcard App ID</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Bundle ID Match</strong></td><td>Exact match (for example, <a target="_blank" href="http://com.foo.bar">com.foo.bar</a>)</td><td>Suffix match (for example, <a target="_blank" href="http://com.foo">com.foo</a>.*)</td></tr>
<tr>
<td><strong>Use Case</strong></td><td>Single app</td><td>Set of apps with similar base ID</td></tr>
<tr>
<td><strong>Capabilities</strong></td><td>Supports all capabilities</td><td>Limited (cannot use services requiring explicit IDs)</td></tr>
<tr>
<td><strong>Uniqueness</strong></td><td>Globally unique identifier for one specific app</td><td>Identifies a group of apps</td></tr>
</tbody>
</table>
</div><h3 id="heading-step-by-step-how-to-register-your-app-id-in-the-apple-developer-portal">Step-by-Step: How to Register Your App ID in the Apple Developer Portal</h3>
<p>To register an App ID, an you’ll need an <strong>Apple Developer Program membership</strong>. Also, the actions must be performed by someone with an Account Holder or Admin role.</p>
<p>The process is as follows:</p>
<ol>
<li><p>Sign in to the Apple Developer Portal and navigate to "Certificates, Identifiers &amp; Profiles," then select "Identifiers" from the sidebar.</p>
</li>
<li><p>Click the “Add button (+)” to create a new identifier.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748642247245/a24b527f-e810-4a9c-b75a-dcd3d189b1d1.png" alt="Picture depicting the Add button" class="image--center mx-auto" width="1130" height="404" loading="lazy"></p>
</li>
<li><p>Select "App IDs" from the list of options and click "Continue."</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748642283885/851f64f3-e608-4fb7-9f31-bd30adb64beb.png" alt="851f64f3-e608-4fb7-9f31-bd30adb64beb" class="image--center mx-auto" width="1628" height="704" loading="lazy"></p>
</li>
<li><p>Make sure that the "App" type is selected (it usually is by default) and click "Continue."</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748642318142/a7b28529-bbe6-4240-953e-836de3e948ac.png" alt="App type selection" class="image--center mx-auto" width="1526" height="766" loading="lazy"></p>
</li>
<li><p>Enter a "Description" for the App ID. This is for your reference within the portal (for example, "My very cool App ID").</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748642392862/a5322cf5-3d75-4b0b-93bf-d46dd1ce8afe.png" alt="App Id registration screen" class="image--center mx-auto" width="2446" height="698" loading="lazy"></p>
</li>
<li><p>Choose the "App ID Type": "Explicit" or "Wildcard."</p>
</li>
<li><p>For an "Explicit App ID," enter the exact Bundle ID that will be used in your Xcode project (for example, <code>com.yourcompany.yourapp</code>). For a "Wildcard App ID," enter a Bundle ID suffix ending with an asterisk (for example, <code>com.yourcompany.*</code>).</p>
</li>
<li><p>Scroll down to the "Capabilities" section and select the checkboxes for any app services your app will use. Some capabilities might require further configuration at this stage or later. (Again, we’ll cover app capabilities in more detail later on).</p>
</li>
<li><p>Click "Continue," review all the details carefully, and then click "Register" to finalize the App ID creation.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748642432661/2052a435-ed0e-404a-9178-7d6541fc9421.png" alt="Confirm the App ID screen" class="image--center mx-auto" width="2486" height="708" loading="lazy"></p>
</li>
</ol>
<h3 id="heading-how-to-manage-your-bundle-id-xcode-app-store-connect-and-the-point-of-no-return">How to Manage Your Bundle ID: Xcode, App Store Connect, and the Point of No Return</h3>
<p>The Bundle ID specified in an Xcode project is critical. To set it:</p>
<ol>
<li><p>In the Xcode project navigator, select the target for your app.</p>
</li>
<li><p>Open the "Signing &amp; Capabilities" tab.</p>
</li>
<li><p>Expand the "Signing" section.</p>
</li>
<li><p>In the "Bundle Identifier" text field, enter the Bundle ID. This identifier must precisely match the Bundle ID associated with an explicit App ID registered in the Developer Portal, or conform to the pattern of a wildcard App ID if applicable.</p>
</li>
</ol>
<p>It's important to understand the difference between the "Bundle ID" (or <code>CFBundleIdentifier</code>) in the Xcode project and the "App ID" registered in the Developer Portal. The "App ID" in the developer portal is an entity that <em>contains</em> a “Bundle ID” string (either explicit or wildcard). The string in your Xcode project's "Bundle Identifier" field must match this contained string.</p>
<p>When preparing for distribution via TestFlight or the App Store, you’ll need to create an app record in App Store Connect. The Bundle ID you enter during this app record creation must exactly match the Bundle ID in the Xcode project.</p>
<h4 id="heading-a-critical-warning-immutability-after-first-upload">A Critical Warning: Immutability After First Upload</h4>
<p>This is a point of no return: Once you upload a build of an app to App Store Connect, the Bundle ID for that app record <strong>cannot be changed</strong>.</p>
<p>In addition, after an upload, you can’t delete the associated explicit App ID registered in the Developer Portal. This immutability highlights the need for <em>careful planning and verification</em> of the Bundle ID before any uploads occur.</p>
<p>If you prefer programmatic management or automation, the App Store Connect API provides resources for managing Bundle IDs. You can <a target="_blank" href="https://developer.apple.com/documentation/appstoreconnectapi">read more on that here</a>.</p>
<h2 id="heading-understanding-distribution-a-deep-dive-into-certificates"><strong>Understanding Distribution: A Deep Dive into Certificates</strong></h2>
<h3 id="heading-what-are-certificates">What are Certificates?</h3>
<p>Certificates are digital credentials that verify a <strong>developer's identity</strong> – that is, you – to Apple and, by extension, to the app users.</p>
<p>They are fundamental to Apple's code signing process, which is mandatory for all apps to ensure they originate from a <strong>known source</strong> and have not been tampered with since being signed.</p>
<h3 id="heading-what-is-code-signing-ensuring-trust-and-integrity">What is Code Signing: Ensuring Trust and Integrity</h3>
<p>Code signing is you as a developer signing the app with your signature. It is the process of attaching a digital signature to an app's code. This signature assures users of two key things:</p>
<ol>
<li><p><strong>Authenticity:</strong> The app was created by an identified Apple developer (an individual or a team).</p>
</li>
<li><p><strong>Integrity:</strong> The app's code has not been altered or corrupted since it was signed by the developer.</p>
</li>
</ol>
<p>The process involves using a private key, securely held by the developer (you), to create the signature. The corresponding public key, embedded within the developer's certificate (issued by Apple), is used by the system to verify this signature.</p>
<p>This system of identity verification and integrity checking is crucial. The developer's certificate, issued by Apple as a Certificate Authority (CA), vouches for their identity. The code signing process, using hashing and encryption, ensures that any modification to the code after signing would invalidate the signature.</p>
<p>For app developers, benefits of code signing include removing warnings on macOS for apps distributed outside the Mac App Store, providing a smoother user experience. It is a mandatory requirement for listing applications on any of Apple's App Stores. It also enhances security of the app as it acts as a deterrent against malicious tampering.</p>
<h3 id="heading-types-of-certificates-development-distribution-and-developer-id">Types of Certificates: Development, Distribution, and Developer ID</h3>
<p>Apple provides different types of certificates for various stages of development and methods of distribution. Each of them has a distinct role to play throughout the app development process.</p>
<h4 id="heading-1-development-certificates-for-example-apple-development">1. Development Certificates (for example, "Apple Development"):</h4>
<ul>
<li><p><strong>Purpose:</strong> Used to sign apps during the development phase, allowing them to be installed and run on a limited number of <em>registered test devices</em> and simulators for debugging and testing.</p>
</li>
<li><p><strong>Identifies:</strong> Typically identifies an individual developer through their developer ID.</p>
</li>
<li><p><strong>Used with:</strong> Development provisioning profiles – more on this later.</p>
</li>
</ul>
<h4 id="heading-2-distribution-certificates-for-example-apple-distribution">2. Distribution Certificates (for example, "Apple Distribution"):</h4>
<ul>
<li><p><strong>Purpose:</strong> Used to sign apps intended for distribution, either through Ad Hoc methods (to a limited set of <em>registered testers</em>) or for submission to the App Store.</p>
</li>
<li><p><strong>Identifies:</strong> The development team via the team identifier.</p>
</li>
<li><p><strong>Use Cases:</strong></p>
<ol>
<li><p><strong>App Store:</strong> For signing the final version of an app that will be uploaded to App Store Connect for TestFlight beta testing or release on the App Store (iOS, macOS, tvOS, watchOS). These are used with App Store provisioning profiles – more on this later.</p>
</li>
<li><p><strong>Ad Hoc:</strong> For signing apps that will be distributed to a <em>limited number of registered test devices outside of the App Store or TestFlight</em>. These are used with Ad Hoc provisioning profile. More on this later.</p>
</li>
</ol>
</li>
</ul>
<h4 id="heading-3-developer-id-certificates-for-mac-apps-distributed-outside-the-mac-app-store">3. Developer ID Certificates (for Mac apps distributed outside the Mac App Store):</h4>
<ul>
<li><p><strong>Purpose:</strong> Specifically for macOS developers who wish to distribute their applications directly to users (for example, from their own website) rather than through the Mac App Store. Gatekeeper on macOS recognizes apps signed with a Developer ID certificate, assuring users that the app is from a known developer and has not been tampered with.</p>
</li>
<li><p><strong>Types:</strong></p>
<ol>
<li><p><strong>Developer ID Application:</strong> Used to sign the Mac application bundle (.app) itself.</p>
</li>
<li><p><strong>Developer ID Installer:</strong> Used to sign a Mac Installer Package (.pkg) that contains the signed application.</p>
</li>
<li><p><strong>Limit:</strong> Developers can create up to five Developer ID Application certificates and up to five Developer ID Installer certificates.</p>
</li>
</ol>
</li>
</ul>
<p>The following table summarizes these certificate types:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Certificate Type</strong></td><td><strong>Issued To</strong></td><td><strong>Primary Purpose</strong></td><td><strong>Used With Provisioning Profile Type</strong></td><td><strong>Key Use Cases</strong></td></tr>
</thead>
<tbody>
<tr>
<td>Apple Development</td><td>Individual Dev ID</td><td>Develop &amp; debug on registered devices</td><td>Development</td><td>Xcode builds for local testing, running on personal/team test devices.</td></tr>
<tr>
<td>Apple Distribution</td><td>Team ID</td><td>Submit app to App Store / Ad Hoc distribution</td><td>App Store, Ad Hoc</td><td>Final builds for TestFlight, App Store submission, or QA/client Ad Hoc builds.</td></tr>
<tr>
<td>Developer ID Application</td><td>Team ID</td><td>Sign Mac app for distribution outside Mac App Store</td><td><strong>Developer ID Provisioning</strong> <strong>Profile</strong> if the app utilizes specific capabilities (e.g., Push Notifications, Associated Domains).</td><td>Distributing Mac software directly to users (for example, from website).</td></tr>
<tr>
<td>Developer ID Installer</td><td>Team ID</td><td>Sign Mac Installer Pkg for distribution outside Mac App Store</td><td>N/A. (The app inside the package may need a profile).</td><td>Distributing Mac software in a .pkg installer directly to users.</td></tr>
<tr>
<td>APNs / Service Keys (.p8)</td><td>Team ID</td><td>Secure communication with specific Apple services</td><td>N/A for app signing</td><td>Push Notifications, MusicKit, DeviceCheck and so on. (Token-based authentication)</td></tr>
</tbody>
</table>
</div><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748216973656/76df3f64-c84e-4195-a092-37c1143d8b1b.png" alt="Create a new certificate screen in App Store Connect" class="image--center mx-auto" width="1768" height="1384" loading="lazy"></p>
<h3 id="heading-how-to-create-an-apple-certificate-an-overview">How to Create an Apple Certificate – An Overview</h3>
<p>Here’s a general outline of how you create an Apple Certificate:</p>
<ul>
<li><p>Generate a Certificate Signing Request (CSR) on your Mac. (Yes you need a mac.)</p>
</li>
<li><p>You upload this CSR in AppStoreConnect as a part of creating the certificate.</p>
</li>
<li><p>Download the certificate from AppStoreConnect once it’s issued.</p>
</li>
<li><p>Install the certificate into your Keychain.</p>
</li>
</ul>
<p>Now we’ll go through each step in more detail. This part is very important, since we have to save some of the files generated locally or we lose the ability to transfer these certificates. This would mean revoking and re-issuing certificates (I have done this more times than I’d like to admit).</p>
<h4 id="heading-how-to-create-a-certificate-signing-request-csr">How to Create a Certificate Signing Request (CSR)</h4>
<p>A Certificate Signing Request (CSR) is a fancy name for an encrypted block of text containing information about who’s requesting the certificate (like your name and the public key). These are widely used in the cryptography world.</p>
<p>For our purposes, you’ll generate a CSR on your Mac and then submit it to Apple to request a digital certificate. The CSR generation process also creates a new public/private key pair on the Mac – the private key is stored in Keychain Access and is used for the eventual code signing.</p>
<p>To create a CSR using Keychain Access on macOS:</p>
<ol>
<li><p>Launch Keychain Access (you can find it at <code>/Applications/Utilities/</code> or use spotlight).</p>
</li>
<li><p>From the menu bar, choose Keychain Access &gt; Certificate Assistant &gt; Request a Certificate From a Certificate Authority.... (Here the Certificate Authority would be Apple).</p>
</li>
<li><p>In the dialog, enter your email address and a common name for the key (for example, "My Mac Key" or "[Your Name] Dev Key"). This name is primarily for your identification in the Keychain.</p>
</li>
<li><p>Leave the "CA Email Address" field empty – we won’t email it to the Certificate Authority (Apple).</p>
</li>
<li><p>Select the "Saved to disk" option and click "Continue".</p>
</li>
<li><p>Save the file, which will have a .certSigningRequest extension. The corresponding private key is now stored in the login keychain. <strong>This private key is irreplaceable by Apple and you must store it yourself.</strong></p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748288861336/50f20da3-69d9-476d-97e7-331f9b9b5c76.png" alt="Dialog for the CSR creation" class="image--center mx-auto" width="684" height="510" loading="lazy"></p>
<h4 id="heading-how-to-generate-and-download-your-apple-certificates">How to Generate and Download Your Apple Certificates</h4>
<p>Once you’ve created a CSR, you can request a certificate from the Apple Developer Portal:</p>
<ol>
<li><p>Navigate to "Certificates, Identifiers &amp; Profiles" and select "Certificates".</p>
</li>
<li><p>Click the add button (+).</p>
</li>
<li><p>Choose the desired certificate type</p>
</li>
<li><p>Follow the prompts, and when asked, upload the .certSigningRequest file generated earlier.</p>
</li>
<li><p>After Apple processes the request, the certificate will be available for download as a .cer file.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748289386364/78f46b4e-b232-4484-98c2-dcb75120fd61.png" alt="Prompt to upload the CSR after selecting the type of certificate" class="image--center mx-auto" width="1293" height="319" loading="lazy"></p>
</li>
</ol>
<p>To install the certificate, double-click the downloaded .cer file. It will be added to the Keychain Access application – usually appearing in the "login" keychain under the "My Certificates" category, where it should be paired with the private key generated during the CSR generation process earlier.</p>
<p>You can see my certificate and private key in the image below for reference.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748289120657/38f711dd-887a-4fae-844d-e389c65234cf.png" alt="An example of how your certificate and the private key will look like in the keychain" class="image--center mx-auto" width="905" height="44" loading="lazy"></p>
<p>To recap, the CSR certifies that you generated the request from your mac. The certificate certifies that Apple (in this case, an intermediary like the "Apple Worldwide Developer Relations Certification Authority") confirms that they verified the CSR and that it is indeed you who will sign with the certificate (<code>.cer</code>) file.</p>
<p>This is enforced by only you having access to the private key – if you lose it, you cannot use this certificate anymore.</p>
<p>So, if you use this certificate (and the private key) to sign an app, the app store / operating system knows that it is you for sure since Apple confirmed it.</p>
<h3 id="heading-how-to-store-your-keys-what-are-p12-files">How to Store Your Keys: What are .p12 Files?</h3>
<p>As I mentioned in the previous section, to code sign an app you need your certificate (containing the public key) and the corresponding private key. This is created along with the CSR, and you can find it in the <code>Keychain Access</code> app.</p>
<p>We call the combination of the certificate and the private key a digital identity. This proves your identity when you sign an app with them.</p>
<h4 id="heading-p12-files-personal-information-exchange">.p12 Files (Personal Information Exchange):</h4>
<p>A .p12 file is a password-protected archive format used to bundle a certificate along with its private key. Its primary purposes are:</p>
<ul>
<li><p>Backing up the digital identity in case you lose access to your Mac.</p>
</li>
<li><p>Transferring the digital identity to another Mac (for example, for another team member or a new development machine).</p>
</li>
<li><p>Providing the identity to automated build systems or third-party build services.</p>
</li>
</ul>
<p>Historically, I have stored the .p12 file on a shared drive with my team and shared the password to it verbally – you can also store it in a local backup disk.</p>
<p>Great. So how do you create one?</p>
<h4 id="heading-to-export-a-p12-file-from-keychain-access">To export a .p12 file from Keychain Access:</h4>
<ol>
<li><p>Open Keychain Access, select the "login" keychain, and go to the "My Certificates" category.</p>
</li>
<li><p>Locate the desired certificate. It should have an expandable disclosure triangle indicating an associated private key (look at the image of my certificate above).</p>
</li>
<li><p>Select <em>both</em> the certificate and its private key (or right-click the certificate and choose "Export").</p>
</li>
<li><p>Right-click and choose "Export [X] items...".</p>
</li>
<li><p>In the save dialog, choose the "Personal Information Exchange (.p12)" file format.</p>
</li>
<li><p>Assign a strong password to protect the .p12 file. This password will be required when importing the file elsewhere. It is crucial for security.</p>
</li>
<li><p>Save the file to a secure location.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748297124625/f9d2cfe0-3538-405e-8fb0-af08276c4326.png" alt="Image of exporting my certificate and private key as a .p12 file" class="image--center mx-auto" width="468" height="266" loading="lazy"></p>
</li>
</ol>
<h2 id="heading-bridge-between-everything-provisioning-profiles"><strong>Bridge Between Everything: Provisioning Profiles</strong></h2>
<p>Provisioning profiles are the final link between an App ID, developer certificates, and, in some cases, a list of specific test devices. They act as a permission slip, authorizing an app signed with a particular certificate to be installed and run either on designated devices or to be submitted to the App Store.</p>
<h3 id="heading-what-exactly-is-a-provisioning-profile">What Exactly is a Provisioning Profile?</h3>
<p>A provisioning profile is a <code>.mobileprovision</code> (for iOS / VisionOS) or <code>.provisionprofile</code> (for macOS) file that holds several key pieces of information:</p>
<ul>
<li><p><strong>The App ID:</strong> Specifies which application (or set of applications, if using a wildcard App ID) the profile applies to.</p>
</li>
<li><p><strong>Certificates:</strong> Contains one or more developer or distribution certificates that can be used to sign the app.</p>
</li>
<li><p><strong>Device UDIDs (for Development and Ad Hoc):</strong> For profiles intended for testing on specific devices, it includes a list of the Unique Device Identifiers (UDIDs) of those authorized devices – more on devices in the next section.</p>
</li>
<li><p><strong>Entitlements:</strong> A list of app services or capabilities (like Push Notifications, iCloud, App Groups) that the app is permitted to use. These are derived from the capabilities enabled for the <em>associated App ID</em>.</p>
</li>
</ul>
<p>You can open the file using <code>vim</code> or any editor to see parts of the content which include the App Id, Operating Systems, Certificates, and so on.</p>
<p>The operating system checks the provisioning profile at app launch to ensure the app is authorized to run on the current device and use the requested services. If the profile is missing, invalid, or doesn't match the app's signature or the device, the app will not launch.</p>
<p>They are difference from certificates, because certificates are tied to you as a developer. But provisioning profiles are to a specific app – with specific capabilities to a specific developer and maybe on specific devices.</p>
<p>If any of these change (let’s say you added a capability or your certificate expired, for example), you’ll need to generate the provisioning profile again. These are the files you will work with the most out of all the above, and any change can cause your profile to become invalid.</p>
<h3 id="heading-types-of-provisioning-profiles-development-ad-hoc-app-store-and-enterprise">Types of Provisioning Profiles: Development, Ad Hoc, App Store, (and Enterprise)</h3>
<h3 id="heading-types-of-provisioning-profiles-development-ad-hoc-app-store-and-enterprise-1"><strong>Types of Provisioning Profiles: Development, Ad Hoc, App Store, (and Enterprise)</strong></h3>
<p>Just like certificates, we have multiple types of provisioning profiles. Similar to certificates, there can be development and distribution provisioning profiles.</p>
<p>Since we also keep track of the devices a profile is supposed to run, we have several kinds of distribution profiles based on which devices it should run on.</p>
<p>We also have special profiles like “Enterprise” which will add additional capabilities (like main camera access on the Vision Pro) but will restrict your app distribution methods to enterprise only.</p>
<p>We will go over each of these types now. Feel free to skip to the one that you’re looking for.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Profile Type</strong></td><td><strong>Purpose</strong></td><td><strong>Required Certificate Type(s)</strong></td><td><strong>Device Registration Required?</strong></td><td><strong>Distribution Method</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Development</strong></td><td>Install &amp; debug on registered devices during development (need Xcode to install).</td><td>Development</td><td>Yes</td><td>Xcode run, local device deployment.</td></tr>
<tr>
<td><strong>Ad Hoc</strong></td><td>Distribute to a limited number of registered test devices (no need for Xcode).</td><td>Distribution</td><td>Yes</td><td>Manual install (for example, via link, email, MDM) for testers.</td></tr>
<tr>
<td><strong>App Store Connect</strong></td><td>Submit app to App Store Connect for TestFlight or App Store release.</td><td>Distribution</td><td>No</td><td>Upload to App Store Connect.</td></tr>
<tr>
<td><strong>Enterprise</strong></td><td>Distribute proprietary apps to employees within an organization.</td><td>Enterprise (Distribution)</td><td>No (subject to program terms)</td><td>Internal distribution (e.g., private portal, MDM).</td></tr>
<tr>
<td><strong>Developer ID</strong></td><td>Allows a macOS app that is distributed outside the App Store to use advanced features</td><td>Developer ID</td><td>No</td><td>Outside the Mac App Store (for example, a web page, USB, MDM )</td></tr>
</tbody>
</table>
</div><h4 id="heading-development-provisioning-profile"><strong>Development Provisioning Profile:</strong></h4>
<ul>
<li><p><strong>Allows</strong> an app to be installed and debugged on specific devices registered in the developer's account during the active development phase. More on device registration later.</p>
</li>
<li><p><strong>Contains</strong> an App ID, one or more development certificates, and a list of registered device UDIDs.</p>
</li>
<li><p><strong>Created</strong> manually in the Apple Developer Portal or generated automatically by Xcode if <code>Automatically manage signing</code> is enabled.</p>
</li>
</ul>
<h4 id="heading-ad-hoc-provisioning-profile"><strong>Ad Hoc Provisioning Profile:</strong></h4>
<ul>
<li><p><strong>Allows</strong> distribution of an app to a limited number of registered test devices <strong>without</strong> requiring Xcode for installation. This is ideal for distributing builds to QA teams, beta testers, or clients for feedback.</p>
</li>
<li><p><strong>Contains</strong> an App ID (often an explicit App ID, or an Xcode-managed one like <code>XC Wildcard</code> or <code>XC</code>), a single distribution certificate, and a list of registered device UDIDs.</p>
</li>
<li><p><strong>Created</strong> manually in the Developer Portal or managed by Xcode's automatic signing.</p>
</li>
</ul>
<h4 id="heading-app-store-connect-provisioning-profile"><strong>App Store Connect Provisioning Profile:</strong></h4>
<ul>
<li><p><strong>Required</strong> to sign an app for submission to App Store Connect. This is the pathway for distributing apps via TestFlight for broader beta testing and for official release on the App Store.</p>
</li>
<li><p><strong>Contains</strong> an explicit App ID (or an App ID that matches the app's bundle ID, including Xcode-managed App IDs), and a single distribution certificate. <em>Device UDIDs are not included in this profile type since this is meant for broader distribution.</em></p>
</li>
<li><p><strong>Created</strong> manually in the Developer Portal or managed by Xcode's automatic signing.</p>
</li>
</ul>
<h4 id="heading-enterprise-provisioning-profile"><strong>Enterprise Provisioning Profile:</strong></h4>
<ul>
<li><p>Exclusively for members of the <strong>Apple Developer Enterprise Program</strong>. It allows developers of these orgs to distribute proprietary, in-house applications directly to their employees, bypassing the public App Store.</p>
</li>
<li><p>Note: This program has stringent enrollment criteria and is strictly for internal distribution within the enrolled organization – these apps cannot be pushed to AppStore.</p>
</li>
</ul>
<h4 id="heading-developer-id-provisioning-profile"><strong>Developer ID Provisioning Profile:</strong></h4>
<ul>
<li><p><strong>Required</strong> to utilize certain Apple services or advanced capabilities like Push Notifications, CloudKit, Sign in with Apple, or specific iCloud services.</p>
</li>
<li><p><strong>Contains</strong> an App ID, a Developer ID distribution certificate, the entitlements authorized for the app.</p>
</li>
<li><p><strong>Created</strong> manually in the Developer Portal – will not be added automatically by Xcode’s automatic signing.</p>
</li>
</ul>
<h3 id="heading-how-to-create-and-manage-provisioning-profiles">How to Create and Manage Provisioning Profiles</h3>
<p>Creating and managing provisioning profiles usually requires an Account Holder or Admin role in the Apple Developer Program. You also need a configured App ID, the appropriate certificate(s), and for Development or Ad Hoc profiles, a list of registered device UDIDs.</p>
<p>If you are new developer, my recommendation is to read this article completely, then get back to this section once you have your devices setup.</p>
<p>General steps for manual creation in the Developer Portal:</p>
<ol>
<li><p>Navigate to "Certificates, Identifiers &amp; Profiles" and select "Profiles".</p>
</li>
<li><p>Click the add button (+).</p>
</li>
<li><p>Select the type of provisioning profile to create (for example, "iOS App Development," "Ad Hoc," "App Store").</p>
</li>
<li><p>Choose the App ID you’re targeting from the dropdown list.</p>
</li>
<li><p>Select the certificate(s) to include in the profile. Development profiles can include multiple development certificates – so you can include all the team member certificates here. Ad Hoc and App Store profiles include a single distribution certificate.</p>
</li>
<li><p>If creating a Development or Ad Hoc profile, select the registered devices to include.</p>
</li>
<li><p>Provide a name for the provisioning profile (this is for identification in the portal and Xcode).</p>
</li>
<li><p>Click "Generate" and then "Download" the <code>.mobileprovision</code> or <code>.provisionprofile</code> file.</p>
</li>
</ol>
<p>You need to make downloaded profiles available to Xcode. You can often do this by double-clicking the downloaded file or by refreshing profiles within Xcode's account settings (Preferences &gt; Accounts).</p>
<p>I really like Xcode's "Automatically manage signing" feature and it can simplify profile management by a lot. It creates and updates profiles as needed. But, understanding the manual process is crucial for troubleshooting because when things go wrong, it is straightforward to debug the issue with this knowledge.</p>
<p>Provisioning profiles will become invalid and require regeneration if:</p>
<ul>
<li><p>The capabilities of the associated App ID are changed – let’s say you added a new capability.</p>
</li>
<li><p>An included certificate expires or is revoked.</p>
</li>
<li><p>For Development/Ad Hoc profiles, if devices are added or removed from the registered list in a way that affects the profile's device set, or if the profile's own expiration date is reached. When such changes occur, you have to edit the profile (if possible) or delete it and recreate it in the Developer Portal, then re-download it and install it again. While this may seem like a complicated step, it’s straightforward if you do it a couple of times.</p>
</li>
</ul>
<h2 id="heading-device-management-development-and-ad-hoc-builds"><strong>Device Management — Development and Ad Hoc Builds</strong></h2>
<p>For testing applications on physical Apple hardware outside of Testflight or AppStore, you’ll need to register the Unique Device Identifiers (UDIDs) of your test devices with your Apple Developer account. This registration is a necessary step for creating Development and Ad Hoc provisioning profiles.</p>
<h3 id="heading-why-you-need-to-register-test-devices">Why You Need to Register Test Devices</h3>
<p>Development and Ad Hoc provisioning profiles are specifically tied to a list of registered devices. An app signed with this profile can be installed directly without going through App Store process. This means that you need to register devices you intend to develop on. This restricts bad faith actors from releasing apps widely without developer and App Store supervision.</p>
<p>The UUID of a device is like a physical address (think Mac Address). If you don’t include this in the provisioning profile you used to sign an app package, it cannot be installed on that device.</p>
<p>Let’s go over the steps to do that.</p>
<h3 id="heading-how-to-find-your-devices-udid-unique-device-identifier">How to Find Your Device's UDID (Unique Device Identifier)</h3>
<p>A UDID is a unique 40-character hexadecimal string (for older devices) or a 25-character string (format XXXXXXXX-XXXXXXXXXXXXXXXX) that uniquely identifies a specific iPhone, iPad, Apple Watch, Apple TV, Vision Pro or Mac.</p>
<p>There are several ways to find a device's UDID:</p>
<ul>
<li><p><strong>Xcode:</strong> Connect the device to a Mac running Xcode. Open Xcode and navigate to Window &gt; Devices and Simulators. Select the connected device from the list on the left. The UDID will be displayed as the "Identifier" in the device information panel.</p>
</li>
<li><p><strong>Finder (macOS Catalina and later):</strong> Connect the iOS or iPadOS device to a Mac. Open Finder and select the device from the sidebar under "Locations." The UDID may be displayed directly, or it might be necessary to click on the line of text beneath the device's name (which shows model, storage, and OS version) to cycle through to display the UDID.</p>
</li>
<li><p><strong>iTunes (older macOS versions):</strong> For Macs running macOS Mojave or earlier, connect the device and open iTunes. Select the device icon when it appears. In the "Summary" tab, click on the "Serial Number" field; this will change to display the UDID.</p>
</li>
<li><p><strong>Apple Silicon Macs:</strong> When registering an Apple Silicon Mac, it's important to look for the "Provisioning UDID," which can be found in System Information under Hardware &gt; Provisioning UDID.</p>
</li>
<li><p><strong>Other Ways:</strong> There are some websites that will install a profile on to your device to get the UUID – so as an absolute last resort, you can do this. <em>But I highly recommend doing it in the one of the official ways to avoid any potential issues.</em></p>
</li>
</ul>
<h3 id="heading-how-to-register-devices-in-the-apple-developer-portal">How to Register Devices in the Apple Developer Portal</h3>
<p>Device registration is managed through the "Certificates, Identifiers &amp; Profiles" section of the Apple Developer Portal (developer.apple.com) and typically requires an Account Holder or Admin role.</p>
<p>To manually register a single device:</p>
<ol>
<li><p>Sign in to the Apple Developer Portal and navigate to "Certificates, Identifiers &amp; Profiles," then select "Devices" from the sidebar.</p>
</li>
<li><p>Click the add button (+) to register a new device.</p>
</li>
<li><p>Select the correct platform for the device (for example, iOS, macOS, tvOS, watchOS).</p>
</li>
<li><p>Enter a descriptive "Device Name" (this is for your reference, for example, "Sravan’s iPhone 11 Pro") and the device's UDID obtained in the previous step.</p>
</li>
<li><p>Click "Continue," review the information to make sure everything is correct, and then click "Register".</p>
</li>
</ol>
<p>For registering multiple devices, the portal supports uploading a specially formatted text file (a .txt or a .deviceids file) containing device names and UDIDs.</p>
<p>If "Automatically manage signing" is enabled in Xcode, Xcode can automatically register a connected device when it's selected as a build target. This is the way I managed all of my personal projects and devices. On the other hand, the file upload was really useful at my workplace to keep track of all the devices and add them at once.</p>
<h3 id="heading-understanding-device-limits-and-annual-resets">Understanding Device Limits and Annual Resets</h3>
<p>The Apple Developer Program imposes limits on the number of devices that can be registered for testing:</p>
<ul>
<li><p><strong>Annual Limit:</strong> Each membership year, a development team can register up to 100 devices for each product family (iPhone, iPad, Apple Watch, Apple TV, Apple Vision Pro, Mac). If you are a large team, this can potentially bottleneck you. When we ran into this issue, we created a new development team that could be split so that it didn’t have too much interdependence. There is no other way as far as I know, other than asking Apple and appealing them.</p>
</li>
<li><p><strong>Disabling Devices:</strong> While a device can be disabled in the portal during the membership year, doing so <strong>does not free up its slot or increase the number of available devices for that year</strong>. This part is frustrating but I think this is the only way they can enforce the 100 device limit to avoid people swapping devices. They should just provide a pathway to increase the limit, really. Disabling a device will, however, invalidate any provisioning profiles that include it, requiring those profiles to be regenerated.</p>
</li>
<li><p><strong>Resetting Device List (Start of New Membership Year):</strong> At the beginning of a new membership year, Account Holders, Admins, and App Managers are given a one-time option when they first sign in to "Certificates, Identifiers &amp; Profiles" to remove devices from their list. This allows them to "reset" their available device count back to 100 for each product family. You can choose to remove specific devices or all registered devices. <strong>This is your one chance per year to remove unused devices completely and free up slots for new devices.</strong></p>
</li>
<li><p><strong>Membership Expiration:</strong> If a developer program membership is nearing expiration and is not planned for renewal, the Account Holder will have an option, starting 30 days before expiration, to download a copy of their registered device list. They can also opt to have all devices removed from the account immediately upon membership expiration. If no action is taken, devices are typically removed automatically 180 days after membership expiration.</p>
</li>
</ul>
<h2 id="heading-possibilities-enabling-capabilities-and-services"><strong>Possibilities: Enabling Capabilities and Services</strong></h2>
<p>App Capabilities (or App Services) are features provided by Apple that we (as developers) can integrate into our applications to extend functionality and provide richer user experiences. Examples include iCloud storage, Push Notifications, Sign in with Apple, Apple Pay and HealthKit integration. Enabling these often requires explicit configuration for an app's App ID in the Apple Developer Portal and within the Xcode project.</p>
<h3 id="heading-why-you-should-use-capabilities">Why You Should Use Capabilities</h3>
<p>Making full use of these App capabilities can set your app apart from other apps in a very noticeable way. You can use Apple Wallet integration if you want users to scan a membership card. You can use journaling suggestions if you want to prompt them to journal something. You can use iCloud Storage to lean further into inter-device synchronization.</p>
<p>When you enable a capability for an App ID, it results in specific entitlements being added to the app's provisioning profile. These entitlements are permissions that the operating system checks at runtime to ensure the app is authorized to use the requested service.</p>
<h3 id="heading-how-to-configure-capabilities-for-your-app-id-apple-developer-portal">How to Configure Capabilities for Your App ID (Apple Developer Portal)</h3>
<p>Enabling and configuring capabilities is typically done by an Account Holder or Admin in the Apple Developer Portal (developer.apple.com).</p>
<ol>
<li><p>Navigate to "Certificates, Identifiers &amp; Profiles" and select "Identifiers."</p>
</li>
<li><p>Choose the App ID for which capabilities need to be configured.</p>
</li>
<li><p>In the App ID's settings, there will be a "Capabilities" tab. Select the checkboxes for the capabilities the app requires.</p>
</li>
<li><p>Many capabilities require additional configuration steps. For these, a "Configure" or "Edit" button will usually appear next to the capability once selected. Examples include:</p>
</li>
</ol>
<ul>
<li><p><strong>App Groups:</strong> Requires creating or selecting an app group identifier to allow data sharing between a main app and its extensions, or between different apps from the same developer.</p>
</li>
<li><p><strong>Apple Pay:</strong> Requires associating one or more Merchant IDs with the App ID.</p>
</li>
<li><p><strong>iCloud:</strong> May require choosing Xcode version compatibility and creating or assigning iCloud containers for Key-Value or Document storage</p>
</li>
<li><p><strong>Sign in with Apple:</strong> May require configuring the App ID as a primary app or grouping it with an existing primary App ID, and optionally providing a server-to-server notification endpoint URL.</p>
</li>
</ul>
<ol start="5">
<li>After configuring all selected capabilities, click "Save." A warning dialog may appear, which needs confirmation to finalize the changes.</li>
</ol>
<p><strong>Enabling a capability in the Developer Portal is only one part of the process.</strong> You’ll also need to add and configure it within the app's target in the Xcode project, under the "Signing &amp; Capabilities" tab.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748480139418/6a4007b3-01bd-484a-865c-8c5e728e15e0.png" alt="Showing the Signing &amp; Capabilities screen in Xcode" class="image--center mx-auto" width="614" height="114" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748480260906/e0dcec33-24ce-448b-91be-b79f5638e6fc.png" alt="Screenshot showing the Capabilities selector in Xcode" class="image--center mx-auto" width="793" height="608" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748480340624/ac56896a-0fb0-4cb0-a3fc-c894a255794a.png" alt="Screenshot of Xcode showing three capabilities. " class="image--center mx-auto" width="1187" height="434" loading="lazy"></p>
<ol>
<li><p>Navigate to the project settings and select “Signing &amp; Capabilities”.</p>
</li>
<li><p>Press the “+ Capability” button to select the capability.</p>
</li>
<li><p>Once selected, the capability should appear in the pane. Depending on the capability, you might want to configure it further.</p>
</li>
</ol>
<p>This Xcode step integrates the necessary frameworks, adds entitlements files to the project, and adjusts build settings.</p>
<h3 id="heading-how-enabling-capabilities-affects-your-provisioning-profiles">How Enabling Capabilities Affects Your Provisioning Profiles</h3>
<p>Changes to an App ID's enabled capabilities have a direct and significant impact on its associated provisioning profiles.</p>
<ul>
<li><p><strong>Invalidation:</strong> When a capability is enabled, disabled, or its configuration is modified for an App ID, <strong>all existing provisioning profiles that use that App ID immediately become invalid</strong>.</p>
</li>
<li><p><strong>Regeneration Required:</strong> These invalidated provisioning profiles must be regenerated (either by editing and re-saving them in the Developer Portal or by having Xcode's automatic signing handle it). The regenerated profiles will then include the updated set of entitlements corresponding to the newly configured capabilities.</p>
</li>
<li><p><strong>Platform Impact:</strong> Enabling a capability for an App ID that is used across multiple platforms (for example, an iOS app and its watchOS companion) will affect the provisioning profiles for all eligible platforms that use that App ID.</p>
</li>
</ul>
<p>This is something to keep in mind. Especially when it comes to distribution profiles since those are usually manually managed.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>While all of these might seem daunting, Apple’s automatic process should handle most of it. But I highly recommend learning how everything works so that you can debug it in case something goes wrong. I also highly recommend using manually created profiles for distribution.</p>
<p>While signing and handling certificates is not the most exciting part of the App development process, it is a necessary skill to have. In my next article, I will go over distributing an app from start to finish (which includes these processes and more restrictions).</p>
<p>You can follow me at <a class="user-mention" href="https://hashnode.com/@sravankaruturi">Sravan Karuturi</a> for my other posts.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What's New in macOS? How to Install the Sequoia Beta ]]>
                </title>
                <description>
                    <![CDATA[ The macOS Sequoia public beta is now available. Though the final release of macOS Sequoia (macOS 15) won't be available until late September or early October 2024, I'll show you how to install the public beta for an advance look. It's actually stable... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/whats-new-in-macos-how-to-install-the-sequoia-beta/</link>
                <guid isPermaLink="false">66ba160b1f44b55a20d330e0</guid>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ update  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Kehoe ]]>
                </dc:creator>
                <pubDate>Tue, 30 Jul 2024 14:55:13 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/07/sequoia-desktop-1058w.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The macOS Sequoia public beta is now available.</p>
<p>Though the final release of macOS Sequoia (macOS 15) won't be available until late September or early October 2024, I'll show you how to install the public beta for an advance look. It's actually stable enough for daily use.</p>
<p>The macOS Sequoia public beta is available to anyone who wants to try it, though you have to register with the <a target="_blank" href="https://beta.apple.com/">Apple Beta Software Program</a> to obtain it.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><a class="post-section-overview" href="#heading-is-macos-sequoia-stable">Is macOS Sequoia stable?</a></li>
<li><a class="post-section-overview" href="#heading-time-needed-to-install">Time needed to install</a></li>
<li><a class="post-section-overview" href="#whats-new-in-macos-sequoia">What's new in macOS Sequoia</a></li>
<li><a class="post-section-overview" href="#new-features-in-macos-sequoia">Features in macOS Sequoia</a></li>
<li><a class="post-section-overview" href="#heading-small-changes-in-macos-sequoia">Small changes in macOS Sequoia</a></li>
<li><a class="post-section-overview" href="#heading-requirements-for-macos-sequoia">Requirements for macOS Sequoia</a></li>
<li><a class="post-section-overview" href="#back-up-your-mac-first">Back up your Mac first</a></li>
<li><a class="post-section-overview" href="#heading-sign-up-to-get-the-public-beta">Sign up to get the public beta</a></li>
<li><a class="post-section-overview" href="#heading-where-to-install-the-macos-beta">Where to install the macOS beta</a><br>– <a class="post-section-overview" href="#heading-install-on-a-spare-mac">Install on a spare Mac</a><br>– <a class="post-section-overview" href="#heading-install-on-an-external-drive">Install on an external drive</a><br>– <a class="post-section-overview" href="#heading-install-on-a-separate-volume">Install on a separate volume</a></li>
<li><a class="post-section-overview" href="#heading-use-the-startup-manager">Use the Startup Manager</a></li>
<li><a class="post-section-overview" href="#heading-halt-macos-beta-updates">Halt macOS beta updates</a></li>
<li><a class="post-section-overview" href="#heading-return-to-macos-sonoma">Return to macOS Sonoma</a></li>
<li><a class="post-section-overview" href="#whats-next">What's next</a></li>
</ol>
<h2 id="heading-is-macos-sequoia-stable">Is macOS Sequoia Stable?</h2>
<p>So far, users are reporting the beta version has only a few minor issues. They say the beta is "surprisingly stable." </p>
<p>There are reports of issues with external monitors, and users say to expect issues with external third-party devices. There may also be issues with screen sharing, video conferencing (Zoom particularly), or streaming in web browsers.</p>
<h2 id="heading-time-needed-to-install">Time Needed to Install</h2>
<p>The update from macOS Sonoma to macOS Sequoia can take more than an hour. The time needed varies widely based on factors such as the size of the update, your Internet speed, and the age and performance of your Mac.</p>
<h2 id="heading-whats-new-in-macos-sequoia">What's New in macOS Sequoia</h2>
<p>Users are reporting that macOS Sequoia is faster, with better battery life on laptops, but we can't be sure until we see the final release.</p>
<p>Looking closely at <a target="_blank" href="https://mac.install.guide/macos/sequoia">macOS Sequoia</a>, it's plain that it isn't a major overhaul of the operating system. The most useful features are Window Tiling and a new Passwords application, as well as iPhone mirroring and seamless drag and drop between devices.</p>
<p>I've compared <a target="_blank" href="https://mac.install.guide/macos/sonoma-vs-sequoia">Sonoma vs Sequoia</a> in a separate article, and also provided some advice to answer the question, <a target="_blank" href="https://mac.install.guide/macos/should-i-update">Should You Update to macOS Sequoia?</a></p>
<h2 id="heading-features-in-macos-sequoia">Features in macOS Sequoia</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/07/mac-passwords-app.png" alt="Image" width="600" height="400" loading="lazy">
<em>macOS Sequoia Passwords application</em></p>
<h3 id="heading-password-manager">Password Manager</h3>
<p>MacOS Sequoia adds a new app called Passwords, improving the way users manage their login credentials. </p>
<p>Built on the existing framework of Apple's Keychain, this app consolidates passwords, passkeys, Wi-Fi passwords, and other essential credentials into one secure, centralized location. </p>
<p>Credentials previously could be edited in System Settings but they were buried and hard to find. The new Passwords app will largely eliminate the need to use third-party password managers such as 1Password, LastPass, or Bitwarden.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/07/mac-sequoia-tiling.png" alt="Image" width="600" height="400" loading="lazy">
<em>macOS Sequoia Window Tiling</em></p>
<h3 id="heading-window-tiling">Window Tiling</h3>
<p>For years, Windows users have complained that MacOS lacks a tiling window manager. MacOS Sequoia adds a new feature called Window Tiling, which allows users to drag windows to the edge of the screen for placement side by side, top and bottom, or in a grid. Third-party utilities have more features but the built-in Window Tiling is a welcome addition.</p>
<p>These two features make an upgrade worthwhile. In addition, Apple has announced other capabilities.</p>
<h3 id="heading-iphone-mirroring">iPhone Mirroring</h3>
<p>This feature allows the use of iPhone apps within a macOS window. Users can now check iPhone notifications directly on their Mac, making the Mac an extension of the iPhone. </p>
<p>One user noted, “No longer do I have to find my phone when I am at home sitting in front of my Mac just to check on a notification.”</p>
<h3 id="heading-seamless-drag-and-drop-between-devices">Seamless Drag and Drop Between Devices</h3>
<p>This feature aims to improve the reliability of transferring files between iPhone and Mac, addressing issues with AirDrop. "Transferring files from Mac to an iPhone Apps no longer requires 5+ tedious steps," a user mentioned.</p>
<h3 id="heading-apple-intelligence">Apple Intelligence</h3>
<p>MacOS Sequoia will introduce the first use of Apple Intelligence, Apple's AI initiative. Apple Intelligence comprises new system-level capabilities, leveraging Apple custom silicon for both local and cloud-based processing. </p>
<p>This is more of a future prospect as AI gets baked in to more applications, but we may see improvements to Siri in macOS Sequoia. Note that these capabilities won't be present when you install macOS Sequoia on an Intel-based Mac.</p>
<h2 id="heading-small-changes-in-macos-sequoia">Small Changes in macOS Sequoia</h2>
<ul>
<li><strong>System Settings:</strong> Individual menus have been rearranged for quicker access to frequently used menus.</li>
<li><strong>Safari:</strong> The web browser has faster page load times, a new start page, and a brand new unified menu similar to "compact mode" on iOS. It can summarize websites and highlight relevant information.</li>
<li><strong>Notes:</strong> Minor improvements including collapsible sections and a choice of highlight styles. Also, Notes adds support for live audio transcription and math equations.</li>
<li><strong>Videoconferencing:</strong> Preview what you share in video calls for presentations and screen sharing. Also, background replacements are built into the macOS video feed so you won't need to use background replacements in Zoom or other conferencing apps.</li>
</ul>
<h2 id="heading-requirements-for-macos-sequoia">Requirements for macOS Sequoia</h2>
<p><a target="_blank" href="https://mac.install.guide/macos/check-version">Check your macOS version</a> and <a target="_blank" href="https://mac.install.guide/macos/update">update macOS</a> to Sonoma (macOS 14) before installing the macOS Sequoia beta.</p>
<p>You should keep the current macOS Sonoma available on your Mac, just in case you run into problems with the beta. That means you should install the macOS Sequoia beta on a separate volume, external drive, or a secondary Mac. </p>
<p>Also, macOS Sequoia does run on older Intel-based Macs, but it may be slow. So I recommend installing it only on Macs with M1, M2, or M3, the Apple Silicon chips.</p>
<p>You can install the macOS Sequoia beta on any computer that runs runs macOS Sonoma with the exception of the 2018–2019 MacBook Air models with Intel Amber Lake chips. Apple provides a <a target="_blank" href="https://www.apple.com/macos/macos-sequoia-preview/">list of supported models for macOS Sequoia</a>.</p>
<h2 id="heading-back-up-your-mac">Back Up Your Mac</h2>
<p>If you've got a new Mac that hasn't been used, you don't need to back up files. Or, if you're like many developers, you won't need to back up your Mac if you have all your important files stored in the cloud. </p>
<p>Otherwise, if there are important files on your computer, make sure you have a backup of your Mac before you install the macOS beta version.</p>
<h2 id="heading-sign-up-to-get-the-public-beta">Sign Up to Get the Public Beta</h2>
<p>Apple offers a public beta version as well as developer beta versions. The developer beta is released first and intended for software developers to test compatibility of applications, while the public beta is released a few weeks later. The public beta is more stable and has fewer bugs than the developer beta.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/07/apple-beta-program.png" alt="macOS Sequoia Public Beta" width="600" height="400" loading="lazy"></p>
<p>The public beta is available now, for free. Sign up for the public beta on the <a target="_blank" href="https://beta.apple.com/">Apple Beta Software Program</a> website. After you sign up with your Apple ID, your System Settings will show that beta updates are available.</p>
<h2 id="heading-where-to-install-the-macos-beta">Where to Install the macOS Beta</h2>
<p>Your best option is to install the macOS beta on a spare Mac, if you have an extra computer. Ideally, you have a relatively new Mac with an Apple Silicon M1, M2, or M3 chip. If you have an older Mac, you may want to avoid the beta version because it could slow down your computer. </p>
<p>Installing on a spare Mac allows you to try the new macOS version without affecting your daily productivity.</p>
<p>Alternatively, you can install the macOS beta on a separate volume on your Mac. This allows you to boot into the beta version when you want to try it out. </p>
<p>You can also install the beta version on an external drive. In either case, you need to hold the power button until you see the Startup Manager menu which lets you select an alternate to the default startup disk.</p>
<p>Here are instructions for installing the macOS Sequoia beta version on a spare Mac, an external drive, or a separate volume.</p>
<h3 id="heading-install-on-a-spare-mac">Install on a spare Mac</h3>
<p>Here's how to install the macOS Sequoia beta on a Mac running macOS Sonoma.</p>
<ol>
<li>Open <code>System Settings</code> and navigate to <code>General</code> and <code>Software Update</code>.</li>
<li>Click the "circle I" info button in <code>Beta Updates</code>.</li>
<li>Set the <code>Beta Updates</code> to <code>macOS Sequoia Public Beta</code>.</li>
<li>Click "Done" and your Mac will check for software updates.</li>
<li>After a check, the upgrade name appears with an "Upgrade Now" button.</li>
<li>Software updates require at least 20% battery power so you may need to connect to power if your battery is low.</li>
<li>Enter your password to start the software update. With a fast Internet connection, the download should take about 30 minutes. After the download, the "preparing" process will take about 15 minutes.</li>
<li>Your Mac will restart after the installation. You'll see the Apple logo and a progress bar. The installation process will take about 15 minutes with several automatic restarts.</li>
<li>After installation completes, you'll see the login screen. Enter your Mac password, then your Apple ID password, and "Continue" or "Set Up Later" through various agreements and settings.</li>
<li>The macOS Sequoia desktop will appear with a the Feedback Assistant application open. Use the Feedback Assistant to report any bugs or issues you encounter.</li>
<li>Check <code>About This Mac</code> to confirm you're running macOS 15.</li>
</ol>
<p>If you don't see <code>macOS Sequoia Public Beta</code> option in <code>Beta Updates</code>, sign up for the <a target="_blank" href="https://beta.apple.com/">Apple Beta Software Program</a>. After you sign up with your Apple ID, your System Settings will show that beta updates are available.</p>
<h3 id="heading-install-on-an-external-drive">Install on an external drive</h3>
<p>Not many users own an external drive now that cloud storage is popular. But if you have an external drive, you can install the macOS beta on it. </p>
<p>You'll need to format the drive so you must erase any files already on the drive. It's best if you own a fast SSD drive with a USB-C or Thunderbolt connection for use of the operating system. You can use a USB thumb drive, but you'll need at least 32 GB of space.</p>
<h4 id="heading-how-to-format-the-external-drive">How to format the external drive</h4>
<ol>
<li>Connect the external drive to your Mac.</li>
<li>Search in Spotlight and open <code>Disk Utility</code>.</li>
<li>Select the external drive in the left sidebar.</li>
<li>Click <code>Erase</code> to reformat the drive.</li>
<li>Name the drive <code>macOS Sequoia</code> or whatever you like.</li>
<li>Choose <code>Mac OS Extended (Journaled)</code> as the format.</li>
<li>Choose <code>GUID Partition Map</code> as the scheme.</li>
<li>Click <code>Erase</code> to format the drive.</li>
<li>Close <code>Disk Utility</code> after the drive formatting is done.</li>
</ol>
<h4 id="heading-how-to-get-the-macos-sequoia-beta">How to get the macOS Sequoia beta</h4>
<p>You'll need to download <code>*.pkg</code> files to install on an external drive. Several sites provide links to installer <code>*.pkg</code> files for macOS betas. Check:</p>
<ul>
<li><a target="_blank" href="https://betaprofiles.dev/install/macos-15/">betaprofiles.dev</a></li>
<li><a target="_blank" href="https://mrmacintosh.com/macos-sequoia-full-installer-database-download-directly-from-apple/">mrmacintosh.com</a></li>
</ul>
<p>Download the latest <code>InstallAssistant.pkg</code>. These files are huge (14GB or more) so a download may take more than 30 minutes with a fast Internet connection.</p>
<h4 id="heading-how-to-install-the-macos-sequoia-beta">How to install the macOS Sequoia beta</h4>
<p>Double click the <code>InstallAssistant.pkg</code> file to start the installation. Click "Change Install Location" to select the external drive. In the step "Destination Select" you can select the external drive as the installation destination.</p>
<h3 id="heading-install-on-a-separate-volume">Install on a separate volume</h3>
<p>If you want to install the macOS beta on a separate volume, follow these steps. You might hear this process called a "dual boot" or "separate partition" installation. Apple's APFS file system introduced "volumes" which are like partitions but more flexible. </p>
<p>You'll have two volumes on your Mac, one for macOS Sonoma and one for macOS Sequoia. You can use the Startup Manager to choose which volume to boot from.</p>
<h4 id="heading-how-to-create-a-new-volume">How to create a new volume</h4>
<ol>
<li>Search in Spotlight and open <code>Disk Utility</code>.</li>
<li>Select the internal drive in the left sidebar.</li>
<li>Click the <code>+</code> button in the top bar to add a new volume (or "Edit" &gt; "Add APFS Volume" in the menu).</li>
<li>Name the volume <code>macOS Sequoia</code> or whatever you like.</li>
<li>Choose a format (commonly "APFS").</li>
<li>Click <code>Add</code> to create the volume.</li>
<li>Click "Done" and close <code>Disk Utility</code> after the volume creation is done.</li>
</ol>
<h4 id="heading-get-the-macos-sequoia-beta">Get the macOS Sequoia beta</h4>
<p>You'll need to download <code>*.pkg</code> files to install on a separate volume. Several sites provide links to installer <code>*.pkg</code> files for macOS betas. Check:</p>
<ul>
<li><a target="_blank" href="https://betaprofiles.dev/install/macos-15/">betaprofiles.dev</a></li>
<li><a target="_blank" href="https://mrmacintosh.com/macos-sequoia-full-installer-database-download-directly-from-apple/">mrmacintosh.com</a></li>
</ul>
<p>Download the latest <code>InstallAssistant.pkg</code>. These files are huge (14GB or more) so a download may take more than 30 minutes with a fast Internet connection.</p>
<h4 id="heading-install-the-macos-sequoia-beta">Install the macOS Sequoia beta</h4>
<p>Double click the <code>InstallAssistant.pkg</code> file to start the installation. Click "Change Install Location" to select the volume you created. In the step "Destination Select" you can select the new volume as the installation destination.</p>
<h3 id="heading-use-the-startup-manager">Use the Startup Manager</h3>
<p>Hold down the power button when starting your Mac to enter the Startup Manager. "Loading startup options" will appear. You have a choice of booting from the internal drive, an external drive (if connected), a disk volume, or "Options."</p>
<p>Select the external drive or volume to boot from. You can set a default for the external drive or volume in <code>System Settings</code> &gt; <code>Startup Disk</code>.</p>
<h2 id="heading-halt-macos-beta-updates">Halt macOS Beta Updates</h2>
<p>If you don't want to continue using macOS Sequoia beta, you can turn off beta updates.</p>
<p>Go to <code>System Settings</code> &gt; <code>General</code> &gt; <code>Software Update</code>. Click the "circle I" info button in <code>Beta Updates</code> and set the <code>Beta Updates</code> to <code>Off</code>. This will stop the macOS beta updates.</p>
<p>This is a necessary step if you don't want to use the macOS beta. If you don't do this, your Mac will continue to update to the latest beta version.</p>
<h2 id="heading-return-to-macos-sonoma">Return to macOS Sonoma</h2>
<p>If you're using an external drive or separate volume to run the macOS beta, you still have macOS Sonoma on your Mac as the primary volume on the internal drive. Reformat the external drive or delete the volume if you no longer want to use the macOS beta.</p>
<h2 id="heading-restore-macos-sonoma-on-a-spare-mac">Restore macOS Sonoma on a Spare Mac</h2>
<p>If you are using macOS Sequoia on a spare Mac, you can restore macOS Sonoma by reinstalling it.</p>
<p>You can download and install macOS Sonoma from the Mac App Store. Search in the Mac App Store for "macOS Sonoma" or use this link to view the listing for <a target="_blank" href="https://apps.apple.com/us/app/macos-sonoma/id6450717509">macOS Sonoma</a>. Click "Get" and the App Store will open <code>System Settings</code> &gt; <code>General</code> &gt; <code>Software Update</code> and begin downloading macOS Sonoma. </p>
<p>Downloads from the App Store are slow, so expect a wait of an hour or more. The App Store installs an application <code>Install macOS Sonoma</code> in the <code>Applications</code> folder.</p>
<p>After the download is complete, the <code>Install macOS Sonoma</code> application will launch automatically. Follow the instructions to install macOS Sonoma.</p>
<p>Alternatively, you can directly download an installer <code>*.pkg</code> file to restore macOS Sonoma. The download is faster than the App Store. Check:</p>
<ul>
<li><a target="_blank" href="https://mrmacintosh.com/macos-sonoma-full-installer-database-download-directly-from-apple/">mrmacintosh.com</a></li>
</ul>
<p>Double click the <code>InstallAssistant.pkg</code> file to start the installation.</p>
<h2 id="heading-whats-next">What's Next</h2>
<p>After you've installed macOS Sequoia, I've got recommendations for a <a target="_blank" href="https://mac.install.guide/mac-setup/">Mac setup</a>, including <a target="_blank" href="https://mac.install.guide/mac-setup/name">Mac name settings</a>, <a target="_blank" href="https://mac.install.guide/mac-setup/dock">Dock settings</a>, and <a target="_blank" href="https://mac.install.guide/mac-setup/finder">Finder settings</a>.</p>
<p>For developing software on the Mac, you'll need to:</p>
<ul>
<li><a target="_blank" href="https://mac.install.guide/commandlinetools/3">Install Xcode Command Line Tools</a> for missing command line tools</li>
<li><a target="_blank" href="https://mac.install.guide/homebrew/3">Install Homebrew</a> as a software package manager</li>
<li><a target="_blank" href="https://mac.install.guide/git/">Install Git</a> for version control</li>
</ul>
<p>When you update macOS, you may also want to install newer software as well. Here are new and recommended applications for macOS Sequoia:</p>
<ul>
<li><a target="_blank" href="https://mac.install.guide/download/terminal">Terminal</a> alternatives</li>
<li><a target="_blank" href="https://mac.install.guide/download/text-editor">Text Editor</a> options</li>
<li><a target="_blank" href="https://mac.install.guide/download/chatgpt">ChatGPT desktop application</a> for better ChatGPT usability</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>After October 2024, you'll need to update macOS from Sonoma to Sequoia to stay up to date with bug fixes, security, and software compatibility, especially if you are a software developer. </p>
<p>Before then, you can try out the macOS Sequoia beta to see what's new and provide feedback to Apple. See an article <a target="_blank" href="https://mac.install.guide/macos/beta">MacOS Beta</a> for more details.</p>
<p>Though macOS Sequoia doesn't bring spectacular changes, new features like Window Tiling and the Passwords app are useful. </p>
<p>Installing the macOS beta takes an hour or more, but you may find it is stable enough for daily use, giving you access to new features now.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Fix Common Python Installation Errors on macOS ]]>
                </title>
                <description>
                    <![CDATA[ Python's popularity keeps growing as more developers adopt it for data science and machine learning, although it is already among the most popular programming languages.  I recently wrote an article for freeCodeCamp titled "How to Install Python on a... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-fix-python-installation-errors-on-mac/</link>
                <guid isPermaLink="false">66ba1602ad32b828c4c5be08</guid>
                
                    <category>
                        <![CDATA[ error ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Kehoe ]]>
                </dc:creator>
                <pubDate>Mon, 10 Jun 2024 22:57:27 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/06/python-install-errors.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Python's popularity keeps growing as more developers adopt it for data science and machine learning, although it is already among the most popular programming languages. </p>
<p>I recently wrote an article for freeCodeCamp titled "<a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-python-on-a-mac/">How to Install Python on a Mac</a>", which provides a clear guide to installing Python on macOS. </p>
<p>As a follow-up, I will discuss errors you may encounter when installing Python on macOS and how to fix them in this article.</p>
<h2 id="heading-contents"><strong>Contents</strong></h2>
<p>Here's what we'll cover here:</p>
<ul>
<li><a class="post-section-overview" href="#heading-how-to-fix-the-command-not-found-python-error">How to Fix the "command not found: python" Error</a></li>
<li><a class="post-section-overview" href="#using-an-out-of-date-python">Using an Out-of-date Python</a></li>
<li><a class="post-section-overview" href="#heading-using-the-system-python">Using the System Python</a></li>
<li><a class="post-section-overview" href="#heading-using-the-homebrew-python">Using the Homebrew Python</a></li>
<li><a class="post-section-overview" href="#heading-missing-pip">Missing Pip</a></li>
<li><a class="post-section-overview" href="#heading-pip-package-installation-errors">Pip Package Installation Errors</a></li>
<li><a class="post-section-overview" href="#heading-more-on-mac-python">More on Mac Python</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-how-to-fix-the-command-not-found-python-error">How to Fix the "command not found: python" Error</h2>
<p>You may encounter this error:</p>
<pre><code class="lang-bash">$ python ...
zsh: <span class="hljs-built_in">command</span> not found: python
</code></pre>
<p>You'll see this when trying to run Python commands in the terminal. This mostly happens because Python is yet to be installed. However, it is also possible, and more frustrating, that the Python installation is not in the Mac PATH.</p>
<p>If you only need to install and run a Python application, you can use <a target="_blank" href="https://mac.install.guide/homebrew/">Homebrew</a> to <a target="_blank" href="https://mac.install.guide/python/pipx">install Pipx</a>. This will install Python as a dependency. Pipx is a tool that allows you to install and run Python applications as standalone executables, avoiding dependency conflicts that can occur when using the standard Python package manager <a target="_blank" href="https://pip.pypa.io/en/stable/">Pip</a>.</p>
<p>If you're going to work on a programming project in Python, <a target="_blank" href="https://mac.install.guide/python/install-pyenv">install Python with Pyenv</a>, the standard Python version manager. Better yet, <a target="_blank" href="https://mac.install.guide/python/install-rye">install Python with Rye</a>, an all-in-one tool for Python installation, virtual environment management, and package installation.</p>
<p>If you're seeing the <code>zsh: command not found: python</code> error, and are certain you have already installed Python, you may need to update the <a target="_blank" href="https://mac.install.guide/python/path">Mac Python PATH</a>. You'll need to find where Python is installed on your system, which takes some sleuthing because there are multiple ways to install Python on macOS.</p>
<p>Here are the most common locations for Python on a Mac:</p>
<ol>
<li><code>/usr/bin/python3</code> is the system Python installed with Xcode Command Line Tools. This is an alias; the actual location is <code>/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin</code>.</li>
<li><code>/opt/homebrew/opt/python@3.12/libexec/bin/python</code> is the Homebrew Python.</li>
<li><code>/Library/Frameworks/Python.framework/Versions/3.12/bin/python3</code> is the Python installed with the official Python website installer.</li>
<li><code>/Users/username/.pyenv/shims/python</code> is the Python installed with Pyenv.</li>
<li><code>/Users/username/.rye/shims/python</code> is the Python installed with Rye.</li>
</ol>
<p>Enter the full pathname followed by <code>python --version</code> and see if you get a version number. If you do, you'll need to update your PATH by adding the Python installation path to your <code>.zprofile</code> file. For more information, see  <a target="_blank" href="https://mac.install.guide/terminal/path">Mac  PATH</a>.</p>
<p>The article <a target="_blank" href="https://mac.install.guide/python/command-not-found-python">Command not found: python</a> goes into more detail if you need more help.</p>
<h2 id="heading-using-an-out-of-date-python-version">Using an Out-of-date Python Version</h2>
<p>The current Python version is 3.12, as of October 2023. New releases of Python come yearly, typically released in October. The next version, Python 3.13, is expected in October 2024. The <a target="_blank" href="https://www.python.org/downloads/source/">newest Python version</a> is listed on the Python website.</p>
<p>Check your Mac Python version:</p>
<pre><code class="lang-bash">$ python --version
Python 3.12.4
</code></pre>
<p>You should see <code>Python 3.12.4</code> or a later version. You may not notice issues with an older Python version but it's a good idea to start any project with the newest version. The article about <a target="_blank" href="https://mac.install.guide/python/update">updating Python on Mac</a> explains how to update Python on macOS.</p>
<h2 id="heading-using-the-system-python">Using the System Python</h2>
<p>Macs no longer come with Python pre-installed. But you may have installed <a target="_blank" href="https://mac.install.guide/commandlinetools/">Xcode Command Line Tools</a> which includes Python 3.9.6, an older Python version that supports Apple development utilities.</p>
<p>Try <code>python3 --version</code> and <code>which -a python3</code> to check if Python was installed with Xcode Command Line Tools.</p>
<pre><code class="lang-bash">$ python3 --version
Python 3.9.6
$ <span class="hljs-built_in">which</span> -a python3
/usr/bin/python3
</code></pre>
<p>If you have Python 3.9.6 installed at <code>/usr/bin/python3</code>, you'll likely have the system Python installed by Xcode Command Line Tools. You can confirm this with <code>xcode-select -p</code> which will show if Xcode Command Line Tools is installed.</p>
<pre><code class="lang-bash">$  xcode-select -p
/Library/Developer/CommandLineTools
</code></pre>
<p>It's possible to <a target="_blank" href="https://mac.install.guide/python/alias-python3">alias python3 to python</a> but I would not recommend using the system Python for development. The system Python is intended for Apple utilities, not for you, so you should install Python on macOS separately if you want to run Python programs or develop in Python.</p>
<p>See my freeCodeCamp article <a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-python-on-a-mac/">How to Install Python on a Mac</a> to install Python for development.</p>
<h2 id="heading-using-the-homebrew-python">Using the Homebrew Python</h2>
<p>If you use Homebrew as a software package manager, you can easily install Python with <code>brew install python</code>. Homebrew-installed Python is suitable for running scripts but it has drawbacks for installing Python applications or Python software development, when packages are installed.</p>
<ul>
<li><strong>Homebrew's automatic updates.</strong> Homebrew automatically updates its Python as a dependency for other packages, potentially breaking your projects.</li>
<li><strong>Multiple projects may need different Python versions.</strong> Homebrew-installed Python is a single version and you may need to switch among different versions for different projects.</li>
<li><strong>Problems with environment isolation.</strong> Homebrew provides a single Python environment, which can cause conflicts between projects. Pip, the Python package manager, will block installation of packages unless you first create a virtual environment.</li>
</ul>
<p>You can check if Python is installed with Homebrew:</p>
<pre><code class="lang-bash">$ brew list | grep python
python@3.12
</code></pre>
<p>For running applications, it's best to <a target="_blank" href="https://mac.install.guide/python/pipx">install Pipx</a> and use <code>pipx install</code> instead of <code>pip install</code> to install programs. For Python development, it's best to  install Pyenv or install Rye for Python version management and virtual environments.</p>
<h2 id="heading-missing-pip">Missing Pip</h2>
<p>READMEs and tutorials often assume users are familiar with Python development tools and instruct them to install Python packages using Pip, the Python package manager. If you've followed instructions that start with <code>pip install &lt;package&gt;</code>, you may have run into the <code>zsh: command not found: pip</code> error.</p>
<p>This is the error you'll see:</p>
<pre><code class="lang-bash">$ pip install &lt;package&gt;
zsh: <span class="hljs-built_in">command</span> not found: pip
</code></pre>
<p>Pip is installed automatically with Python, so it's unusual to run the <code>python</code> command successfully and then <code>pip</code> and see the error. If you have Python installed, you should be able to use the <code>pip</code> command. You can try a special command that installs Pip:</p>
<pre><code class="lang-bash">$ python -m ensurepip --upgrade
</code></pre>
<p>If Pip is not already installed, this command will install it. Otherwise, nothing will happen. With this error, it's more likely that you have a Python installation that is not in your Mac Python PATH. See the article <a target="_blank" href="https://mac.install.guide/python/command-not-found-pip">Command not found: pip</a> for more details.</p>
<h2 id="heading-pip-package-installation-errors">Pip Package Installation Errors</h2>
<p>You will need to use Pip to install Python packages, unless you are using <a target="_blank" href="https://rye.astral.sh/">Rye</a> as an all-in-one tool. However, Pip has some drawbacks.</p>
<p>By default, the <code>pip install &lt;package&gt;</code> command installs the package "globally." This means that the package is added to the global Python <code>site-packages</code> directory, which may result in conflicts if different projects require different versions of the same package. </p>
<p>For example, if project A requires <code>package==1.0</code> and project B requires <code>package==2.0</code>, installing both packages globally may result in conflicts and <a target="_blank" href="https://en.wikipedia.org/wiki/Dependency_hell">dependency hell</a>. Without proper isolation, installing one project's dependencies can cause problems for another. To avoid these conflicts, create a Python virtual environment for each project.</p>
<p>There are two Python tools for creating virtual environments and using different versions of packages. <a target="_blank" href="https://docs.python.org/3/library/venv">Venv</a> is a built-in Python package. <a target="_blank" href="https://virtualenv.pypa.io/en/latest/">Virtualenv</a> is a more powerful tool with additional features. These tools allow <code>pip</code> to install Python packages into a virtual environment that has its own installation directories and does not share libraries with other virtual environments. Pip must be used in conjunction with either Venv or Virtualenv to successfully install packages.</p>
<p>When you try to install a package with Pip, you may see:</p>
<pre><code class="lang-bash">$ pip install &lt;package&gt;
error: externally-managed-environment
</code></pre>
<p>Recent versions of <code>pip</code> implement <a target="_blank" href="https://peps.python.org/pep-0668/">PEP 668</a> to prevent attempts to install packages globally, which results in the message <a target="_blank" href="https://mac.install.guide/python/externally-managed-environment">error: externally-managed-environment</a>. This error occurs when attempting to install a package globally without using a virtual environment. To resolve this error, create a virtual environment using Venv or Virtualenv and install the package within it.</p>
<h2 id="heading-more-on-mac-python">More on Mac Python</h2>
<p>You'll need to do more than install Python to begin a programming project, so I've also written a longer article about <a target="_blank" href="https://mac.install.guide/python/">Mac Python</a> that explains the fundamentals of version management, virtual environments, and package management, as well as comparing various installation options.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>A variety of competing development tools means that it can be difficult to get started with Python compared to other programming languages such as JavaScript, Rust, or Ruby. Python is moving towards standardization of tools, and there's rapid innovation as the community seeks to improve the developer experience.</p>
<p>For now, developing Python skills requires some knowledge of the Python ecosystem, the various tools, and how to use them. Still, Python is popular and powerful, and the tutorials on freeCodeCamp will help you learn the language and become a better developer.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Mac Control Keyboard Shortcuts – Hotkeys that Work Everywhere in MacOS ]]>
                </title>
                <description>
                    <![CDATA[ MacOS has several keyboard shortcuts that work everywhere – in your browser, in your terminal, in any place where you can input text. I call these the "Control Hotkeys" since they all involve holding the Control key. These shortcuts seem to originate... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/mac-control-keyboard-shortcuts-hotkeys-that-work-everywhere-in-macos/</link>
                <guid isPermaLink="false">662ae7cce716b61282d476b4</guid>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Thu, 25 Apr 2024 23:31:24 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1714092420192/21d4bc5e-4952-4cb6-b664-5e15ad7d96a0.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>MacOS has several keyboard shortcuts that work everywhere – in your browser, in your terminal, in any place where you can input text. I call these the "Control Hotkeys" since they all involve holding the Control key.</p>
<p>These shortcuts seem to originate from Unix (MacOS is built on top of Unix), and they work in Linux as well.</p>
<p>You may be asking: why should I bother learning these? Well I will tell you: <strong>I use these thousands of times each day</strong>. They dramatically speed up my typing and text editing. And I rarely ever have to use my mouse, the arrow keys, or take my fingers off the letter keys of my keyboard.</p>
<h3 id="heading-what-is-swap-caps-on-mac-and-why-do-it">What is Swap Caps on Mac and Why Do it?</h3>
<p>Caps Lock is a useless key. So I remap my Caps Lock key to instead be Control. Then I can easily move my left pinky over to hold it when I do these shortcuts.</p>
<p>You can do this in MacOS like this:</p>
<ol>
<li><p>Go to Mac preferences</p>
</li>
<li><p>In the search box, type "modifier keys" and click it</p>
</li>
<li><p>Set Caps Lock to Control</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1714087475422/4fe46c32-277c-49b9-801a-e1e405073336.png" alt="4fe46c32-277c-49b9-801a-e1e405073336" class="image--center mx-auto" width="1526" height="1330" loading="lazy"></p>
<h2 id="heading-heres-the-full-list-of-control-shortcuts-i-use-on-mac">Here's the full list of Control Shortcuts I use on Mac:</h2>
<h3 id="heading-movement">Movement</h3>
<ul>
<li><p>Control+f – move the cursor to the right</p>
</li>
<li><p>Control+b – move the cursor to the left (backward)</p>
</li>
<li><p>Control+n – Go to the next line</p>
</li>
<li><p>Control+p – Go to the previous line</p>
</li>
<li><p>Control+a – Go to the beginning of the current line</p>
</li>
<li><p>Control+e – Go to the end of the current line</p>
</li>
</ul>
<h3 id="heading-deleting-substituting">Deleting / Substituting</h3>
<ul>
<li><p>Control+h – backspace</p>
</li>
<li><p>Control+d – delete the character to the left (this is like the traditional delete key on Windows, and as far as I know, this shortcut is the only way to delete this way on Mac)</p>
</li>
<li><p>Control+t – switch the position of two characters</p>
</li>
<li><p>Control+k – "yank" the current line of text.</p>
</li>
<li><p>Control+y – "paste" the yanked line. Note that this uses a different clipboard than the traditional clipboard, so you can use to it have two things stored at the same time – one for your Command+v paste clipboard and one for your Control+y clipboard.</p>
</li>
</ul>
<p>Again, once you get used to these, they'll save you a TON of time. Just a few milliseconds each time, but those add up very quickly over the course of a day at the keyboard.</p>
<p>Happy coding.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Set a Different Location to Save All Screenshots on macOS ]]>
                </title>
                <description>
                    <![CDATA[ If you're coming to macOS from a different operating system (like Windows or Linux), it might feel odd that, by default, macOS saves screenshots in the Desktop folder. This make the desktop look messy after a while if you take a lot of screenshots! B... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-set-a-different-location-to-save-screenshots-on-mac/</link>
                <guid isPermaLink="false">66b902fd05ed142b6e64c271</guid>
                
                    <category>
                        <![CDATA[ configuration ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Md. Fahim Bin Amin ]]>
                </dc:creator>
                <pubDate>Wed, 17 Apr 2024 22:02:43 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/04/iewek-gnos-hhUx08PuYpc-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you're coming to macOS from a different operating system (like Windows or Linux), it might feel odd that, by default, macOS saves screenshots in the Desktop folder. This make the desktop look messy after a while if you take a lot of screenshots!</p>
<p>But it doesn't look messy if you create a specific directory for saving all the screenshots and your MacBook saves all the screenshots there automatically. </p>
<p>Configuring the settings might seem tricky for new MacBook users. So I will show you how you can do this within a few minutes with this step-by-step guide.</p>
<p>Keep in mind that although I am choosing the <code>Pictures/Screenshots</code> directory as my specific directory for saving all my screenshots, you can choose any directory you want.</p>
<p>For this article, I am using my newly purchased MacBook M1 Air (8/256) which is currently running on macOS Sonoma 14.4.1. But the same procedure is applicable for all the latest macOS versions as well.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/change-default-save-location-screenshots-mac-os-x-for-cleaner-desktop.w1456.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>A messy desktop full of screenshots :( (Source: <a target="_blank" href="https://macos.gadgethacks.com/how-to/change-default-save-location-screenshots-mac-os-x-for-cleaner-desktop-0160154/">Internet</a>)</em></p>
<h2 id="heading-how-to-choose-a-different-location">How to Choose a Different Location</h2>
<p>Firstly, you need to select a specific location where you want to save all the screenshots directly. </p>
<p>In my case, I created a separate folder for saving screenshots inside my "Pictures" directory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/Screenshot-2024-04-15-at-6.24.07-PM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Directory where I want to save the screenshots automatically</em></p>
<h2 id="heading-how-to-configure-the-screenshot-tool">How to Configure the Screenshot Tool</h2>
<p>Now we need to configure the default screenshot tool on macOS so that it automatically saves the screenshot images to our desired location. Here's how you can do that:</p>
<ol>
<li>Use <code>Shift</code> + <code>Command</code> + <code>5</code> to open the screenshot tool.</li>
<li>Click on "Options". Then click "Other Location...".</li>
<li>Select that specific location that you created earlier. </li>
<li>Now click "Ok", or "Open", or whatever it says to confirm that new location.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/IMG_20240415_175823.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Screenshot tool's options. I captured it using my phone. :)</em></p>
<p>That's it! From now on, whenever you use the default screenshot tool, it will automatically save all the screenshots in that newly specified location. This will help your desktop remain clutter free!</p>
<h2 id="heading-screenshot-shortcut">Screenshot Shortcut</h2>
<p>There are many people who still open the Screenshot tool using Spotlight or the launchpad. But there is a dedicated shortcut key for that!</p>
<p>You can use <code>Shift</code> + <code>Command</code> + <code>3</code> to take screenshot directly and save yourself a little time.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope you have learned something new from this article.</p>
<p>If you have enjoyed the procedures step-by-step, then don't forget to let me know on <a target="_blank" href="https://twitter.com/Fahim_FBA">Twitter/X</a> or <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>. I would appreciate it if you could endorse me for some relevant skillsets on <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>.</p>
<p>You can follow me on <a target="_blank" href="https://github.com/FahimFBA">GitHub</a> as well if you are interested in open source. Make sure to check <a target="_blank" href="https://fahimbinamin.com/">my website</a> (<a target="_blank" href="https://fahimbinamin.com/">https://fahimbinamin.com/</a>) as well.</p>
<p>Thank you so much! 😀</p>
<p>Cover image: Photo by <a target="_blank" href="https://unsplash.com/@imkirk?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Iewek Gnos</a> on <a target="_blank" href="https://unsplash.com/photos/macbook-pro-on-white-wooden-desk-hhUx08PuYpc?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Do Zsh Configuration Files Work? ]]>
                </title>
                <description>
                    <![CDATA[ Beginners often get confused when configuring Zsh shell on a Mac. Zsh shell offers four configuration files with no discernible differences. Particularly, ~/.zshrc and ~/.zprofile appear to be identical, leaving us wondering which one to use.  In thi... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-do-zsh-configuration-files-work/</link>
                <guid isPermaLink="false">66ba15ffad32b828c4c5be04</guid>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ shell ]]>
                    </category>
                
                    <category>
                        <![CDATA[ terminal ]]>
                    </category>
                
                    <category>
                        <![CDATA[ zsh ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Kehoe ]]>
                </dc:creator>
                <pubDate>Tue, 09 Jan 2024 20:37:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/07/pexels-mike-468229-1181772.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Beginners often get confused when configuring Zsh shell on a Mac.</p>
<p>Zsh shell offers four configuration files with no discernible differences. Particularly, <code>~/.zshrc</code> and <code>~/.zprofile</code> appear to be identical, leaving us wondering which one to use. </p>
<p>In this article, you'll learn the difference and a simple guideline for your shell configuration.</p>
<h2 id="heading-why-do-you-need-configuration">Why Do you Need Configuration?</h2>
<p>For programming on a Mac, the Terminal application is an essential tool in your development environment. The Terminal is a command-line interface (CLI) that allows you to interact with the operating system and run commands. </p>
<p>The Terminal or console gives you access to the Unix command line, or shell. </p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Z_shell">Zsh</a>, also known as Z shell, is a program that runs in the Terminal, interprets Unix commands, and interacts with the operating system. Zsh is the default shell program on MacOS.</p>
<p>Before you get started with programming on the Mac, you'll need to configure the shell. There are optional and convenient settings, such as aliases for hard-to-remember commands and a custom prompt that can display the directory you're in, among other things. </p>
<p>There are also some critical environment variables that make programs available or alter shell behavior. The <code>EDITOR</code> environment variable, for example, can set your preferred text editor. Oftentimes, when installing a programming language or software utilities, you need to set the <code>PATH</code> environment variable..</p>
<h2 id="heading-where-to-start">Where to Start</h2>
<p>Zsh configuration files are kept in the user's home directory and are named with a dot as the first character to keep them hidden by default. </p>
<p>Zsh recognizes four different configuration files in the user's home directory: <code>~/.zshenv</code>, <code>~/.zprofile</code>, <code>~/.zshrc</code>, and <code>~/.zlogin</code>. </p>
<p>This is where Zsh configuration becomes puzzling, even for experienced developers. Tutorials rarely explain the differences, especially between the <code>zprofile</code> and <code>zshrc</code> files, leaving curious developers scratching their heads and blindly following instructions.</p>
<h3 id="heading-how-is-the-shell-used">How is the Shell Used?</h3>
<p>To understand the differences among Zsh configuration files, consider various shell uses, which can be classified as interactive or non-interactive, login or non-login sessions.</p>
<ol>
<li>On macOS, each new terminal session is treated as a login shell, so opening any terminal window starts an interactive login session. Also, a system administrator who connects to a remote server via SSH initiates an interactive login session.</li>
<li>If a terminal window is already open and you run the command <code>zsh</code> to start a subshell, it will be interactive and non-login. Beginners rarely use subshells.</li>
<li>Automated shell scripts run without login or any user prompting. These are non-interactive and non-login.</li>
<li>Few people ever encounter a non-interactive login shell session. It requires starting a script with a special flag or piping output of a command into an SSH connection.</li>
</ol>
<h3 id="heading-how-do-the-configuration-files-work">How do the Configuration Files Work?</h3>
<p>These use cases necessitate different shell configurations, which explains why Zsh supports four different configuration files. Here's how the configuration files are used:</p>
<ul>
<li><code>~/.zshenv</code>: This is loaded universally for all types of shell sessions (interactive or non-interactive, login or non-login). It is the only configuration file that gets loaded for non-interactive and non-login scripts like cron jobs. However, macOS overrides this for <code>PATH</code> settings for interactive shells.</li>
<li><code>~/.zprofile</code>: Loaded for login shells (both interactive and the rare non-interactive sessions). MacOS uses this to set up the shell for any new terminal window. Subshells that start within the terminal window inherit settings but don't load <code>~/.zprofile</code> again.</li>
<li><code>~/.zshrc</code>: Loaded only for interactive shell sessions. It is loaded whenever you open a new terminal window or launch a subshell from a terminal window.</li>
<li><code>~/.zlogin</code>: Only used for login shell configurations, loaded after <code>.zprofile</code>. This is loaded whenever you open a new terminal window.</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/zsh-diagram.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-use-each-file">How to Use Each File</h2>
<p>With that in mind, let's consider which configuration files you should use.</p>
<ul>
<li><code>~/.zshenv</code>: It is universally loaded, so you could use it to configure the shell for automated processes like cron jobs. However, it is best to explicitly set up environmental variables for automated processes in scripts and leave nothing to chance. As a beginner, you will not use this configuration file. In fact, few experienced macOS developers use it.</li>
<li><code>~/.zprofile</code>: Homebrew recommends setting the <code>PATH</code> variable here. There's a reason <code>PATH</code> should be set in  <code>~/.zprofile</code> and not the universal <code>~/.zshenv</code>file: the macOS runs a utility <code>path_helper</code> (from <code>/etc/zprofile</code>) that sets the <code>PATH</code> order before <code>~/.zprofile</code> is loaded.</li>
<li><code>~/.zshrc</code>: This is the configuration file that most developers use. Use it to set aliases and a custom prompt for the terminal window. You can also use it to set the <code>PATH</code> (which many people do) but <code>~/.zprofile</code> is preferred.</li>
<li><code>~/.zlogin</code>: This is rarely used. Only important in managing the order of initialization tasks for login shells in complex environments. It can be used to display messages or system data.</li>
</ul>
<h2 id="heading-how-to-avoid-complications">How to Avoid Complications</h2>
<p>These configurations may appear complicated. It made sense in the early days of computing to start time-consuming processes at login and not have them repeat when a new terminal was launched.</p>
<p>MacOS now launches any new terminal window as a login shell, loading both  <code>~/.zprofile</code> and <code>~/.zshrc</code> files without concern for the shell startup time. So why not use one Zsh configuration file? A bow to history, plus configuration customization for the experts.</p>
<p>The key advantage of the <code>~/.zprofile</code> file (versus  <code>~/.zshenv</code>) is that it sets environment variables such as <code>PATH</code> without override from macOS. The  <code>~/.zshrc</code> file could be used for the same but, by convention and design, is intended for customizing the look and feel of the interactive terminal.</p>
<h2 id="heading-keep-it-simple">Keep It Simple</h2>
<p>If you're looking for simple guidelines, here's the current best practice.</p>
<ul>
<li>Use <code>~/.zprofile</code> to set the <code>PATH</code> and <code>EDITOR</code> environment variables.</li>
<li>Use <code>~/.zshrc</code> for aliases and a custom prompt, tweaking the appearance and behavior of the terminal.</li>
<li>If you write automated shell scripts, check and set environment variables in the script.</li>
</ul>
<h2 id="heading-more-information">More Information</h2>
<p>I've written other guides that go into detail about the following:</p>
<ul>
<li><a target="_blank" href="https://mac.install.guide/terminal/index.html">Mac Terminal</a></li>
<li><a target="_blank" href="https://mac.install.guide/terminal/configuration.html">Shell Configuration</a></li>
<li><a target="_blank" href="https://mac.install.guide/terminal/path.html">Mac PATH</a>.</li>
</ul>
<p>If you're just getting started, you'll need to know <a target="_blank" href="https://mac.install.guide/terminal/open.html">How to Open Mac Terminal</a> and <a target="_blank" href="https://mac.install.guide/commandlinetools/index.html">Install Xcode Command Line Tools</a>.</p>
<p>Configuring the Zsh shell is a critical step in preparing your Mac development environment. With your development environment set up, you'll be prepared for any tutorial you'll find on freeCodeCamp.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Cross-Platform Application with Next.js and Tauri ]]>
                </title>
                <description>
                    <![CDATA[ Tauri is a new Rust-based framework that builds an x86_64 cross-platform application for Windows, macOS, and Linux.  In this tutorial, we'll use Tauri and Next.js to build a desktop-based cross-platform application and publish it to the Snap store an... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-a-cross-platform-app-with-next-and-tauri/</link>
                <guid isPermaLink="false">66d0389e15ea3036a9539968</guid>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Next.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ node ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Rust ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Rajdeep Singh ]]>
                </dc:creator>
                <pubDate>Tue, 18 Oct 2022 16:38:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/Tauri-and-nextjs--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Tauri is a new Rust-based framework that builds an x86_64 cross-platform application for Windows, macOS, and Linux. </p>
<p>In this tutorial, we'll use Tauri and Next.js to build a desktop-based cross-platform application and publish it to the Snap store and AppImage.</p>
<p>So why is building a cross-platform app, that works on Windows, Mac, and Linux, important these days? Well, it helps companies target a larger audience and increase their revenue, without having to build three separate apps.</p>
<p>Many companies and developers use Next.js as a front-end when building a website. In this tutorial, we'll use Next and Tauri to build a desktop-based cross-platform application that'll be available on Windows, macOS, and Linux. </p>
<h3 id="heading-demo-of-the-project">Demo of the project</h3>
<p>To build this cross-platform application, you need <a target="_blank" href="https://tauri.app/">Tauri</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Markdown">markdown</a>, <a target="_blank" href="https://www.npmjs.com/package/contentlayer">Contentlayer</a>, <a target="_blank" href="http://pnpm.io/">pnpm</a>, and <a target="_blank" href="https://nextjs.org/">Next.js</a>. If you check how my application looks, you can install the application with <a target="_blank" href="https://snapcraft.io/docs/snap-tutorials">snap-cli</a>, <a target="_blank" href="https://appimage.org/">AppImage</a>, or download the application via the link and install it.</p>
<p>Let's see what these tools do:</p>
<ul>
<li>we'll use Next.js for building the frontend part of the website </li>
<li>the markdown npm package helps convert markdown files into HTML </li>
<li>the Contentlayer npm package helps us manage markdown files in the project.</li>
<li>we'll use Tauri to build the cross-platform application binary</li>
<li>and finally, we'll use pnpm as our Node package manager.</li>
</ul>
<pre><code><span class="hljs-comment">// Install with snap</span>
snap install <span class="hljs-keyword">static</span>-blog-app

or

<span class="hljs-comment">// install with AppImage</span>
<span class="hljs-attr">https</span>:<span class="hljs-comment">//github.com/officialrajdeepsingh/static-blog-app/releases/download/v0.0.2/static-blog-app_0.0.2_amd64.AppImage</span>

or

<span class="hljs-comment">// Install on macOS</span>
<span class="hljs-attr">https</span>:<span class="hljs-comment">//github.com/officialrajdeepsingh/static-blog-app/releases/download/v0.0.2/static-blog-app_0.0.2_x64.dmg</span>

or

<span class="hljs-comment">// Install on Windows</span>
<span class="hljs-attr">https</span>:<span class="hljs-comment">//github.com/officialrajdeepsingh/static-blog-app/releases/download/v0.0.2/static-blog-app_0.0.2_x64_en-US.msi</span>
</code></pre><h2 id="heading-table-of-contents">Table of contents:</h2>
<ul>
<li><a class="post-section-overview" href="#heading-what-is-nextjs">What is Next.js?</a></li>
<li><a class="post-section-overview" href="#heading-what-is-tauri">What is Tauri?</a></li>
<li><a class="post-section-overview" href="#heading-computer-architecture">Computer Architecture</a></li>
<li><a class="post-section-overview" href="#heading-how-to-create-a-new-project-with-nextjs-and-tauri">How to Create a New Project with Next.js and Tauri</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-an-application-with-tauri">How to Build an Application with Tauri</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-an-application-for-the-snap-store-or-snapcraft">How to Build an Application for the Snap Store or Snapcraft</a></li>
<li><a class="post-section-overview" href="#heading-how-to-build-a-cross-platform-application-with-github-actions">How to Build a Cross-Platform Application with GitHub Actions</a></li>
<li><a class="post-section-overview" href="#heading-how-to-publish-the-app">How to Publish the App</a></li>
<li><a class="post-section-overview" href="#heading-faq">FAQ</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-what-is-nextjs">What is Next.js?</h2>
<p><a target="_blank" href="https://nextjs.org/">Next</a> is a framework base on React. It has many features that let you build a website and enhance the user experience.</p>
<p>To learn more about Next, you can <a target="_blank" href="https://www.freecodecamp.org/news/nextjs-tutorial/">read this helpful tutorial I found</a> on freeCodeCamp written by Reed Barger.</p>
<h2 id="heading-what-is-tauri">What is Tauri?</h2>
<p><a target="_blank" href="https://tauri.app/">Tauri</a> is a new framework that helps you build cross-platform desktop applications. Tauri is built based on the Rust language. Rust is faster, more secure, and has fewer memory issues than other languages.</p>
<p>Tauri has many features, but I'll mention some of the important ones for a front-end developer.</p>
<ol>
<li>Tauri supports HTML, CSS, and JavaScript.</li>
<li>Tauri supports a lot of front-end frameworks and libraries, for example, React.js, Next.js, Vite, and Svelte kit.</li>
<li>With Tauri, you don't need to learn GTK, GJS, and app build commands or AppImage builder.</li>
<li>Tauri provides JavaScript API support. You can use it inside JS easily. For example, the window API helps all tasks related to the window. </li>
<li>You can quickly build a cross-application bundler size with one command.</li>
<li>Tauri provides an update handler to update older Tauri versions to the newest. You do not need to use other services and libraries to achieve the self-update functionality.</li>
<li>In Tauri, you call Rust functions within JavaScript.</li>
</ol>
<p>Tauri improves the development experience by providing an inbuilt JavaScript, npm, and Rust CLI tool, plugins, and the tauri-action GitHub workflow. </p>
<p>All these tools help you write code faster and create a production-ready app in less time. But the big thing Tauri provides is beginner-ready, easily understandable documentation. </p>
<p><a target="_blank" href="https://www.gtk.org/">GTK</a> is a free and open-source cross-platform widget toolkit for creating graphical user interfaces for applications.</p>
<p><a target="_blank" href="https://gjs.guide/">GJS</a> is a JavaScript library for Gnome to build application interfaces. GJS is built on the <a target="_blank" href="https://spidermonkey.dev/">SpiderMonkey</a> JavaScript engine.</p>
<h2 id="heading-computer-architecture">Computer Architecture</h2>
<p>Every operating system comes with different architecture. Building cross-platform applications or performing <a target="_blank" href="https://rust-lang.github.io/rustup/cross-compilation.html#cross-compilation">cross-compilation</a> is not easy. Based on the architecture, you can understand where the application is run. In other words, which architecture requires running our applications like i386, ARM, or x86_64?</p>
<p>The most common architectures in the computer science world are <a target="_blank" href="https://en.wikipedia.org/wiki/ARM_architecture_family">ARM</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/I386">i386</a>, and <a target="_blank" href="https://en.wikipedia.org/wiki/X86-64">AMD (x86_64)</a>. Less technical users might know it as 64 or 32-bit architecture.</p>
<p>Rust uses different types of architecture to install itself. In my case, my laptop hardware support x86_64  and I have Ubuntu installed. On Ubuntu x86_64, the default <code>stable-x86_64-unknown-linux-gnu</code> Rust toolchain is used to build Tauri applications. </p>
<p>The Rust toolchain builds <a target="_blank" href="https://en.wikipedia.org/wiki/X86-64">AMD (x86_64)</a> applications. That is why Tauri builds cross-platform application (for Windows, macOs, and Linux distros) but does not build cross-architecture ones (builds applications for all ARM, i386, and x86_67 architecture). </p>
<h3 id="heading-how-to-check-your-architecture-in-linux-by-command">How to check your architecture in Linux by command:</h3>
<pre><code class="lang-bash">cat /etc/debian_version

    or 

dpkg --print-architecture

    or

uname -m

    or

arch
</code></pre>
<h3 id="heading-how-to-check-which-toolchain-tauri-is-using">How to check which toolchain Tauri is using:</h3>
<p>The toolchain is a utility provided by Rust itself. You can install different toolchains with the <code>rustup</code> command.</p>
<p>You can use different types of Rust toolchains according to your computer's architecture. You can easily check which toolchain is installed in your operating system with the <code>tauri npm</code>, <code>yarn</code>, or <code>pnpm</code> command. </p>
<p>In my project, I'm using pnpm to create a new project, so I use the <code>pnpm</code> command. Again, based on the toolchain, we build apps for different architectures. </p>
<p>The default Ubuntu (x86_64) is based on the <code>stable-x86_64-unknown-linux-gnu</code> toolchain. The Rust <code>stable-x86_64-unknown-linux-gnu</code> toolchain builds only AMD-based applications. </p>
<p>The Rust toolchain is different according to the operating system and distro you're using. The default Rust toolchain is installed when you install Rust on your computer.</p>
<p>Here are the commands to check your architecture:</p>
<pre><code>pnpm tauri info

or

yarn tauri info

or

npm run tauri info
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/pnpm-tauri-info.png" alt="pnpm tauri info command output" width="600" height="400" loading="lazy">
<em>pnpm tauri info command output</em></p>
<p>Tauri officially supports macOS, Windows, and Linux distros and you can't build mobile applications with Tauri (you'll face lots of issues, and after resolving them all you'll end up building your mobile app directly).</p>
<p>I found a <a target="_blank" href="https://www.youtube.com/watch?v=wp6s2sm_7VE">great tutorial on the Rust toolchain as well as cross-compilation</a>. The tutorial guides you and provides you with a deeper understanding of the Rust toolchain.</p>
<p>You can use the <code>rustup</code> command to install a different type of toolchain if you'd like. To learn more about the Rust toolchain and the <code>rustup</code> command, I'd suggest starting with the <a target="_blank" href="https://rust-lang.github.io/rustup/concepts/toolchains.html">Rust toolchain docs</a>.</p>
<h2 id="heading-how-to-create-a-new-project-with-nextjs-and-tauri">How to Create a New Project with Next.js and Tauri</h2>
<p>You can create a Tauri app with bash, cargo, PowerShell npm, yarn, or pnpm. We'll use pnpm to create a new Tauri set-up in this tutorial. pnpm is the new package manager for Node.js.</p>
<h3 id="heading-create-the-ui-template-in-tauri">Create the UI template in Tauri</h3>
<p>You can use different types of front-end frameworks for the Tauri app, for example, Vue, React, Svelte, Solid, Next.js, Preact, Angular, and Svelte. I've chosen to use Nextjs as the front-end template for our Tauri app in this tutorial.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screenshot-from-2022-10-11-12-44-05.png" alt="Image" width="600" height="400" loading="lazy">
<em>pnpm - choose your UI template</em></p>
<h3 id="heading-create-a-new-application-with-pnpm">Create a new application with pnpm</h3>
<p>You can use any other node package manager to create a new app like yarn or npm. I choose the pnpm node package manager, because pnpm is fast compared to yarn and npm.  </p>
<pre><code class="lang-bash">pnpm create tauri-app
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/create-tauri-app.png" alt="create tauri-app with nextjs" width="600" height="400" loading="lazy">
<em>Create tauri-app with nextjs</em></p>
<p>Now Tauri has created the my-demo app successfully. You can directly change the directory (folder) <code>cd my-demo</code> with the change directory (cd) command. Then you can run the <code>pnpm install</code> command to install all the dependencies required for the project. Finally, run the <code>tauri dev</code> command to lunch a new Tauri application window.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/tauri-dev.png" alt="Run local development server in tauri" width="600" height="400" loading="lazy">
<em>Run local development server in tauri</em></p>
<p>After downloading and compiling the code, you can see a new window open in your system using the <code>pnpm tauri dev</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screenshot-from-2022-10-11-14-03-45.png" alt="Open a new window by tauri" width="600" height="400" loading="lazy">
<em>Open a new window by tauri</em></p>
<p>The default Tauri folder structure comes with <code>pnpm create tauri-app</code>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/tauri-folder-struture.png" alt="Tauri default folder structure" width="600" height="400" loading="lazy">
<em>Tauri default folder structure</em></p>
<ol>
<li>You use the <code>next.config.js</code> file for Next.js configuration.</li>
<li>The <code>next-env.d.ts</code> file automatically generates for TypeScript</li>
<li>The <code>package.json</code> file contains all information for npm, yarn, and pnpm.</li>
<li>The <code>pnpm-lock.yaml</code> file is created by pnpm to store all package information with the version.</li>
<li>The <code>README.MD</code> file contains all the information about the project.</li>
<li>The <code>src</code> folder contains all the Next.js code with pages, components, and CSS files.</li>
<li>You use the <code>src-tauri</code> folder for Rust and Rust configuration.</li>
<li><code>src-tauri/icons</code> contains all icons for the app.</li>
<li><code>src-tauri/Cargo.lock</code> generated by cargo to store all package information.</li>
<li><code>src-tauri/Cargo.toml</code> generated by cargo and store all packages and confirmation for the project.</li>
<li><code>src-tauri/src</code> used to write the Rust code.</li>
<li><code>src-tauri/target</code> generated by the <code>pnpm tauri dev</code> command. It contains all the binary for the project.</li>
<li><code>tauri.config.json</code> file used for Tauri configuration.  </li>
</ol>
<h3 id="heading-create-the-ui-for-the-app-with-nextjs">Create the UI for the app with Next.js</h3>
<p>I'm using my <a target="_blank" href="https://github.com/officialrajdeepsingh/contentlayer">old Next.js static site</a> and I'll convert it into a desktop application. The Next static website code is available on <a target="_blank" href="https://github.com/officialrajdeepsingh/contentlayer">GitHub so you can easily download it</a>.</p>
<p>First, I need to copy my old posts along with the public, components, and pages folders and paste them into the new Tauri project. Then I'll remove the bootstrap CSS, and use Tailwind CSS to design the application's layout. </p>
<p>I already explained the process step-by-step on <a target="_blank" href="https://medium.com/nextjs/install-tailwind-css-in-next-js-37a56bd64fa7">how to install TailwindCSS with Next in this article</a>. You can read and follow the same setup to install Tailwind if you don't have it installed already.</p>
<h3 id="heading-generate-an-icon-for-the-application">Generate an icon for the application</h3>
<p>The icon is important for the application. The user will click on the icon to open your application in Windows, macOS, and Linux.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Screenshot-from-2022-10-11-17-57-45.png" alt="Serach your application in ubuntu" width="600" height="400" loading="lazy">
<em>Ubuntu static-blog-app icon</em></p>
<p>Generating icons for applications with various types and sizes can be complicated. You need icons for Windows, macOS, and Linux. Every operating system has its own guidelines for icons.</p>
<p>Tauri comes with a CLI tool that generates cross-operating system icons for applications based on icon configuration in Tauri. Here's the command to generate the icons:</p>
<pre><code class="lang-bash">pnpm tauri icon path-of-image
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/create-icon-for-app.png" alt="Image" width="600" height="400" loading="lazy">
<em>Generating icons</em></p>
<p>You can use an online website to generate icons for Tauri, and then add all icons into the <code>tauri-app/src-tauri/icons</code> folder.</p>
<p>You can change the icon configuration in the <code>tauri-app/src-tauri/tauri.conf.json</code> file:</p>
<pre><code class="lang-json"><span class="hljs-string">"icon"</span>: [
        <span class="hljs-string">"icons/32x32.png"</span>,
        <span class="hljs-string">"icons/128x128.png"</span>,
        <span class="hljs-string">"icons/128x128@2x.png"</span>,
        <span class="hljs-string">"icons/icon.icns"</span>,
        <span class="hljs-string">"icons/icon.ico"</span>
],
</code></pre>
<h2 id="heading-how-to-build-an-application-with-tauri">How to Build an Application with Tauri</h2>
<p>To build the application in Tauri, you need to run only one command in the terminal. Tauri automatically generates the build applications. </p>
<p>The first application is for the <code>.deb</code> Debian-based distro and the second application is appImage. The application build file changes from operating system to operating system.</p>
<p><a target="_blank" href="https://appimage.org/">AppImage</a> is a universal application distribution for the cross-Linux distro. So you create one AppImage and run your application on any distro. </p>
<pre><code class="lang-bash">pnpm tauri build
</code></pre>
<p>The first time you run the <code>tauri build</code> command, you may face a bundle identifier error in the terminal.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/_bundle-identifier-error-in-tauri.png" alt="Image" width="600" height="400" loading="lazy">
<em>Bundle identifier error</em></p>
<p>To solve the bundle identifier error, first open the <code>my-demo/src-tauri/tauri.conf.json</code> file and find <code>identifier</code>. Then change the <code>"identifier": "com.tauri.dev"</code> value according to your app. Make sure the <code>identifier</code> value is unique across the application.</p>
<pre><code class="lang-json"><span class="hljs-string">"identifier"</span>: <span class="hljs-string">"com.officialrajdeepsingh.blog"</span>,
</code></pre>
<p>After changing the <code>identifier</code> in the <code>tauri.conf.json</code> file, <strong>rerun</strong> the <code>pnpm tauri build</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/tauri-building-application.png" alt="Image" width="600" height="400" loading="lazy">
<em>Run tauri build command</em></p>
<p>After successfully running the <code>tauri build</code> command, Tauri generates two files:</p>
<ol>
<li>my-demo_0.0.0_amd64.deb</li>
<li>my-demo_0.0.0_amd64.AppImage</li>
</ol>
<p>The bot file binary works only for the <strong>amd64</strong> architecture and doesn't work on the <strong>arm</strong> and <strong>i386</strong> architecture.</p>
<p>The file extension tells us where we use it.</p>
<ol>
<li><code>.deb</code> file extension is used for Debian.</li>
<li><code>.AppImage</code> file extension is used for all Linux distros to install the app.</li>
<li><code>.dmg</code> file extension is used for macOS.</li>
<li><code>.msi</code> file extension is used for Windows.</li>
<li><code>.snap</code> file extension is used for the Linux distro.</li>
</ol>
<h3 id="heading-install-deb-and-appimage-locally">Install <code>.deb</code> and <code>.AppImage</code> locally</h3>
<p>To test for both binary  <code>my-demo_0.0.0_amd64.deb</code> and <code>my-demo_0.0.0_amd64.AppImage</code>, first install them locally and check that everything is working fine.</p>
<p><strong><code>.deb</code> file</strong></p>
<pre><code class="lang-bash">❯ dpkg -i static-blog-app_0.0.2_amd64
</code></pre>
<p><strong><code>.AppImage</code> file</strong></p>
<p>Firstly add the file permission for executing and then run the file.</p>
<p><strong>Step 1</strong>: run <code>chmod +x my-demo_0.0.0_amd64.AppImage</code></p>
<p><strong>Step 2</strong>: run <code>./my-demo_0.0.0_amd64.AppImage</code> hit enter to run <code>AppImage</code> base binary.</p>
<p>Tauri automatically generates both <code>.deb</code> and <code>.AppImage</code> files with their own file names.</p>
<p>Both files use the same naming conversion syntax all around the world. This file name conversion is not for Tauri. The Flatpak builder and Snapcraft also use the same kind of file naming syntax.</p>
<pre><code class="lang-bash">Syntax

&lt;name-of-appliciation&gt; &lt;version&gt; &lt;architecture&gt; &lt;File extension&gt;

Example
1. my-demo_0.0.0_amd64.deb
2. my-demo_0.0.0_amd64.AppImage
</code></pre>
<h2 id="heading-how-to-build-an-application-for-the-snap-store-or-snapcraft">How to Build an Application for the Snap Store or Snapcraft</h2>
<p>Snapcraft or the Snap store is a Linux application distribution. It helps distribute your applications across Linux distros. Users can install your application with one click and the use of a command line (Terminal).</p>
<p>Snapcraft is maintained and built by Canonical (Ubuntu). Canonical provides all Linux application distributions and does not work for macOS and Windows.</p>
<p>Before building a snap, first you need to install <a target="_blank" href="https://snapcraft.io/docs/snapcraft-overview">Snapcraft</a>.</p>
<pre><code class="lang-bash">sudo apt-get update
sudo snap install snapcraft --classic
</code></pre>
<h3 id="heading-how-to-build-an-application-for-the-snap-store">How to build an application for the Snap store</h3>
<p>I will guide you with a simple way to generate the snap file for Snapcraft. The snap file is a binary file, similar to the <code>.deb</code>  file. The Snap store uses a special <code>.snap</code> extension for the file. That indicates that it's a snap application installed on a linux distro.</p>
<p>You can also develop your first snap app quickly if you are a beginner – simply follow these steps (we'll go through each one by one):</p>
<ol>
<li>Install the <a target="_blank" href="https://www.npmjs.com/package/tauri-snap-packager">tauri-snap-packager</a> npm package</li>
<li>Add configuration in the <code>package.json</code> file</li>
<li>Build the snap</li>
<li>Handle any errors</li>
<li>How to fix the tauri-snap-packager takes too much time error</li>
</ol>
<h3 id="heading-install-tauri-snap-packager-npm-package">Install tauri-snap-packager npm package</h3>
<p>Firstly install the <a target="_blank" href="https://www.npmjs.com/package/tauri-snap-packager">tauri-snap-packager</a> npm package in your project. The <a target="_blank" href="https://www.npmjs.com/package/tauri-snap-packager">tauri-snap-packager</a> npm package helps you create a snapcraft configuration file.</p>
<pre><code class="lang-bash">npm install --save-dev tauri-snap-packager

<span class="hljs-comment"># Or with yarn</span>

yarn add --dev tauri-snap-packager

<span class="hljs-comment"># Or with pnpm</span>

pnpm add tauri-snap-packager
</code></pre>
<h3 id="heading-add-configuration-in-the-packagejson-file">Add configuration in the package.json file</h3>
<p>After installation, complete the tauri-snap-package npm package. Now configure the  <code>"tauri-snap": "tauri-snap-packager"</code> tauri-snap-package script in the <code>package.json</code> file.</p>
<pre><code class="lang-json"><span class="hljs-string">"scripts"</span>: {
    <span class="hljs-attr">"dev"</span>: <span class="hljs-string">"next dev -p 1420"</span>,
    <span class="hljs-attr">"build"</span>: <span class="hljs-string">"next build &amp;&amp; next export -o dist"</span>,
    <span class="hljs-attr">"tauri"</span>: <span class="hljs-string">"tauri"</span>,
    <span class="hljs-attr">"lint"</span>: <span class="hljs-string">"next lint"</span>,

    <span class="hljs-attr">"tauri-snap"</span>: <span class="hljs-string">"tauri-snap-packager"</span>

  },
</code></pre>
<h3 id="heading-build-the-snap">Build the snap</h3>
<p>Now you run the <code>pnpm tauri-snap</code> command in your project folder. <code>tauri-snap</code> automatically creates a snap folder in <code>src-tauri/target</code>. Inside the snap folder <code>pnpm tauri-snap</code> creates a new <code>snapcraft.yaml</code> file with all the configurations. All the configuration is based on your Tauri configuration.</p>
<pre><code class="lang-src-tauri/target/snap/snapcraft.yaml">name: static-blog-app
base: core18
version: 0.0.2
summary: Tauri app.
description: Awesome Tauri app.
grade: devel
confinement: strict
source-code: https://github.com/officialrajdeepsingh/static-blog-app
apps:
  static-blog-app:
    command: static-blog-app
    extensions:
      - gnome-3-34
    desktop: static-blog-app.desktop
parts:
  dump-binary:
    plugin: dump
    source: ./target/release
    source-type: local
    stage:
      - lib
      - icons
      - static-blog-app
      - static-blog-app.desktop
    prime:
      - lib
      - icons
      - static-blog-app
      - static-blog-app.desktop
    stage-packages:
      - libc6
</code></pre>
<h3 id="heading-how-to-fix-the-errors">How to fix the errors</h3>
<p>You'll get an error while validating <code>snapcraft.yaml</code> with the <code>pnpm tauri-snap</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/Issues-while-validating-snapcraft.yaml--1-.png" alt="Issues while validating snapcraft.yaml" width="600" height="400" loading="lazy">
<em>Issues while validating snapcraft.yaml</em></p>
<p>Your application name may contain some words that are not allowed, like spaces, numbers, uppercase letters, and so on. For example, Static-blog-website does not allow you to use your name with a capital letter. Simply use a small case word for a name like static-blog-website.</p>
<p>You might also see an error <code>you need 'multipass' set-up to build snaps</code> when running the <code>pnpm tauri-snap --trace-warnings</code> command.</p>
<p>The <code>--trace-warnings</code> Node.js flag helps debug or trace the error.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/You-need-multipass-.png" alt="You need 'multipass' set-up to build snaps" width="600" height="400" loading="lazy">
<em>You need a multipass set-up to build snaps error.</em></p>
<p>To solve the error, you must install the <a target="_blank" href="https://multipass.run/">multipass package</a> in Ubuntu. The tauri-snap-package uses the Snapcraft command as a background to build a snap file. So Snapcraft requires multipass to build a snap package.</p>
<pre><code>sudo snap install multipass
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/install-multipass.png" alt="Install multipass in ubuntu" width="600" height="400" loading="lazy">
<em>Install multipass in ubuntu</em></p>
<h3 id="heading-tauri-snap-packager-takes-too-much-time">Tauri-snap-packager takes too much time.</h3>
<p>If the <a target="_blank" href="https://www.npmjs.com/package/tauri-snap-packager">tauri-snap-packager</a> takes too much time to build the snap binary or you feel your application is stuck and does not show any output in the terminal, then just stop the command. The tauri-snap-packager isn't working for you, so you can use the <code>snapcraft</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/build-snap-by-tauri-snap.png" alt="Create a snap configuration with Tauri-snap-packager " width="600" height="400" loading="lazy">
<em>Create a snap configuration with Tauri-snap-packager</em></p>
<p>This error means that the <code>pnpm tauri-snap</code> the command is not working and it takes too much time. It's likely because the tauri-snap-package npm package isn't working correctly. </p>
<p>To solve this issue, <strong>run the snapcraft command in the same folder where your snap folder was created</strong>. Before running the snapcraft command, first, install the snapd command tool. Snapd is a REST API daemon for managing snap packages. To learn more about snapd, I <a target="_blank" href="https://codeburst.io/how-to-install-and-use-snap-on-ubuntu-18-04-9fcb6e3b34f9">found a great article</a> written by Oyetoke Tobi Emmanuel.</p>
<pre><code>snap install --channel stable snapd
</code></pre><p>After installation is complete, run the <code>snapcraft</code> command in the <code>tauri-app/src-tauri/target</code> folder. The <code>target</code> folder is generated by the <code>pnpm tauri dev</code> command. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/snap-_core18_-has-no-updates-available.png" alt="Face common error with snapcraft command." width="600" height="400" loading="lazy">
<em>Face common error with snapcraft command</em></p>
<p>You may get a snap "core18" has no updates available error with Snapcraft. <strong>But the core18 is not a big issue.</strong> Simply update your distro package with the <code>sudo apt-get update &amp;&amp; sudo apt-get upgrade</code> command, then restart your terminal or laptop. <a target="_blank" href="https://www.youtube.com/watch?v=PNii2y97D0s&amp;ab_channel=BassoniaTv">Here's a youtube tutorial</a> that can help you solve your core18 error problem.</p>
<p>"Snapd has not logged" means that first, you need to login into your <a target="_blank" href="https://snapcraft.io/">snapcraft account</a>. For login run <code>snapcraft login</code>.</p>
<p>After you solve the core 18 issue, now run the <code>snapcraft</code> command again and build your snap binary file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/snapcraft.png" alt="Build a new binary with snapcraft" width="600" height="400" loading="lazy">
<em>Create a binary with snapcraft</em></p>
<p>The Snapcraft creates a new binary <code>static-blog-app_0.0.0_amd64.snap</code> file. Now the <code>static-blog-app_0.0.0_amd64.snap</code> file is ready to publish on the Snapcraft website or snap store.</p>
<h3 id="heading-how-to-install-static-blog-app000amd64snap-locally-in-the-system">How to install static-blog-app_0.0.0_amd64.snap locally in the system</h3>
<p>If you install the <code>static-blog-app_0.0.0_amd64.snap</code> file locally with the following command, you might find the signatures metadata error.</p>
<pre><code class="lang-bash">sudo snap install ./static-blog-app_0.0.0_amd64.snap
</code></pre>
<p><strong>Here's the error:</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/install-locally-snap-file.png" alt="cannot find signatures metadata error for snap" width="600" height="400" loading="lazy">
<em>cannot find signatures metadata error for snap</em></p>
<p>To solve this error, you need to run the snap command with the <code>--dangerous</code> flag.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/install-snap-locally-package-with-snap.png" alt="Install snap locally package" width="600" height="400" loading="lazy">
<em>Install snap locally package</em></p>
<h2 id="heading-how-to-build-a-cross-platform-application-with-github-actions">How to Build a Cross-Platform Application with GitHub Actions</h2>
<p>GitHub Actions is a <strong>continuous integration and continuous delivery (CI/CD)</strong> platform or pipeline that allows you to automate tasks like building, testing, and deployment. </p>
<p>You can triage GitHub actions on certain events like somebody pushing new code to the GitHub repository and running tests on the code. If the test passes then the code gets added to the main or master branch. </p>
<p>If you want to build cross-platform applications for Windows, macOS, and Linux, the easiest way is using the GitHub actions workflow. This workflow runs on a specific event like push, pull, and so on.</p>
<p>To try this out, you'll need to create a new action in your project. First, create a new <code>.github/workflows</code> folder. After in the <code>workflows</code>, create a file with any name with a <code>.yml</code> extension.</p>
<p>The Tauri app provides a <a target="_blank" href="https://github.com/tauri-apps/tauri-action">GitHub action configuration</a>. With Tauri actions, you can quickly build cross-platform applications for Windows, macOS, and Linux distros with the GitHub workflow.</p>
<pre><code class="lang-my-demo/.github/workflows/build.yml">name: Build application
on:
  push:
    branches:
      - 'main'
  workflow_dispatch:

jobs:
  release:
    strategy:
      fail-fast: false
      matrix:
        platform: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16

      - uses: pnpm/action-setup@v2.0.1
        name: Install pnpm
        id: pnpm-install
        with:
          version: 7.13.1
          run_install: false

      - name: Get pnpm store directory
        id: pnpm-cache
        run: |
          echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

      - uses: actions/cache@v3
        name: Setup pnpm cache
        with:
          path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            ${{ runner.os }}-pnpm-store-

      - name: Rust setup
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: Install dependencies (ubuntu only)
        if: matrix.platform == 'ubuntu-latest'
        run: |
          sudo apt-get update
          sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
      - name: Install app dependencies and build web
        run: yarn &amp;&amp; yarn build

      - name: Build the app
        uses: tauri-apps/tauri-action@v0
        env:
          GITHUB_TOKEN: ${{ secrets.STATIC_BLOG_APP }}
        with:
          tagName: v__VERSION__ # tauri-action replaces \_\_VERSION\_\_ with the app version
          releaseName: 'v__VERSION__'
          releaseBody: 'See the assets to download this version and install.'
          releaseDraft: true
          prerelease: false
</code></pre>
<p>Following the GitHub action, you can build your application on every push after successfully building the application and show all files in the GitHub release assets section. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/asset-folder.png" alt="Show all applications in the assets section" width="600" height="400" loading="lazy">
<em>Show all applications in the assets section.</em></p>
<h2 id="heading-how-to-publish-the-app">How to Publish the App</h2>
<p>Publishing the package is the core of this article. A lot of people build their own Linux applications. But then they can't figure out how to submit the app on various distributions like Snapcraft, AppImage, and Homebrew.</p>
<p>So now I'll show how to submit a static-blog-app to Snapcraft and AppImage. </p>
<h3 id="heading-how-to-publish-the-app-into-the-snap-store-or-snapcraft">How to publish the app into the snap store or snapcraft</h3>
<p>To publish a new package on the snap store, make sure you have a <code>.snap</code> binary available. Otherwise, first, build the <code>.snap</code> binary for the application (which we already went over above).</p>
<p>Go to the <code>target</code> or whatever folder where you created the <code>.snp</code> binary. Then run the <code>snapcraft</code> command. Make sure you first log in with your Snapcraft account. For login, run <code>snapcraft login</code>. Then run the following command with the argument I mentioned:</p>
<p>Syntax:</p>
<pre><code>snapcraft upload &lt;Opation&gt; name-<span class="hljs-keyword">of</span>-file
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/devel-in-snap.png" alt="Publish a new package to snapcraft" width="600" height="400" loading="lazy">
<em>Publish a new package to snap in devel release</em></p>
<p>After successfully getting into your account, then you can add or change the information regarding your package icon, name, and so on.</p>
<pre><code class="lang-bash">snapcraft upload --release=stable ./static-blog-app_0.0.0_amd64.snap
</code></pre>
<p>In the <code>devel</code> mode, you'll see a message on the application installation page. <code>devel</code> means development mode.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/static-app-in-devmode.png" alt="Application in development mode" width="600" height="400" loading="lazy">
<em>Application in development mode</em></p>
<p>By default, your package publishes all the information collected by <code>src-tauri/target/snap/snapcraft.yaml</code> in the edge release. To understand more about the Snapcraft release system, you can read the <a target="_blank" href="https://snapcraft.io/docs/release-management">release documentation</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/staticblogappforlinux.png" alt="Image" width="600" height="400" loading="lazy">
<em>Go to the dashboard and add or update all the information regarding the app.</em></p>
<p>Make sure to use a banner image with a size of 720 x 240 for the snap.</p>
<h3 id="heading-how-to-publish-your-application-on-snapcraft">How to publish your application on Snapcraft</h3>
<p>When you upload your application to your Snapcraft account, your application is private. To change how it's published, drag your available release into one of the release channels. </p>
<p>Go to the dashboard&gt; my snap&gt; select your snap&gt; releases, and according to your requirements, add your application to one of the provided releases. The default is edge release. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/releases-in-snap.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-add-an-application-to-a-stable-release">How to add an application to a stable release</h3>
<p>To change the application to a stable release, go to the snap configuration <code>src-tauri/target/snap/snapcraft.yaml</code> file and update your  <code>grade: devel</code> to <code>grade: stable</code>:</p>
<pre><code class="lang-yaml"><span class="hljs-string">....</span>

<span class="hljs-attr">grade:</span> <span class="hljs-string">stable</span>

<span class="hljs-string">....</span>
</code></pre>
<p>Now your application goes to stable release or channel and re-uploads your application.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/publish-in-snap-1.png" alt="Publish a snap image in stable release" width="600" height="400" loading="lazy">
<em><b>The</b> application automatically goes to a stable release<b> if you do not mention- release tags</b>.</em></p>
<p>Now you've successfully released your application in a stable release. </p>
<h3 id="heading-how-to-update-your-snap-application">How to update your snap application</h3>
<p>For updating the snap application, you need to make changes in the <code>tauri/target/snap/snapcraft.yaml</code> file in the version section.</p>
<pre><code class="lang-snapcraft.yaml">...

version: 0.0.1

or 
version: 1.0.0

or

version: 0.1.0

...
</code></pre>
<p>Now rebuild your application with the <code>snapcraft</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/update-application.png" alt="Rebuild your application" width="600" height="400" loading="lazy">
<em>Rebuild your application</em></p>
<p>After successfully building your application, re-upload your latest build, and your application will be updated on the snap store website. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/upload-latest-v-ersion-of-snap.png" alt="Update your application in snapcraft" width="600" height="400" loading="lazy">
<em>Update your application in snapcraft</em></p>
<h3 id="heading-how-to-publish-applications-in-appimage">How to publish applications in AppImage</h3>
<p>AppImage helps you distribute your application across Linux distros. You don't need to install AppImage for it to work in your system.</p>
<p>Publishing the application on AppImage is a straightforward process. First, you need an AppImage URL and a GitHub account.</p>
<p>First, go to the <a target="_blank" href="https://github.com/AppImage/appimage.github.io">appImage GitHub repository</a> and click on this link.  </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/appimagesubmit.png" alt="Submit application into appimage" width="600" height="400" loading="lazy">
<em>Click this link</em></p>
<p>After that, a new page is opened in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/submit-app.png" alt="Submit pull request in appimage" width="600" height="400" loading="lazy">
<em>Submit pull request in AppImage</em></p>
<ol>
<li>Add your application name.</li>
<li>Paste your image URL </li>
<li>Add comment</li>
<li>Click the new propose file button. </li>
<li>Download the appimage.github.io repo in your GitHub account</li>
<li>Create a new pull request into the appimage.github.io repository.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/create-a-new-pull-request.png" alt="Create a pull request into appimage.github.io" width="600" height="400" loading="lazy">
<em>Create a pull request into appimage.github.io</em></p>
<ol start="7">
<li>Add the comment and click the create pull request button.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/create-pull-request-to-appimage.png" alt="Create a pull request into appimage.github.io" width="600" height="400" loading="lazy">
<em>Add comment and Create a pull request into appimage.github.io</em></p>
<p>Now your application is successfully submitted to the appimage.github.io repository. The appimage.github.io runs GitHub actions based on your application. Your application should pass all tests run AppImage. After that, your image should be successfully listed on AppImage so everybody can download your application.</p>
<p>If you submit an application on AppImage with a pull request, your GitHub action test will fail. You'll see the GLIBC_2.29' not found error. </p>
<p>I tried many ways to solve this issue, but I couldn't find a solution. If I do, I'll update my repository as well as this article.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/GLIBC_2.29--not-found.png" alt="GLIBC_2.29 is not found in ubuntu" width="600" height="400" loading="lazy">
_GLIBC<em>2.29 is not found</em></p>
<h2 id="heading-faq">FAQ</h2>
<h3 id="heading-if-youre-building-the-application-with-tauri-do-you-have-to-code-in-rust">If you're building the application with Tauri, do you have to code in Rust?</h3>
<p>No, you can build an application without writing a single line of code in Rust. Instead, Tauri provides JavaScript and TypeScript API support for front-end development to handle a lot of stuff like clipboard, dialog, event, HTTP, notification, and so on.</p>
<h3 id="heading-how-do-you-build-cross-platform-architecture-cross-compilation-with-tauri">How do you build cross-platform architecture (cross-compilation) with Tauri?</h3>
<p>You can build an application cross-architecture (cross-compilation) with Rust. Rust Toolchain helps you build <a target="_blank" href="https://rust-lang.github.io/rustup/cross-compilation.html">cross-compilation applications</a>.</p>
<h3 id="heading-what-is-the-toolchain-in-tauri">What is the toolchain in Tauri?</h3>
<p>The Rust toolchain helps you build an application on a different architecture. In rust, there are 86 toolchains available for a different architectures.</p>
<pre><code class="lang-bash">❯ rustup target list
</code></pre>
<h3 id="heading-can-you-use-tauri-to-build-an-android-or-ios-application">Can you use Tauri to build an Android or IOS application?</h3>
<p>No, you can't use Tauri to build applications for Android and iOS. But there is a library that helps you build applications for mobile phones – I just haven't tested it yet. You can build applications with a toolchain. I'll soon write an article about this on <a target="_blank" href="https://officialrajdeepsingh.dev/">my website.</a></p>
<h3 id="heading-what-are-tauri-javascript-and-typescript-api">What are Tauri JavaScript and TypeScript API?</h3>
<p>Tauri provides a different type of API that helps enhance the user and developer experience. You can use the API to handle notifications, dialog, events, HTTP, and so on.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>It's relatively easy to build cross-platform applications with Tauri. You can use any front-end framework for the application.</p>
<p>But other frameworks don't let you build various cross-architecture and cross-operating system applications, for example, Windows, macOS, and Linux distros.</p>
<p>Tauri comes with strong backend language support. With Rust, you can do anything you can with a low-level language. In addition, Rust provides memory safety, no garbage collector, and so on.</p>
<p>When building the Tauri application with Flatpak, I couldn't find a development and distribution solution. However, in the future, I will add it to the GitHub readme file.</p>
<p>I haven't covered how to distribute applications on Windows and macOS. I'm a Linux user and do not test applications on Windows and macOS. But there are lots of articles and videos on the internet you can check out to learn how to do that.</p>
<p>MacOS has a popular distribution platform called homebrew. The <a target="_blank" href="https://docs.brew.sh/How-to-Build-Software-Outside-Homebrew-with-Homebrew-keg-only-Dependencies">homebrew distribution</a> system is similar to <a target="_blank" href="https://appimage.org/">appimage.org</a>. If you submit a new pull request for your application and pass all tests, your app shows on homebrew.</p>
<p>If you have any questions or suggestions related to developing and distributing a Tauri application, you can ask for help on the <a target="_blank" href="https://github.com/tauri-apps/tauri/discussions/">Tauri GitHub discussions</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Set Up Git for the First Time on macOS ]]>
                </title>
                <description>
                    <![CDATA[ If you're setting up Git for the first time on a MacBook, you don't have to struggle to get it done. Maybe you just got a new laptop, or you're getting into tech for the first time with a MacBook. Either way, I've got you covered. This short article ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/setup-git-on-mac/</link>
                <guid isPermaLink="false">66d45ff1677cb8c6c15f3156</guid>
                
                    <category>
                        <![CDATA[ Git ]]>
                    </category>
                
                    <category>
                        <![CDATA[ GitHub ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ version control ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Joel Olawanle ]]>
                </dc:creator>
                <pubDate>Mon, 08 Aug 2022 20:07:30 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/08/cover-template-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you're setting up Git for the first time on a MacBook, you don't have to struggle to get it done.</p>
<p>Maybe you just got a new laptop, or you're getting into tech for the first time with a MacBook. Either way, I've got you covered.</p>
<p>This short article will help you understand how to set up Git on macOS so you can get back to work immediately.</p>
<p>I assume you already know what Git is and what it does before reading this article. But if you don't and need an introduction to Git and version control, you can check out <a target="_blank" href="https://www.freecodecamp.org/news/what-is-git-learn-git-version-control/">this article on What is Git? A Beginner's Guide to Git Version Control.</a></p>
<p><em>Let's now get started.</em></p>
<h2 id="heading-how-to-install-git-on-a-mac">How to Install Git on a Mac</h2>
<p>There are so many methods available to install Git on a Mac computer, but the easiest is by using Homebrew. You can find <a target="_blank" href="https://git-scm.com/download/mac">other methods and how to make them work in this documentation</a> or <a target="_blank" href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">here</a>.</p>
<h3 id="heading-how-to-install-git-with-homebrew">How to Install Git with Homebrew</h3>
<p><a target="_blank" href="https://brew.sh/">Homebrew</a> is a free and open-source software package management system that simplifies software installation on Apple's operating system (macOS). You can use it to install all types of packages you will need in the future, not just Git. This makes it really useful.</p>
<p>You don't need to install an application or anything to install Homebrew. You only need to open the terminal and install <a target="_blank" href="https://brew.sh/">Homebrew</a> by running the following command:</p>
<pre><code class="lang-bash">$ /bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span>"</span>
</code></pre>
<p><strong>Note:</strong> Once you enter the command, it will request your password.</p>
<p>Once that is successful, you can proceed to install Git via the command below in your terminal:</p>
<pre><code class="lang-bash">$ brew install git
</code></pre>
<p>At this point, if it's successful, you've installed Git on your Mac. You can now verify by running the command below in your terminal:</p>
<pre><code class="lang-bash">$ Git --version
</code></pre>
<h2 id="heading-how-to-configure-git-in-macos">How to Configure Git in macOS</h2>
<p>So far, you have learned how to install Git – but installing Git alone doesn't just let you push, pull, and commit code and perform other Git operations from your Git Version Control.</p>
<p>To work with Git, you must set up your Git environment using the <code>git config</code> command. This will give you access to configuration variables that control how Git works on your system.</p>
<p>Two significant git config variables you need are the identity variables. These let you set your username and email. This is the username and email you used when setting up your version control system with GitHub, GitLab, and so on.</p>
<pre><code class="lang-bash">$ git config --global user.name <span class="hljs-string">"olawanlejoel"</span>
$ git config --global user.email <span class="hljs-string">"mymail@gmail.com"</span>
</code></pre>
<p><strong>Note:</strong> Replace the name and email with yours. You should also know that the <code>--global</code> option ensures that these values are used throughout your system.</p>
<p>Once you've done this, there are a couple of other configurations you can do, which are to setup the default text editor and colors for your Git console:</p>
<pre><code class="lang-bash">$ git config --global core.editor emacs
$ git config --global color.ui <span class="hljs-literal">true</span>
</code></pre>
<p>You can choose whatever editor you regularly use. I've chosen EMACS.</p>
<p>Now Git is ready for you to use. You can check your Git configurations to be sure they are correct using this command:</p>
<pre><code class="lang-bash">$ git config --list
</code></pre>
<p>This will show the following (with your own information):</p>
<pre><code class="lang-bash">user.name=olawanlejoel
user.email=mymail@gmail.com
color.ui=<span class="hljs-literal">true</span>
</code></pre>
<p>Suppose there is an error, and you wish to change any of the configurations. Feel free to rerun the config command particular to the error.</p>
<p>For example, if there is an error with my email, I can rerun the email configuration to correct it:</p>
<pre><code class="lang-bash">$ git config --global user.email <span class="hljs-string">"mynewmail@gmail.com"</span>
</code></pre>
<p>Now, when you rerun the <code>--list</code> command, you will get the updated value:</p>
<pre><code class="lang-bash">user.name=olawanlejoel
user.email=mynewmail@gmail.com
color.ui=<span class="hljs-literal">true</span>
</code></pre>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>In this article, you have learned how to set up Git on a Mac computer for the first time.</p>
<p>If you also want to check out how to do it on other systems like Windows and Linux, <a target="_blank" href="https://www.freecodecamp.org/news/git-first-time-setup/">check out this comprehensive guide</a>.</p>
<p>Also, if you are also interested in learning some basic Git commands, here is a <a target="_blank" href="https://www.freecodecamp.org/news/git-cheat-sheet/">detailed cheat sheet</a>.</p>
<p>Have fun coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Flush DNS on Mac – MacOS Clear DNS Cache ]]>
                </title>
                <description>
                    <![CDATA[ In this tutorial, you will learn why flushing your DNS cache is important, and how you can clear the cache on your local system. Here is what we'll discuss in this guide: What is DNS cache? Why flushing DNS cache is important How to flush DNS cach... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-flush-dns-on-mac-macos-clear-dns-cache/</link>
                <guid isPermaLink="false">66b1e41d96a9e0a75592bbbf</guid>
                
                    <category>
                        <![CDATA[ dns ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Thu, 21 Apr 2022 00:15:54 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/04/kaitlyn-baker-vZJdYl5JVXY-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this tutorial, you will learn why flushing your DNS cache is important, and how you can clear the cache on your local system.</p>
<p>Here is what we'll discuss in this guide:</p>
<ol>
<li><a class="post-section-overview" href="#intro">What is DNS cache?</a><ol>
<li><a class="post-section-overview" href="#why">Why flushing DNS cache is important</a></li>
</ol>
</li>
<li><a class="post-section-overview" href="#howto">How to flush DNS cache on MacOS</a><ol>
<li><a class="post-section-overview" href="#terminal">How to access the terminal application on MacOS</a></li>
<li><a class="post-section-overview" href="#version">How to clear DNS Cache for your MacOS version</a></li>
</ol>
</li>
</ol>
<h2 id="heading-what-is-dns-cache">What is DNS Cache? <a></a></h2>
<p>DNS acts much like an internet phonebook. Think of what a phonebook does – it maps a person's name to their respected phone number. </p>
<p>DNS (short for Domain Name System) maps domain names to their associated IP addresses.</p>
<p>A domain name, such as <code>freecodecamp.org</code>,  is easily read, understood, and recalled by humans.</p>
<p>IP addresses (IP is short for Internet Protocol) is an address that is machine-readable and consists of a unique series of numbers. These numbers identify a device connected to the Internet.</p>
<p>Their format is not that human-friendly since it is hard to remember an exact sequence of numbers each time you want to visit a website.</p>
<p>DNS then maps <code>freecodecamp.org</code> to its associated IP address - <code>104.26.3.33</code>.</p>
<p>Think of the DNS cache as a local storage area on your Mac.  </p>
<p>It temporarily stores and keeps track of your computer's activity records like recent website visits. </p>
<p>Each time you visit a website by typing its URL (short for Uniform Resource Locator), the DNS cache will save the IP address associated with that website.</p>
<p>When you visit that same website for the second time, the lookup process is more efficient, and the lookup time is much shorter.</p>
<p>It helps save significant time.</p>
<h3 id="heading-why-flushing-dns-cache-is-important">Why Flushing DNS Cache Is Important <a></a></h3>
<p>You should flush the DNS cache for a few reasons.</p>
<p>The two most important ones are:</p>
<p>1) <strong>Flushing DNS is a helpful step for troubleshooting Internet connectivity issues</strong>. </p>
<p>You may be getting DNS errors in your browser, such as the 'DNS Server Not Responding' message when trying to access a site and establish a connection.</p>
<p>Keep in mind that your local cache information can become outdated over time. </p>
<p>When DNS updates happen on a website, your Mac is still using the old, inaccurate information to load the requested page. </p>
<p>Flushing the DNS cache makes sure cache information is up to date.</p>
<p>2) <strong>Flushing the DNS cache prevents network security threats, malicious attacks, and DNS cache poisoning from happening</strong>.</p>
<p>Hackers can access and corrupt your saved DNS cache records.</p>
<p>For example, they could manipulate and change the IP address associated with a Domain Name of a website you have already visited and map it to a malicious one.</p>
<p>The next time you request to access that same website, there will be a redirection to a fake and corrupted URL.</p>
<p>Hackers can request personal and sensitive information, such as credit card numbers, and steal it. </p>
<p>Frequent flushing of the DNS cache will help prevent this from occurring.</p>
<h2 id="heading-how-to-flush-dns-cache-on-macos">How to Flush DNS Cache on MacOS <a></a></h2>
<p>Clearing the DNS cache on your Mac is a relatively straightforward process, even if you don't have a lot of technical knowledge.</p>
<p>Here is what you will need:</p>
<ul>
<li>Access to the command line,</li>
<li>Your computer password,</li>
<li>To enter a text command (the command will depend on the version of macOS you are running).</li>
</ul>
<h3 id="heading-how-to-access-the-terminal-application-on-macos">How to Access The Terminal Application on MacOS <a></a></h3>
<p>macOS has a built-in CLI (Command Line Interface) named <code>Terminal.app</code>, which allows you to enter text-based commands that the Operating System will carry out.</p>
<p>There are a few ways to open the terminal.</p>
<p>The easiest way is through Spotlight search.</p>
<p>For this, you can:</p>
<ul>
<li>Either navigate to the very top right corner of the screen and click on the icon that looks like a magnifying glass. </li>
<li>Or, you can also use the <code>Command Space</code> shortcut.</li>
</ul>
<p>Both will open up the following window:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/04/Screenshot-2022-04-20-at-10.07.52-AM.png" alt="Screenshot-2022-04-20-at-10.07.52-AM" width="600" height="400" loading="lazy"></p>
<p>From there, start typing <code>terminal</code> and click on the <code>Terminal.app</code> option that appears.</p>
<p>You should see a window open that looks similar to the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/04/Screenshot-2022-04-20-at-10.12.29-AM.png" alt="Screenshot-2022-04-20-at-10.12.29-AM" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-clear-dns-cache-for-your-macos-version">How to Clear DNS Cache For Your MacOS Version <a></a></h3>
<p>In the terminal window, you will then need to enter a command.</p>
<p>The command is different depending on the version of macOS you are running.</p>
<p>Each version of macOS has a version number and a version name.</p>
<p>To find out the macOS version on your computer, click on the Apple icon at the very top left corner of your screen. From the dropdown menu that appears, select <code>About This Mac</code>.</p>
<p>In the <code>Overview</code> tab, you will first see the version name. Then, underneath that, you will see the version number.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/04/Screenshot-2022-04-20-at-11.07.26-AM.png" alt="Screenshot-2022-04-20-at-11.07.26-AM" width="600" height="400" loading="lazy"></p>
<p>In the table below, you will see the versions of macOS in reverse chronological order – from the most recent one to the oldest one. </p>
<p>Navigate to your version of Mac and copy the respective command.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>MacOS Version</td><td>Command</td></tr>
</thead>
<tbody>
<tr>
<td>macOS 12 (Monterey)</td><td><code>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>macOS 11 (Big Sur)</td><td><code>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>macOS 10.15 (Catalina)</td><td><code>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>macOS 10.14 (Mojave)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>macOS 10.13 (High Sierra)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>macOS 10.12 (Sierra)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>OS X 10.11 (El Capitan)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>OS X 10.10 (Yosemite)</td><td><code>sudo discoveryutil udnsflushcaches</code></td></tr>
<tr>
<td>OS X 10.9 (Mavericks)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>OS X 10.8 (Mountain Lion)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>Mac OS X 10.7 (Lion)</td><td><code>sudo killall -HUP mDNSResponder</code></td></tr>
<tr>
<td>Mac OS X 10.6 (Snow Leopard)</td><td><code>sudo dscacheutil -flushcache</code></td></tr>
<tr>
<td>Mac OS X 10.5 (Leopard)</td><td><code>sudo lookupd -flushcache</code></td></tr>
<tr>
<td>Mac OS X 10.4 (Tiger)</td><td><code>lookupd -flushcache</code></td></tr>
</tbody>
</table>
</div><p>After typing the command and hitting enter, there will be a prompt for  entering your computer's password.</p>
<p>Keep in mind that when you are typing your password, you will not be able to view what you are typing – not even any asterisks. </p>
<p>It appears as though nothing is happening, but rest assured that something is.</p>
<p>Once you have entered your password and hit enter, you will not see a message indicating that the process is complete.</p>
<p>Instead, you will view a new terminal prompt.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>And there you have it – your local DNS cache is now clear.</p>
<p>Hopefully, this has helped resolve any connectivity issues you may be experiencing.</p>
<p>Clearing DNS frequently is always a good idea to help fix troublesome internet connections and ensure your system is secure from potential threats.</p>
<p>Thanks for reading!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Install Python 3 on Mac and Update the Version with Pyenv – MacOS Homebrew Command Guide ]]>
                </title>
                <description>
                    <![CDATA[ By Dillion Megida When using Python, you may install different version variations for different projects. But sometimes this can affect how your code executes, as it may not use the correct version. In this article, we'll learn how to install new Pyt... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-install-python-3-on-mac-and-update-the-python-version-macos-homebrew-command-guide/</link>
                <guid isPermaLink="false">66d84f0c29e30bc0ad477571</guid>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python 3 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 04 Mar 2022 18:44:30 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/03/pexels-christina-morillo-1181359--2-.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Dillion Megida</p>
<p>When using Python, you may install different version variations for different projects. But sometimes this can affect how your code executes, as it may not use the correct version.</p>
<p>In this article, we'll learn how to install new Python versions (Python 3 in our case) and how to set this version as the active version for code execution.</p>
<h2 id="heading-install-pyenv">Install Pyenv</h2>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/pyenv/pyenv">https://github.com/pyenv/pyenv</a></div>
<p>If you're familiar with NodeJS, you'll know that <code>nvm</code> is used for managing versions of Node in different environments. <code>pyenv</code> does the same thing for Python – it's a version management tool.</p>
<p>This tool helps you to work on different environments which require different versions of Python.</p>
<p>Install <code>pyenv</code> using <a target="_blank" href="https://brew.sh/">Homebrew</a> with the following command:</p>
<p>Here's the command to install Python 3 on Mac:</p>
<pre><code class="lang-bash">brew install pyenv
</code></pre>
<p>Make sure you follow the <a target="_blank" href="https://github.com/pyenv/pyenv#homebrew-in-macos">rest of the steps for installing pyenv in the documentation</a>.</p>
<h2 id="heading-install-python-3">Install Python 3</h2>
<p>With <code>pyenv</code> installed, you don't need to install Python with Homebrew anymore (as you may already be doing). You can install Python using <code>pyenv</code> with the following syntax:</p>
<pre><code class="lang-bash">pyenv install [version]
</code></pre>
<p>The version argument follows semantic versioning which is "major.minor.patch".</p>
<p>For Python 3, let's say we want to install <code>3.10.2</code>. Then we'll use this command:</p>
<pre><code class="lang-bash">pyenv install 3.10.2
</code></pre>
<p>To see the list of the Python versions we have, we use the following command:</p>
<pre><code class="lang-bash">pyenv versions
</code></pre>
<p>In my case, I have:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/03/image-6.png" alt="Image" width="600" height="400" loading="lazy">
<em>Currently installed python versions on my system</em></p>
<p>From the screenshot above, the asterisk shows the currently active Python version, which is the default system version:</p>
<pre><code class="lang-shell">python --version
# Python 2.7.18
</code></pre>
<p>To set the newly installed version as the default, here's how to do it (<a target="_blank" href="https://github.com/pyenv/pyenv#choosing-the-python-version">among many other ways</a>):</p>
<pre><code class="lang-bash">pyenv global 3.10.2

python --version
<span class="hljs-comment"># Python 3.10.2</span>
</code></pre>
<p>If your python version remains the same, you have to make sure that you add the required init command as you can see in the documentation: <a target="_blank" href="https://github.com/pyenv/pyenv#basic-github-checkout">Basic GitHub Checkout – 2. Configure your shell's environment for Pyenv</a></p>
<p>With all that in place, you can now use Python 3.</p>
<h2 id="heading-update-python-version">Update Python Version</h2>
<p>With more versions being released, you may want to update your version. You can update your version by installing a new version, making it your global default, and optionally uninstalling the old version.</p>
<p>Here are the commands for that:</p>
<pre><code class="lang-bash">pyenv install new.python.version

pyenv global new.python.version

pyenv uninstall old.python.version
</code></pre>
<p>Thank you for reading! I hope you now have the version of Python installed that's most useful to you.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The 5 Best Code Editors for Mac – MacOS Text Editor Guide ]]>
                </title>
                <description>
                    <![CDATA[ By Dillion Megida When you're coding, you're writing various text that can be executed by different language compilers. And what makes this text fun and easy to write are the editors that we use. Different editors have different features. But they ha... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-5-best-code-editors-for-mac-macos-text-editor-guide/</link>
                <guid isPermaLink="false">66d84f6063d2055c664a1a5d</guid>
                
                    <category>
                        <![CDATA[ editor ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ide ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Integrated Development Environment   ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vim ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Visual Studio Code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 28 Feb 2022 14:46:44 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/pexels-negative-space-169573.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Dillion Megida</p>
<p>When you're coding, you're writing various text that can be executed by different language compilers. And what makes this text fun and easy to write are the editors that we use.</p>
<p>Different editors have different features. But they have a common goal: making writing code easier – easier to compose, debug, and read.</p>
<p>In this article, we'll look at five code editors that can improve development on your Mac device.</p>
<h2 id="heading-1-sublime-text">1. Sublime Text</h2>
<p><a target="_blank" href="https://www.sublimetext.com/">Sublime Text</a> is a lightweight editor with many features for improving your code-writing experience. Here are some of its features:</p>
<h3 id="heading-multiple-view-panes">Multiple view panes</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-92.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://forum.sublimetext.com/t/follow-mode-for-sublime/5100/4">Multiple view panes</a></em></p>
<p>Sublime Text offers multiple view panes for writing code. This way, you can view multiple files at once. </p>
<p>What's more fun is you can open the same file in two panes. This feature can be helpful when you're writing code in a file with long lines of code, as you'll be able to scroll to the top in one pane and then write in the bottom of the other.</p>
<h3 id="heading-side-by-side-view-for-type-definitions">Side-by-side view for Type Definitions</h3>
<p>Instead of just viewing type definitions in a small popup or opening the definition file that overrides the current view, Sublime Text provides a side-by-side view of a definition file for the types in the current file.</p>
<h3 id="heading-multiple-selections">Multiple Selections</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-93.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://medium.com/sweetmeat/multi-line-selection-text-entry-with-sublime-text-77f226812324">Multi-Line Selection Text Entry with Sublime Text</a></em></p>
<p>There are two forms of multi-selections: multi-selecting the same characters or different characters.</p>
<h4 id="heading-same-character-selection">Same character selection</h4>
<p>Say you want to rename a literal (variable, function, and so on) in multiple places. Sublime Text allows you to highlight the literal, and using <code>Ctrl/Cmd D</code> you can select other occurrences of that literal and edit, replace, or do what you want.</p>
<h4 id="heading-different-characters-selection">Different characters selection</h4>
<p>Maybe some literals are spelled differently, but you want to highlight them together. Sublime allows you to use your mouse to highlight many things at once and operate on them as you choose.</p>
<h2 id="heading-2-vscode">2. VSCode</h2>
<p>The <a target="_blank" href="https://code.visualstudio.com/">VSCode</a> editor offers syntax light, <a target="_blank" href="https://code.visualstudio.com/docs/editor/intellisense#:~:text=IntelliSense%20is%20a%20general%20term,%2C%20and%20%22code%20hinting.%22">IntelliSense</a> features (autocompletes, code hinting, and more), custom configurations, and room for different plugins. VSCode also allows multiple selections and multiple view panes.</p>
<p>Here are more features of VSCode:</p>
<h3 id="heading-code-debugging">Code Debugging</h3>
<p>With VSCode, you do not need to debug on your browser or other tools.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-94.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://code.visualstudio.com/docs/editor/debugging">Debugging in Visual Studio Code</a></em></p>
<p>VSCode allows you to debug right from your editor using breakpoints, the call stack, and even an interactive console.</p>
<h3 id="heading-many-extensions-for-different-things">Many extensions for different things</h3>
<p>VSCode has a <a target="_blank" href="https://www.freecodecamp.org/news/p/fbff585a-bfcd-44e5-8a3a-024bb1eb2774/Extensions%20for%20Visual%20Studio%20family%20of%20products%20|%20Visual%20Studio%20Marketplace">large marketplace</a> for different languages, frameworks, and even your editor. You have extensions that beautify your editor's appearance and experience and tools that help with autocompletion when writing code.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-95.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://code.visualstudio.com/docs/editor/extension-marketplace">Managing Extensions in Visual Studio Code</a></em></p>
<h3 id="heading-built-in-terminal">Built-in Terminal</h3>
<p>With VSCode, you have a a built-in shell terminal where you can execute commands without leaving your editor to go to a different terminal app. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-97.png" alt="Image" width="600" height="400" loading="lazy">
<em>The terminal view of VSCode</em></p>
<p>A small screen may make your editing view small and a bit inconvenient, but with a large monitor, for example, the view is just okay.</p>
<p>VSCode also has multiple view panes, character selection, and multiple character replacements.</p>
<h2 id="heading-3-atom">3. Atom</h2>
<p><a target="_blank" href="https://atom.io/">Atom</a> is a highly customizable code editor. This is why the team calls it a "hackable text editor". From the appearance and colors on the editor to the key combinations for commands and many other things, you can customize Atom as much as you wish and make it very personalized.</p>
<p>Here are some features:</p>
<h3 id="heading-real-time-code-collaboration">Real-time Code Collaboration</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-98.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://teletype.atom.io/">Teletype for Atom</a></em></p>
<p>Atom has a <a target="_blank" href="https://teletype.atom.io/">Teletyping</a> feature that allows multiple people to work on a codebase in real-time. This feature improves collaboration in a team workspace on projects. For VSCode, you'll usually need an extension for this.</p>
<h3 id="heading-git-integration">Git Integration</h3>
<p>With Atom, you never have to go to your terminal for your Git operations.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-99.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.atom.io/">GitHub for Atom</a></em></p>
<p>Git actions are integrated into Atom using the GitHub package, and this creates a smooth version control experience while you write code.</p>
<h3 id="heading-smart-autocompletion">Smart Autocompletion</h3>
<p>With many languages and syntaxes integrated into Atom, you also get a nice auto-completion feature while writing code.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-100.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://flight-manual.atom.io/using-atom/sections/autocomplete/">Autocomplete (atom.io)</a></em></p>
<p>You don't have to type out those long method and variable names anymore. Atom's smart enough to help you avoid that 😉.</p>
<p>In Atom, you also have search and replace features, view panes, and more.</p>
<h2 id="heading-4-webstorm">4. WebStorm</h2>
<p><a target="_blank" href="https://www.jetbrains.com/webstorm/">WebStorm</a> calls itself "The Smartest JavaScript IDE". It takes a lot of confidence to call itself that, and WebStorm actually delivers. WebStorm makes writing JavaScript and its related technologies not just convenient but more enjoyable.</p>
<p>Some features include:</p>
<h3 id="heading-built-in-developer-tools">Built-in developer tools</h3>
<p>WebStorm takes the name "development editor" quite literally. From running scripts to breakpoints and general debugging, WebStorm provides developer tools that allow you to write, execute and debug your code.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-101.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.jetbrains.com/webstorm/features/#integrated-developer-tools">WebStorm: Integrated Developer Tools</a></em></p>
<h3 id="heading-smart-features">Smart features</h3>
<p>This editor allows you to move files between folders seamlessly. It also helps you refactor your code and suggest fixes for errors. </p>
<p>And the most brilliant feature I love about it is that you can easily rename a specific variable across your application. Say you have a variable you've imported in many files – you can easily rename that variable from one of the files.</p>
<h3 id="heading-fast-search-and-navigation">Fast search and navigation</h3>
<p>Another fantastic feature of WebStorm, which people generally praise it for, is the fast file or folder search and navigation.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-102.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.jetbrains.com/webstorm/features/#navigation-and-search">WebStorm: Navigation and Search</a></em></p>
<p>From searching file names, class names, function names within files, and special selectors, you can easily find a file you're looking for.</p>
<p>There's also collaboration, view panes, search and replace in WebStorm.</p>
<h2 id="heading-5-vim">5. Vim</h2>
<p>And there's <a target="_blank" href="https://www.vim.org/">Vim</a>. It's worth noting that Vim is not for everyone, as it arguably has a steep learning curve – but Vim has many features that make it worth trying out. I have a friend who's never letting go of Vim and keeps advocating that people are missing out.</p>
<p>Here are some features:</p>
<h3 id="heading-high-customizability">High Customizability</h3>
<p>I mentioned earlier that Atom is highly customizable, but I don't think it's as flexible as Vim.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/image-103.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/fatih/subvim">Vim customized to be like SublimeText</a></em></p>
<p>Down to the low-level commands and feel of the editor, you can configure many things that makes using another editor very strange for you. You can also create scripts that automate things for you.</p>
<h3 id="heading-support-for-many-languages-and-file-formats">Support for Many Languages and File Formats</h3>
<p>Vim has support for many languages and files of different kinds. It also integrates with many tools.</p>
<h3 id="heading-powerful-search-feature">Powerful search feature</h3>
<p>With powerful selectors and regex, you can do multi-level file searches and replacements. With Vim's scripts, you can also get plugins that take the search features to another level.</p>
<p>Agreed, it's not very easy to learn. But it's pretty powerful and consumes less memory, surprisingly. It also has an extensive <a target="_blank" href="https://www.vim.org/scripts/script_search_results.php">script system</a> that gives you much power while writing code.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>There you have it - five code editors you can use to write cleaner, more readable code. I hope you find the one that best fits your needs!</p>
<p>Thanks for reading :)</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Open Task Manager on Mac – Apple Shortcut Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ Having problems with our computers is never fun.  And what's often worse than the problems themselves is that they seem to occur when we're in the middle of an important task that needs to get done. The computer starts to significanlty slow down and ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-open-task-manager-on-mac-apple-shortcut-tutorial/</link>
                <guid isPermaLink="false">66b1e4270968943127cc5f09</guid>
                
                    <category>
                        <![CDATA[ beginners guide ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mac ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Fri, 11 Feb 2022 21:36:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/nadine-shaabana-DRzYMtae-vA-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Having problems with our computers is never fun. </p>
<p>And what's often worse than the problems themselves is that they seem to occur when we're in the middle of an important task that needs to get done.</p>
<p>The computer starts to significanlty slow down and an app we are using might freeze for a while. The computer's fan then starts to get louder and louder and that dreaded – but colorful – spinning wheel may even make an appearance.</p>
<p>Fortunately, there are certain steps you can take to fix different problems, get to the root of them, and see what caused them in the first place.</p>
<p>In this article you'll learn about the essential Task Manager tool on MacOS. You'll see how using it gives you insight to help diagnose and troubleshoot problems.</p>
<h2 id="heading-the-first-step-of-troubleshooting">The First Step of Troubleshooting</h2>
<p>The first action to take when an application or program you're using freezes and is no longer responsive is to use the following keyboard shortcut: <code>Command Option Esc</code>.</p>
<p>Hold down those three keys at the same time.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/clay-banks-PXaQXThG1FY-unsplash.jpeg" alt="clay-banks-PXaQXThG1FY-unsplash" width="600" height="400" loading="lazy"></p>
<p>This will launch the Force Quit Applications Manager window:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-12.09.26-PM.png" alt="Screenshot-2022-02-11-at-12.09.26-PM" width="600" height="400" loading="lazy"></p>
<p>This window shows a list of all the applications that are currently open on your computer.</p>
<p>As the helpful instructions indicate, select the application that has frozen and is no longer responsive. Then next click the <code>Force Quit</code> button.</p>
<p>💡 Another way to access this window is by selecting the Apple icon at the top left corner of your screen by clicking on it. A dropdown menu will appear and from there select "Force Quit".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-8.42.36-PM.png" alt="Screenshot-2022-02-11-at-8.42.36-PM" width="600" height="400" loading="lazy"></p>
<p>The application you selected will be closed and terminated immediately.</p>
<p>It's a handy and quick solution for closing a program that is not working and is unable to stop properly.</p>
<p>But this method doesn't give much information about what could be causing the problem. It's useful for just force-quitting an application.</p>
<h2 id="heading-macos-activity-monitor">MacOS Activity Monitor</h2>
<p>If you were a Windows user in the past, you may be familiar with the Task Manager for troubleshooting problems.</p>
<p>The Activity Monitor is the equivalent system for measuring your computer's activity on a Mac Operating System - it is just under a different name.</p>
<p>It shares a lot of similarities with the Window's counterpart. It locates and shows all the processes currently running and how different applications affect the computer's performance. </p>
<p>So, to dig a bit deeper and gather more information on how the program that has frozen affects your computer, it's helpful to launch the Activity Monitor.</p>
<p>From there you can close or force quit programs, background processes which are not open and visible by default, or apps that have frozen up and are unresponsive and hanging.</p>
<h3 id="heading-how-to-open-the-activity-monitor">How to Open the Activity Monitor</h3>
<p>The easiest and most straightforward way to open the Activity Monitor is with the Spotlight button.</p>
<p>The Spotlight button is located in the menu bar at the top right corner of your Mac's screen and looks like a magnifying glass.</p>
<p>To access the Spotlight button you can just click on it: </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-2.35.41-PM.jpeg" alt="Screenshot-2022-02-11-at-2.35.41-PM" width="600" height="400" loading="lazy"></p>
<p>💡 Another way to access Spotlight is by using the <code>Command Spacebar</code> keyboard shortcut.  </p>
<p>Then, the Spotlight Search will appear. Start enetering the input for what you're looking for – in this case type the words Activity Monitor and it should come up.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-2.41.19-PM.png" alt="Screenshot-2022-02-11-at-2.41.19-PM" width="600" height="400" loading="lazy"></p>
<p>Hit Return and double click on the first option that appears.</p>
<p>Once you've completed those steps and opened the Activity Monitor, you can optionally keep it in the Dock for easy and fast access in the future.</p>
<p>Click and hold down on the application's icon. From there, once the dropdown menu appears, select <code>Option</code> and then <code>Keep in Dock</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-2.48.23-PM.png" alt="Screenshot-2022-02-11-at-2.48.23-PM" width="600" height="400" loading="lazy"></p>
<p>Now the application is pinned in your Dock.</p>
<h2 id="heading-how-to-use-the-activity-monitor">How to Use the Activity Monitor</h2>
<h3 id="heading-an-overview-of-the-five-tabs-in-activity-monitor">An Overview Of The Five Tabs in Activity Monitor</h3>
<p>Once the Activity Monitor Window is open, you can take a deeper look into the current processes that are running on your computer.</p>
<p>There are five tabs available at the top of the window:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-3.26.32-PM.png" alt="Screenshot-2022-02-11-at-3.26.32-PM" width="600" height="400" loading="lazy"></p>
<p>In the <strong>"CPU"</strong> tab which is the first one opened by default, you can see information on CPU usage.</p>
<p>For example, here you can see how the activities are affecting the processor's performance and how many processor resources are being used. It shows which applications are doing the heaviest work. </p>
<p>This is one of the two most useful tabs to check when problems occur. When the fan starts getting loud, the computer heats up and your battery starts going down fast. Check this tab to see which application is consuming most of the CPU's resources.</p>
<p>Quitting that app may then stop the problem.</p>
<p>In the <strong>"Memory"</strong> tab you can check memory usage and load. You see statistics and information on how much RAM (Random Access Memory) the different applications are consuming at the time. </p>
<p>This is the second most important tab to check when an application freezes. When an application freezes and your computer really slows down, it could be a sign that RAM is being overused and maxed out. It could also indicate that your computer is running out of sufficient RAM and that's why it is not functioning to the best of its abilities.</p>
<p>The <strong>"Energy"</strong> tab shows how much energy and power is being used by each application for each process that is running. This tab shows which applications are consuming the most energy and are draining battery life.</p>
<p>The <strong>"Disk Tab"</strong> shows the disk usage. It indicates how much data is being read from and written to your disk storage device. Here is also a good place to detect potential malware.</p>
<p>Lastly, the <strong>"Network"</strong> tab shows which applications on your Mac send and receive the most data from the network. </p>
<p>You can select either of these tabs to further investigate the issue you're having.</p>
<h3 id="heading-how-to-search-for-applications-in-activity-monitor">How to Search for Applications in Activity Monitor</h3>
<p>There might be a long list of running processes. </p>
<p>To narrow them down and search for a specific application, use the search bar that is located at the top right hand corner of the window.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-7.06.26-PM.jpeg" alt="Screenshot-2022-02-11-at-7.06.26-PM" width="600" height="400" loading="lazy"></p>
<p>Type the name of the app you're looking for and if it is currently up and running it will appear as a result.</p>
<h3 id="heading-how-to-view-more-information-about-applications-in-activity-monitor">How to View More Information About Applications in Activity Monitor</h3>
<p>First, select a particular application from the list of current running processeses that you're interested in learning more about by clicking on it.</p>
<p>Once you've selected it, that line will be highlighted.</p>
<p>Then, click on the <code>i</code> button (for Inspecting) at the top left hand corner.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-4.17.40-PM.jpeg" alt="Screenshot-2022-02-11-at-4.17.40-PM" width="600" height="400" loading="lazy"></p>
<p>A pop-up window will appear, with additional information on the application.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-4.22.41-PM.png" alt="Screenshot-2022-02-11-at-4.22.41-PM" width="600" height="400" loading="lazy"></p>
<p>This window will have three different tabs: "Memory", "Statistics" and "Open Files and Ports".</p>
<p>In Memory you'll see how much RAM is running.</p>
<p>In the Statistis tab you can see the number of threads, the CPU time, and more technical insight.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-8.04.15-PM.png" alt="Screenshot-2022-02-11-at-8.04.15-PM" width="600" height="400" loading="lazy"></p>
<p>The "Open Files and Ports" tab will show all the names of files that are currently running.</p>
<h3 id="heading-how-to-force-quit-an-application-in-activity-monitor">How to Force Quit an Application in Activity Monitor</h3>
<p>To quit or force quit any of the processes listed in the Activity Monitor, select the application you want to stop from running. </p>
<p>Then select the <code>x</code> button at the top left hand corner, which acts as the Stop button.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-4.17.40-PM-2.jpeg" alt="Screenshot-2022-02-11-at-4.17.40-PM-2" width="600" height="400" loading="lazy"></p>
<p>You'll see a pop up window appear asking you to confirm that you want to terminate the process. It will mention the name of the application you want to stop running in double quotation marks.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-6.40.46-PM.png" alt="Screenshot-2022-02-11-at-6.40.46-PM" width="600" height="400" loading="lazy"></p>
<p>Select "Quit", and if that fails to close the app, choose "Force Quit" and the application will close immediately.</p>
<p>Keep in mind that you may end up losing data if the app froze and you didn't manage to save any progress or files you were using.</p>
<h2 id="heading-an-alternative-to-activity-monitor">An Alternative to Activity Monitor</h2>
<p>If you're a developer you may prefer working with the terminal.</p>
<p>Using just one command, you can see a list of the current running processes.</p>
<p>Navigate to spotlight again and this time type in "Terminal". The built-in terminal application for MacOS will launch. </p>
<p>You'll see the command prompt which is right after your computer's username.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-10.11.56-PM.png" alt="Screenshot-2022-02-11-at-10.11.56-PM" width="600" height="400" loading="lazy"></p>
<p>By default, if you haven't applied any custom styles for the Zsh shell, the command prompt is a <code>%</code> sign. </p>
<p>A shell is a computer program that interacts with the underlying operating system through text-based commands it receives as input. </p>
<p>Zsh is one of the many different Unix shell types available. The Zsh shell is the default shell for MacOS Catalina and later. </p>
<p>After the command prompt, enter the command <code>top</code> and hit return.</p>
<p>You'll see a list of all the current running processes:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/02/Screenshot-2022-02-11-at-8.58.50-PM.png" alt="Screenshot-2022-02-11-at-8.58.50-PM" width="600" height="400" loading="lazy"></p>
<p>To stop this, enter <code>Control C</code> which sends a signal to the command to terminate. You'll be back to the command prompt immediately.</p>
<p>When the <code>top</code> command is executing, you may see a process that is using too many resources. It may be a good idea to kill it, which is another word for terminating a process.</p>
<p>To do so, first locate the <code>PID</code> (Process ID). This number is located in the first column at the left hand corner when the <code>top</code> command is executed.</p>
<p>To continue, make sure you are at the command prompt.</p>
<p>Then, type the <code>kill -9 PID</code>, where <code>PID</code>  the number of the process you want to terminate.</p>
<p>For example, if I wanted to force quit the terminal application I am currently using which has a <code>PID</code> of 7728, I would write the following: <code>kill -9 7728</code>. </p>
<p>The application will then close immediately.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Thanks for making it to the end. Hopefully you found this helpful and were able to troubleshoot any problems you were facing with your Mac computer.</p>
<p>You learned about the Activity Monitor which is the equivalent of the Task Manager available on Windows PCs. You also leared how to use the command line to terminate processes that use too many of the computer's resources.</p>
<p>Thanks for reading!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Turn Off Quick Note and Hot Corners [Solved for MacOS Monterey] ]]>
                </title>
                <description>
                    <![CDATA[ I recently updated to MacOS Monterey (Version 12.0). Sometimes software companies like Apple will add features I don't like, then enable them by default. This is what happened with the New Quick Note hot corner. Here is what the Quick Notes feature l... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/turn-off-quick-note-mac-monterey/</link>
                <guid isPermaLink="false">66b8d63cb7a8332d9a6b209d</guid>
                
                    <category>
                        <![CDATA[ Apple ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mac ]]>
                    </category>
                
                    <category>
                        <![CDATA[ macOS ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Thu, 18 Nov 2021 04:09:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/11/Window.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>I recently updated to MacOS Monterey (Version 12.0). Sometimes software companies like Apple will add features I don't like, then enable them by default. This is what happened with the New Quick Note hot corner.</p>
<p>Here is what the Quick Notes feature looks like when you move your cursor to the lower right hand corner of the screen:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/Window_and_Notes_and_How_to_Turn_Off_Quick_Note_in_MacOS_Monterrey_-_freeCodeCamp_org_--.png" alt="Image" width="600" height="400" loading="lazy">
<em>The New Quick Note feature in the lower right hand screen of MacOS Monterey</em></p>
<p>I like a lot of MacOS Monterey's features, but I didn't like this popping up so frequently when I was moving my mouse around. So I disabled it. You can do this, too, and it only takes a few seconds.</p>
<h2 id="heading-how-to-disable-the-new-quick-note-feature-in-macos-monterey">How to Disable the New Quick Note Feature in MacOS Monterey</h2>
<p>First of all, navigate to your MacOS preferences. </p>
<h3 id="heading-step-1-open-system-preferences">Step #1: Open System Preferences</h3>
<p>The fastest way to do this is to press <strong>Command + Space</strong> to open up Spotlight.</p>
<p>Then type "pref" and you should see a System Preferences option.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/Spotlight_and_How_to_Turn_Off_Quick_Notes_in_Mac_-_Solved_for_MacOS_Monterey_12_0_Quick_Note_-_freeCodeCamp_org_---1.png" alt="Image" width="600" height="400" loading="lazy">
<em>MacOS Spotlight is a helpful way to open up applications quickly. You can open it by pressing Command + Space</em></p>
<h3 id="heading-step-2-open-mission-control-preferences">Step #2: Open Mission Control Preferences</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/System_Preferences_and_Developers_Spent_2_1_Billion_Minutes__4_000_years__Using_freeCodeCamp_in_2021__and_Other_Year-end_Facts_-_freeCodeCamp_org_---1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Click the Mission Control icon pointed to above</em></p>
<h3 id="heading-step-3-click-the-hot-corners-button">Step #3: Click the "Hot Corners..." button</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/Mission_Control_and_Developers_Spent_2_1_Billion_Minutes__4_000_years__Using_freeCodeCamp_in_2021__and_Other_Year-end_Facts_-_freeCodeCamp_org_--.png" alt="Image" width="600" height="400" loading="lazy">
<em>The Hot Corners button is in the lower left-hand corner</em></p>
<h3 id="heading-step-4-disable-the-quick-note-hot-corner-gesture">Step #4: Disable the Quick Note Hot Corner Gesture</h3>
<p>You can now disable the Quick Note hot corner. If you prefer, you could instead assign this hot corner to something else. I personally find these hot corners more distracting than helpful, and turn all four of them off. </p>
<p>Remember: anything you can do with a hot corner, you can do with the MacOS built-in Spotlight feature.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/OtherViews_and_Mission_Control_and_Developers_Spent_2_1_Billion_Minutes__4_000_years__Using_freeCodeCamp_in_2021__and_Other_Year-end_Facts_-_freeCodeCamp_org_--.png" alt="Image" width="600" height="400" loading="lazy">
<em>Click the drop down for the lower-right hand corner and set it to "–" which means nothing will happen when you move your cursor to the lower right hand corner of your screen.</em></p>
<h3 id="heading-step-5-click-the-ok-button-and-close-mission-control">Step #5: Click the OK Button and Close Mission Control</h3>
<p>Congratulations. You have disabled the Quick Note hot corner. It shouldn't pop up anymore.</p>
<p>I hope this has been helpful. Have a fun, productive day.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
