<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Gamya </title>
    <description>The latest articles on Forem by Gamya  (@gamya_m).</description>
    <link>https://forem.com/gamya_m</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3691193%2Fa216f89b-ba3c-4643-b67c-ec28cc54d293.jpg</url>
      <title>Forem: Gamya </title>
      <link>https://forem.com/gamya_m</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gamya_m"/>
    <language>en</language>
    <item>
      <title>Swift Booleans</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Sat, 14 Feb 2026 13:35:00 +0000</pubDate>
      <link>https://forem.com/gamya_m/swift-booleans-4m6f</link>
      <guid>https://forem.com/gamya_m/swift-booleans-4m6f</guid>
      <description>&lt;h1&gt;
  
  
  Swift Booleans
&lt;/h1&gt;

&lt;p&gt;Alongside strings and numbers, Swift has a very simple data type called a &lt;strong&gt;Boolean&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
A Boolean stores only &lt;strong&gt;two values&lt;/strong&gt;: &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Booleans are named after &lt;strong&gt;George Boole&lt;/strong&gt;, who studied logic.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 Booleans in the Wild
&lt;/h2&gt;

&lt;p&gt;You’ve already seen Booleans without realizing it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;imageFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"sakura.png"&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;imageFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasSuffix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;".png"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;petals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;petals&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isMultiple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both checks return either &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Creating Booleans
&lt;/h2&gt;

&lt;p&gt;Creating a Boolean works just like other types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;isBlooming&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;gameOver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also assign a Boolean from a condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;isSpecialFlower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;petals&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isMultiple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔹 Flipping Booleans
&lt;/h2&gt;

&lt;p&gt;Booleans don’t support math operators, but they do support &lt;strong&gt;logical operators&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;!&lt;/code&gt; operator means &lt;strong&gt;“not”&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="n"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;isAuthenticated&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;isAuthenticated&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This flips the value from &lt;code&gt;false&lt;/code&gt; → &lt;code&gt;true&lt;/code&gt; → &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Using &lt;code&gt;toggle()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Swift provides a cleaner way to flip Booleans using &lt;code&gt;toggle()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;battleWon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;battleWon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;battleWon&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;battleWon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This does the same thing as &lt;code&gt;!&lt;/code&gt;, but reads better in real apps.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;p&gt;Booleans represent &lt;strong&gt;yes/no&lt;/strong&gt;, &lt;strong&gt;on/off&lt;/strong&gt;, &lt;strong&gt;true/false&lt;/strong&gt; decisions.&lt;br&gt;&lt;br&gt;
They power conditions, logic, and flow control🌸✨&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ios</category>
      <category>programming</category>
      <category>swift</category>
    </item>
    <item>
      <title>Swift Is Type-Safe Language</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Fri, 13 Feb 2026 12:44:00 +0000</pubDate>
      <link>https://forem.com/gamya_m/swift-is-type-safe-language-5gnp</link>
      <guid>https://forem.com/gamya_m/swift-is-type-safe-language-5gnp</guid>
      <description>&lt;h1&gt;
  
  
  🌸 Why Swift Is a Type-Safe Language ✨
&lt;/h1&gt;

&lt;p&gt;Swift allows many kinds of data—strings, integers, decimals, booleans, and more.&lt;br&gt;&lt;br&gt;
Once Swift decides what &lt;strong&gt;type&lt;/strong&gt; a variable holds, that type &lt;strong&gt;can never change&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is called &lt;strong&gt;type safety&lt;/strong&gt;, and it’s one of Swift’s biggest strengths.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 How Swift Assigns Types
&lt;/h2&gt;

&lt;p&gt;Swift infers the type from the value you assign:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;flowerCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because &lt;code&gt;42&lt;/code&gt; is a whole number, Swift treats &lt;code&gt;flowerCount&lt;/code&gt; as an &lt;code&gt;Int&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can change the value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;flowerCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But you &lt;strong&gt;cannot change the type&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Type Safety in Action
&lt;/h2&gt;

&lt;p&gt;This is &lt;strong&gt;not allowed&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;span class="n"&gt;flowerCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Forty two"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift won’t let you assign a &lt;code&gt;String&lt;/code&gt; to a variable that was created as an &lt;code&gt;Int&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Why This Matters
&lt;/h2&gt;

&lt;p&gt;As apps grow, keeping track of every variable’s type becomes impossible.&lt;br&gt;&lt;br&gt;
Swift takes that responsibility for you and &lt;strong&gt;prevents bugs before your app runs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Type safety ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Numbers aren’t treated like text&lt;/li&gt;
&lt;li&gt;Decimals aren’t mixed with integers accidentally&lt;/li&gt;
&lt;li&gt;Data stays predictable and reliable&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;p&gt;Type safety means &lt;strong&gt;a variable has one job—and sticks to it&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Swift enforces this rule so your code stays safe, clear, and bug-free 🌸✨&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ios</category>
      <category>programming</category>
      <category>swift</category>
    </item>
    <item>
      <title>Swift needs both Integers and Doubles</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Thu, 12 Feb 2026 12:00:00 +0000</pubDate>
      <link>https://forem.com/gamya_m/swift-needs-both-integers-and-doubles-4010</link>
      <guid>https://forem.com/gamya_m/swift-needs-both-integers-and-doubles-4010</guid>
      <description>&lt;h1&gt;
  
  
  Why Swift Needs Both Integers and Doubles
&lt;/h1&gt;

&lt;p&gt;Swift gives us different number types because &lt;strong&gt;numbers solve different problems&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The two most common ones are &lt;strong&gt;Integers (&lt;code&gt;Int&lt;/code&gt;)&lt;/strong&gt; and &lt;strong&gt;Doubles (&lt;code&gt;Double&lt;/code&gt;)&lt;/strong&gt;—and Swift keeps them separate on purpose.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 Integers vs Doubles
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Integers&lt;/strong&gt; store whole numbers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;petals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;powerLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Doubles&lt;/strong&gt; store decimal numbers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;flowerGrowth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.75&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;animeRating&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;4.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both are numbers, but they behave very differently.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 How Swift Chooses the Type
&lt;/h2&gt;

&lt;p&gt;Swift decides the type based on the value you write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;myInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;      &lt;span class="c1"&gt;// Int&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;myDouble&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="c1"&gt;// Double&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though both represent the number one, they are &lt;strong&gt;not the same type&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Why You Can’t Mix Them
&lt;/h2&gt;

&lt;p&gt;This is &lt;strong&gt;not allowed&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;myInt&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;myDouble&lt;/span&gt; &lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why? Because &lt;code&gt;Double&lt;/code&gt; values can change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;myDouble&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;
&lt;span class="n"&gt;myDouble&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift can’t safely add an integer to a decimal without risking &lt;strong&gt;loss of precision&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is why Swift enforces &lt;strong&gt;type safety&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Explicit Conversion
&lt;/h2&gt;

&lt;p&gt;If you want to combine them, you must be clear about it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;total1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Double&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myInt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;myDouble&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;total2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;myInt&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="kt"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myDouble&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift forces you to &lt;strong&gt;choose how the conversion happens&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Int&lt;/code&gt; is exact and safe for whole numbers
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Double&lt;/code&gt; handles decimals but isn’t perfectly precise
&lt;/li&gt;
&lt;li&gt;Swift keeps them separate to &lt;strong&gt;prevent bugs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It may feel strict at first, but this rule saves you from subtle bugs—just like a disciplined anime sensei 🌸✨&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ios</category>
      <category>programming</category>
      <category>swift</category>
    </item>
    <item>
      <title>Decimals in Swift</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Wed, 11 Feb 2026 12:00:00 +0000</pubDate>
      <link>https://forem.com/gamya_m/decimals-in-swift-kda</link>
      <guid>https://forem.com/gamya_m/decimals-in-swift-kda</guid>
      <description>&lt;h1&gt;
  
  
  🌸 Swift Decimal Numbers✨
&lt;/h1&gt;

&lt;p&gt;When you work with decimal numbers like &lt;code&gt;3.14&lt;/code&gt;, &lt;code&gt;0.5&lt;/code&gt;, or &lt;code&gt;9.99&lt;/code&gt;, Swift uses &lt;strong&gt;floating-point numbers&lt;/strong&gt;, usually of type &lt;code&gt;Double&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Decimals are used for things like ratings, percentages, and measurements.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Creating Decimal Numbers
&lt;/h2&gt;

&lt;p&gt;If a number contains a dot (&lt;code&gt;.&lt;/code&gt;), Swift treats it as a &lt;code&gt;Double&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;animeRating&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;4.5&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;bloomGrowth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.75&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift automatically chooses &lt;code&gt;Double&lt;/code&gt; for decimal values.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Decimal Precision Gotcha
&lt;/h2&gt;

&lt;p&gt;Decimal numbers are &lt;strong&gt;not always perfectly accurate&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.30000000000000004
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This happens because decimals are stored as &lt;strong&gt;binary approximations&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Int vs Double (Type Safety)
&lt;/h2&gt;

&lt;p&gt;Swift does &lt;strong&gt;not&lt;/strong&gt; allow mixing integers and decimals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;episodes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;duration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;

&lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;span class="c1"&gt;// let total = episodes + duration&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must convert explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;total1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Double&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;episodes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;total2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;episodes&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="kt"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is called &lt;strong&gt;type safety&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 How Swift Chooses the Type
&lt;/h2&gt;

&lt;p&gt;Swift decides the type based on the value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;d1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14&lt;/span&gt;   &lt;span class="c1"&gt;// Double&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;d2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.0&lt;/span&gt;    &lt;span class="c1"&gt;// Double&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;i1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;      &lt;span class="c1"&gt;// Int&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once set, a variable &lt;strong&gt;cannot change its type&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Decimal Math
&lt;/h2&gt;

&lt;p&gt;Decimals support the same operators as integers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;flowerRating&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;4.0&lt;/span&gt;

&lt;span class="n"&gt;flowerRating&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;flowerRating&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="n"&gt;flowerRating&lt;/span&gt; &lt;span class="o"&gt;/=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flowerRating&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;p&gt;Decimals in Swift use &lt;code&gt;Double&lt;/code&gt; by default.&lt;br&gt;&lt;br&gt;
They’re powerful and fast, but not always perfectly precise—which is why Swift keeps &lt;code&gt;Int&lt;/code&gt; and &lt;code&gt;Double&lt;/code&gt; strictly separate 🌸✨&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ios</category>
      <category>programming</category>
      <category>swift</category>
    </item>
    <item>
      <title>Integers in Swift</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Tue, 10 Feb 2026 11:00:00 +0000</pubDate>
      <link>https://forem.com/gamya_m/integers-in-swift-4k45</link>
      <guid>https://forem.com/gamya_m/integers-in-swift-4k45</guid>
      <description>&lt;h1&gt;
  
  
  Swift Integers ✨
&lt;/h1&gt;

&lt;p&gt;When you work with whole numbers like &lt;code&gt;3&lt;/code&gt;, &lt;code&gt;42&lt;/code&gt;, or &lt;code&gt;1_000_000&lt;/code&gt;, you’re using &lt;strong&gt;integers&lt;/strong&gt; in Swift (&lt;code&gt;Int&lt;/code&gt; for short).&lt;br&gt;&lt;br&gt;
Integers represent &lt;em&gt;whole&lt;/em&gt; numbers—no decimals.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔹 Creating Integers
&lt;/h2&gt;

&lt;p&gt;Creating an integer looks just like creating a string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;powerLevel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9000&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;flowerCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift integers can be &lt;strong&gt;very large&lt;/strong&gt; and can also be &lt;strong&gt;negative&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Readable Large Numbers
&lt;/h2&gt;

&lt;p&gt;Big numbers are hard to read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;petals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100000000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift lets you use underscores to improve readability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;petals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100_000_000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Underscores are ignored by Swift—they’re just for humans.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Integer Math
&lt;/h2&gt;

&lt;p&gt;Swift supports basic arithmetic operators:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;baseScore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;bonus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;baseScore&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;damage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;baseScore&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;penalty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;baseScore&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;halfPower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;baseScore&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔹 Updating Integers
&lt;/h2&gt;

&lt;p&gt;Instead of rewriting values, you can use &lt;strong&gt;compound assignment operators&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;chakra&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;

&lt;span class="n"&gt;chakra&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="n"&gt;chakra&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;chakra&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;
&lt;span class="n"&gt;chakra&lt;/span&gt; &lt;span class="o"&gt;/=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chakra&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These do the same thing, with less typing.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Useful Integer Checks
&lt;/h2&gt;

&lt;p&gt;Integers have helpful built-in methods, like checking multiples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;petals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;petals&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isMultiple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can even call it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isMultiple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;p&gt;Swift integers are powerful, safe, and easy to work with.  &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ios</category>
      <category>swift</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Strings in Swift</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Mon, 09 Feb 2026 21:05:05 +0000</pubDate>
      <link>https://forem.com/gamya_m/strings-in-swift-4jgh</link>
      <guid>https://forem.com/gamya_m/strings-in-swift-4jgh</guid>
      <description>&lt;h1&gt;
  
  
  🌸 Swift Strings ✨
&lt;/h1&gt;

&lt;p&gt;In Swift, text stored in a variable or constant is called a &lt;strong&gt;string&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Strings are written using &lt;strong&gt;double quotes&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;animeHero&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hinata Hyuga"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;flower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Cherry Blossom 🌸"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔹 Quotes Inside Strings
&lt;/h2&gt;

&lt;p&gt;To include quotes inside a string, escape them with a backslash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;quote&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"She said, &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Every flower blooms in its own time.&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔹 Multi-line Strings
&lt;/h2&gt;

&lt;p&gt;Regular strings cannot span multiple lines.&lt;br&gt;&lt;br&gt;
For longer text, use &lt;strong&gt;triple quotes&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;poem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"""
Petals fall softly,
Anime dreams rise high,
Spring never fades.
"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift keeps line breaks exactly as written.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Common String Operations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Count Characters
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;animeHero&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift correctly counts emoji and Unicode characters.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uppercase Text
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flower&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uppercased&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Prefix &amp;amp; Suffix Checks
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;poem&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasPrefix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Petals"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;flower&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasSuffix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"🌸"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ String comparisons in Swift are &lt;strong&gt;case-sensitive&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 Wrap Up
&lt;/h2&gt;

&lt;p&gt;Swift strings are safe, Unicode-aware, and powerful.&lt;br&gt;&lt;br&gt;
Whether it’s anime dialogue or flower names, Swift handles text beautifully 🌸✨&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>swift</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Variables and Constants in Swift</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Tue, 06 Jan 2026 01:40:50 +0000</pubDate>
      <link>https://forem.com/gamya_m/variables-and-constants-in-swift-2el9</link>
      <guid>https://forem.com/gamya_m/variables-and-constants-in-swift-2el9</guid>
      <description>&lt;h2&gt;
  
  
  Variables and Constants in Swift
&lt;/h2&gt;

&lt;p&gt;Whenever you build software, you need to store information.&lt;/p&gt;

&lt;p&gt;That information could be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A wizard’s name&lt;/li&gt;
&lt;li&gt;A ninja’s village&lt;/li&gt;
&lt;li&gt;Your dog’s breed&lt;/li&gt;
&lt;li&gt;A score, setting, or calculation result&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Swift, storing information starts with two core concepts:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt; and &lt;strong&gt;constants&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s break them down using examples that are a little more fun than usual.&lt;/p&gt;




&lt;h2&gt;
  
  
  Variables: When Your Data Can Change
&lt;/h2&gt;

&lt;p&gt;Here’s a simple Swift variable:&lt;/p&gt;

&lt;p&gt;swift&lt;br&gt;
var wizardName = "Harry Potter"&lt;br&gt;
This creates a variable called wizardName.&lt;/p&gt;

&lt;p&gt;A variable is a piece of data that can change over time as your program runs.&lt;/p&gt;

&lt;p&gt;What’s happening in this line?&lt;/p&gt;

&lt;p&gt;There are four important parts:&lt;/p&gt;

&lt;p&gt;var&lt;br&gt;
Tells Swift you’re creating a variable.&lt;/p&gt;

&lt;p&gt;wizardName&lt;br&gt;
The variable’s name.&lt;br&gt;
You can choose any name, but descriptive names are best.&lt;/p&gt;

&lt;p&gt;= (equals sign)&lt;br&gt;
Assigns a value to the variable.&lt;/p&gt;

&lt;p&gt;"Harry Potter"&lt;br&gt;
A string value — text in Swift is written inside double quotes.&lt;/p&gt;

&lt;p&gt;Swift doesn’t require semicolons at the end of lines, which keeps code clean and readable.&lt;/p&gt;

&lt;p&gt;Changing a Variable’s Value&lt;/p&gt;

&lt;p&gt;Because variables can change, you can update them whenever you want:&lt;br&gt;
var ninjaName = "Naruto Uzumaki"&lt;br&gt;
ninjaName = "Sasuke Uchiha"&lt;br&gt;
ninjaName = "Kakashi Hatake"&lt;br&gt;
What’s happening here?&lt;/p&gt;

&lt;p&gt;The variable starts as "Naruto Uzumaki"&lt;/p&gt;

&lt;p&gt;It’s updated to "Sasuke Uchiha"&lt;/p&gt;

&lt;p&gt;Then updated again to "Kakashi Hatake"&lt;/p&gt;

&lt;p&gt;Important rule:&lt;/p&gt;

&lt;p&gt;You use var only once&lt;/p&gt;

&lt;p&gt;After that, you just change the value&lt;/p&gt;

&lt;p&gt;Each new assignment replaces the previous one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Constants: When Your Data Should Never Change
&lt;/h2&gt;

&lt;p&gt;Some values should never change.&lt;/p&gt;

&lt;p&gt;For those, Swift gives us constants, created using let.&lt;br&gt;
let hogwartsHouse = "Gryffindor"&lt;br&gt;
This creates a constant called hogwartsHouse.&lt;/p&gt;

&lt;p&gt;Once assigned, it cannot be changed.&lt;/p&gt;

&lt;p&gt;If you try, Swift will stop you:&lt;br&gt;
let hokageTitle = "Seventh Hokage"&lt;br&gt;
hokageTitle = "Sixth Hokage"&lt;br&gt;
This will cause an error.&lt;/p&gt;

&lt;p&gt;Why?&lt;br&gt;
Because a constant is meant to stay constant.&lt;/p&gt;

&lt;p&gt;The keyword “let” comes from mathematics—as in “let x be equal to 5.”&lt;br&gt;
Important Rule (Seriously)&lt;/p&gt;

&lt;p&gt;If Xcode shows errors because you tried to change a constant:&lt;/p&gt;

&lt;p&gt;👉 Delete those lines.&lt;br&gt;
Swift is protecting you from bugs.&lt;/p&gt;

&lt;p&gt;Printing Values (Your Best Learning Tool)&lt;/p&gt;

&lt;p&gt;When learning Swift, it’s incredibly helpful to see what’s inside your variables.&lt;/p&gt;

&lt;p&gt;You can do this using print():&lt;br&gt;
var dogBreed = "Golden Retriever"&lt;br&gt;
print(dogBreed)&lt;/p&gt;

&lt;p&gt;dogBreed = "Shiba Inu"&lt;br&gt;
print(dogBreed)&lt;/p&gt;

&lt;p&gt;dogBreed = "Border Collie"&lt;br&gt;
print(dogBreed)&lt;br&gt;
Each print() outputs the current value.&lt;/p&gt;

&lt;p&gt;You won’t use print() much in real apps, but while learning, it’s your best friend.&lt;br&gt;
Prefer Constants Over Variables&lt;/p&gt;

&lt;p&gt;Here’s an important Swift habit to build early:&lt;/p&gt;

&lt;p&gt;Use let by default.&lt;br&gt;
Switch to var only when the value needs to change.&lt;br&gt;
For example:&lt;br&gt;
let animeSeries = "Naruto"&lt;br&gt;
var episodeCount = 1&lt;br&gt;
Why prefer constants?&lt;/p&gt;

&lt;p&gt;Swift can optimize them better&lt;/p&gt;

&lt;p&gt;Your code becomes safer&lt;/p&gt;

&lt;p&gt;You avoid accidental changes&lt;/p&gt;

&lt;p&gt;If something shouldn’t change, make it a constant.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>swift</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why You Should Learn Swift in 2026</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Sun, 04 Jan 2026 05:07:07 +0000</pubDate>
      <link>https://forem.com/gamya_m/why-you-should-learn-swift-in-2026-37ki</link>
      <guid>https://forem.com/gamya_m/why-you-should-learn-swift-in-2026-37ki</guid>
      <description>&lt;h2&gt;
  
  
  Why You Should Learn Swift in 2026
&lt;/h2&gt;

&lt;p&gt;There are &lt;strong&gt;a lot&lt;/strong&gt; of programming languages out there.&lt;/p&gt;

&lt;p&gt;JavaScript, Python, Java, Go, Rust — the list keeps growing. So it’s natural to wonder:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Swift?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this article, I want to explain why learning Swift in &lt;strong&gt;2026&lt;/strong&gt; is still a great choice, especially if you’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Completely new to programming
&lt;/li&gt;
&lt;li&gt;Switching careers into tech
&lt;/li&gt;
&lt;li&gt;Interested in building real apps for Apple platforms
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn’t hype. It’s a practical look at what makes Swift worth learning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Is a Skill That Can Pay the Bills
&lt;/h2&gt;

&lt;p&gt;Let’s be honest — most people don’t learn programming just for fun.&lt;/p&gt;

&lt;p&gt;Swift lets you build apps for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;iOS
&lt;/li&gt;
&lt;li&gt;iPadOS
&lt;/li&gt;
&lt;li&gt;macOS
&lt;/li&gt;
&lt;li&gt;watchOS
&lt;/li&gt;
&lt;li&gt;tvOS
&lt;/li&gt;
&lt;li&gt;visionOS
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Apple ecosystem remains one of the few places where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Users pay for quality apps
&lt;/li&gt;
&lt;li&gt;Indie developers can still succeed
&lt;/li&gt;
&lt;li&gt;iOS developers are consistently in demand
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Swift, you can work at a company, freelance, or ship your own apps.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Is Modern (Without Legacy Baggage)
&lt;/h2&gt;

&lt;p&gt;Swift was introduced in &lt;strong&gt;2014&lt;/strong&gt;, which makes it relatively young compared to many popular languages.&lt;/p&gt;

&lt;p&gt;That’s a good thing.&lt;/p&gt;

&lt;p&gt;Older languages often carry decades of historical decisions and outdated patterns. Swift avoided much of that by learning from what came before.&lt;/p&gt;

&lt;p&gt;In practice, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cleaner syntax
&lt;/li&gt;
&lt;li&gt;Fewer legacy concepts
&lt;/li&gt;
&lt;li&gt;Often &lt;strong&gt;one clear, recommended way&lt;/strong&gt; to solve a problem
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a beginner, this reduces confusion and speeds up learning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Learns From Other Languages’ Mistakes
&lt;/h2&gt;

&lt;p&gt;Swift borrows the best ideas from many languages and avoids many of their pitfalls.&lt;/p&gt;

&lt;p&gt;Some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strong type safety&lt;/strong&gt; to catch mistakes early
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optionals&lt;/strong&gt; to handle missing values safely
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readable syntax&lt;/strong&gt; that favors clarity
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unicode support by default&lt;/strong&gt;, so text “just works”
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Swift actively encourages code that is safer, clearer, and easier to maintain.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Makes Unsafe Code Hard to Write
&lt;/h2&gt;

&lt;p&gt;In many languages, it’s easy to write code that crashes at runtime.&lt;/p&gt;

&lt;p&gt;Swift tries to prevent that.&lt;/p&gt;

&lt;p&gt;Instead of failing mysteriously, Swift pushes many errors to &lt;strong&gt;compile time&lt;/strong&gt;, meaning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Problems are caught earlier
&lt;/li&gt;
&lt;li&gt;Crashes are less common
&lt;/li&gt;
&lt;li&gt;Error messages are clearer
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For beginners, this makes learning far less frustrating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Encourages Readable, Professional Code
&lt;/h2&gt;

&lt;p&gt;Swift is designed so code reads naturally.&lt;/p&gt;

&lt;p&gt;That matters because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’ll read your own code months later
&lt;/li&gt;
&lt;li&gt;You’ll read other people’s code at work
&lt;/li&gt;
&lt;li&gt;Teams value clarity over clever tricks
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Readable code scales better and makes collaboration easier.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Is Just the Language — SwiftUI Builds the App
&lt;/h2&gt;

&lt;p&gt;Swift alone doesn’t draw screens or buttons.&lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;SwiftUI&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;SwiftUI is Apple’s modern UI framework that lets you build:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text and images
&lt;/li&gt;
&lt;li&gt;Buttons and forms
&lt;/li&gt;
&lt;li&gt;Layouts and animations
&lt;/li&gt;
&lt;li&gt;User interactions
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most importantly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;SwiftUI was designed specifically for Swift.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It leverages Swift’s strengths to let you build powerful apps with surprisingly little code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift + SwiftUI = Fast Feedback
&lt;/h2&gt;

&lt;p&gt;One of the most satisfying parts of learning Swift is how quickly you see results.&lt;/p&gt;

&lt;p&gt;You write code.&lt;br&gt;&lt;br&gt;
You run the app.&lt;br&gt;&lt;br&gt;
The UI updates instantly.&lt;/p&gt;

&lt;p&gt;This fast feedback loop makes learning more engaging and motivating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Swift Grows With You
&lt;/h2&gt;

&lt;p&gt;Swift is beginner-friendly, but it doesn’t limit you as you grow.&lt;/p&gt;

&lt;p&gt;Over time, you’ll learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generics
&lt;/li&gt;
&lt;li&gt;Protocol-oriented design
&lt;/li&gt;
&lt;li&gt;Structured concurrency (&lt;code&gt;async/await&lt;/code&gt;, &lt;code&gt;actors&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Architecture patterns
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same language works for beginners and senior engineers alike.&lt;/p&gt;




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

&lt;p&gt;You should learn Swift in 2026 because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s modern without unnecessary complexity
&lt;/li&gt;
&lt;li&gt;It prioritizes safety and clarity
&lt;/li&gt;
&lt;li&gt;It’s beginner-friendly but powerful
&lt;/li&gt;
&lt;li&gt;It pairs beautifully with SwiftUI
&lt;/li&gt;
&lt;li&gt;It lets you build real, polished apps
&lt;/li&gt;
&lt;li&gt;And yes — it can be financially rewarding
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No cruft.&lt;br&gt;&lt;br&gt;
No unnecessary confusion.&lt;br&gt;&lt;br&gt;
Just a lot of power at your fingertips.&lt;/p&gt;

&lt;p&gt;What’s not to like?&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>ios</category>
      <category>swift</category>
    </item>
    <item>
      <title>How to become an iOS developer in 2026</title>
      <dc:creator>Gamya </dc:creator>
      <pubDate>Sat, 03 Jan 2026 11:40:44 +0000</pubDate>
      <link>https://forem.com/gamya_m/how-to-become-an-ios-developer-in-2026-3mhl</link>
      <guid>https://forem.com/gamya_m/how-to-become-an-ios-developer-in-2026-3mhl</guid>
      <description>&lt;p&gt;In this article, I want to walk you through what I believe it takes to become an iOS developer in &lt;strong&gt;2026&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is aimed squarely at two groups of people:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Absolute beginners&lt;/strong&gt; to Swift — people who have never built an iOS app before
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;“False beginners”&lt;/strong&gt; — people who tried learning Swift before but never quite reached the point of getting a job
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No matter where you’re starting from, the goal is the same:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Put yourself in a strong position to apply for a junior iOS developer role — or ship your own apps if that’s your dream.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What We’ll Cover
&lt;/h2&gt;

&lt;p&gt;We’ll look at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;core skills&lt;/strong&gt; you should focus on&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extension skills&lt;/strong&gt; that can set you apart&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Let’s start with the fundamentals.&lt;/p&gt;




&lt;h2&gt;
  
  
  Core Skills You Need in 2026
&lt;/h2&gt;

&lt;p&gt;What is the &lt;strong&gt;absolute minimum&lt;/strong&gt; skill set required to get a junior iOS job today?&lt;/p&gt;

&lt;p&gt;I still think there are &lt;strong&gt;five&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Swift&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SwiftUI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Working with data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version control (Git)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;The list is intentionally short.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why so few?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The more you learn, the more there &lt;em&gt;is&lt;/em&gt; to learn — it’s easy to get stuck in endless “learning mode”&lt;/li&gt;
&lt;li&gt;You’ll almost always join a team with an existing codebase anyway&lt;/li&gt;
&lt;li&gt;Swift and SwiftUI alone can take months to absorb properly&lt;/li&gt;
&lt;li&gt;Most importantly: &lt;strong&gt;these five skills let you build real apps&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your early code won’t be perfect — and that’s fine.&lt;br&gt;&lt;br&gt;
The only way to write good code is to write a lot of bad code first.&lt;/p&gt;




&lt;h2&gt;
  
  
  Learning Swift
&lt;/h2&gt;

&lt;p&gt;Swift is Apple’s core programming language.&lt;/p&gt;

&lt;p&gt;It doesn’t know anything about screens or networking — it’s just &lt;strong&gt;logic&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;li&gt;Types&lt;/li&gt;
&lt;li&gt;Control flow&lt;/li&gt;
&lt;li&gt;Data structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In 2026, Swift is a mature, modern language with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strong type safety&lt;/li&gt;
&lt;li&gt;Optionals&lt;/li&gt;
&lt;li&gt;Protocol-oriented design&lt;/li&gt;
&lt;li&gt;Generics&lt;/li&gt;
&lt;li&gt;Structured concurrency (&lt;code&gt;async/await&lt;/code&gt;, &lt;code&gt;actors&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some parts will click quickly.&lt;br&gt;&lt;br&gt;
Others (like generics or concurrency) will take time.&lt;/p&gt;

&lt;p&gt;That’s normal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You do &lt;strong&gt;not&lt;/strong&gt; need to master Swift before building apps.&lt;br&gt;&lt;br&gt;
You’ll learn most of it &lt;em&gt;while&lt;/em&gt; building.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Learning SwiftUI
&lt;/h2&gt;

&lt;p&gt;SwiftUI is Apple’s modern UI framework for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;iOS&lt;/li&gt;
&lt;li&gt;iPadOS&lt;/li&gt;
&lt;li&gt;macOS&lt;/li&gt;
&lt;li&gt;watchOS&lt;/li&gt;
&lt;li&gt;tvOS&lt;/li&gt;
&lt;li&gt;visionOS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Swift is the language.&lt;br&gt;&lt;br&gt;
SwiftUI is how you describe what your app looks like and how it behaves.&lt;/p&gt;

&lt;p&gt;In 2026, SwiftUI is no longer “new”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s used in production apps (including Apple’s)&lt;/li&gt;
&lt;li&gt;Widgets and many system features are SwiftUI-first&lt;/li&gt;
&lt;li&gt;It’s the default choice for new projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SwiftUI vs UIKit?
&lt;/h3&gt;

&lt;p&gt;UIKit still matters — we’ll talk about it later.&lt;/p&gt;

&lt;p&gt;But for beginners in 2026:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Swift + SwiftUI should be your core stack.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less code for the same result&lt;/li&gt;
&lt;li&gt;Designed for Swift from the ground up&lt;/li&gt;
&lt;li&gt;Cross-platform by default&lt;/li&gt;
&lt;li&gt;Most new platform investment is SwiftUI-first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;UIKit isn’t disappearing — but SwiftUI is where things are going.&lt;/p&gt;




&lt;h2&gt;
  
  
  Networking &amp;amp; Working with Data
&lt;/h2&gt;

&lt;p&gt;These two go hand-in-hand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Networking
&lt;/h3&gt;

&lt;p&gt;Fetching data from the internet or sending data to a server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Working with Data
&lt;/h3&gt;

&lt;p&gt;Turning that raw data into something useful in your app.&lt;/p&gt;

&lt;p&gt;At a junior level, you should be comfortable with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetching JSON using &lt;code&gt;URLSession&lt;/code&gt; and &lt;code&gt;async/await&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Decoding data with &lt;code&gt;Codable&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Displaying it in SwiftUI&lt;/li&gt;
&lt;li&gt;Optionally saving it locally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This fetch → decode → display cycle is a huge part of real-world iOS development.&lt;/p&gt;




&lt;h2&gt;
  
  
  Version Control (Git)
&lt;/h2&gt;

&lt;p&gt;The final core skill isn’t iOS-specific: &lt;strong&gt;Git&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You don’t need to be an expert — just enough to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a repository&lt;/li&gt;
&lt;li&gt;Commit changes&lt;/li&gt;
&lt;li&gt;Push to GitHub/GitLab&lt;/li&gt;
&lt;li&gt;Pull changes&lt;/li&gt;
&lt;li&gt;Resolve simple conflicts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why it matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Teams rely on Git&lt;/li&gt;
&lt;li&gt;Public repos give recruiters something real to review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No one understands all of Git. You just need enough to collaborate safely.&lt;/p&gt;




&lt;h2&gt;
  
  
  After the Core Skills
&lt;/h2&gt;

&lt;p&gt;Once you’re comfortable with those five skills, you’re already able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ship your own apps&lt;/li&gt;
&lt;li&gt;Apply for junior roles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is no secret sixth requirement.&lt;/p&gt;

&lt;p&gt;That said, if you want to go further, there are &lt;strong&gt;extension skills&lt;/strong&gt; that help you stand out.&lt;/p&gt;




&lt;h2&gt;
  
  
  Extension Skills That Level You Up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;UIKit&lt;/li&gt;
&lt;li&gt;Core Data / SwiftData&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;li&gt;Software architecture&lt;/li&gt;
&lt;li&gt;Concurrency &amp;amp; multithreading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren’t required to start — but they matter as you grow.&lt;/p&gt;




&lt;h2&gt;
  
  
  UIKit (Why It Still Matters)
&lt;/h2&gt;

&lt;p&gt;UIKit has been around since 2008 and is still everywhere.&lt;/p&gt;

&lt;p&gt;Why learn it?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Many large apps are UIKit-based&lt;/li&gt;
&lt;li&gt;Some system behaviors are still easier in UIKit&lt;/li&gt;
&lt;li&gt;There’s a massive ecosystem of knowledge around it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why not start with it?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Much more boilerplate than SwiftUI&lt;/li&gt;
&lt;li&gt;Older patterns&lt;/li&gt;
&lt;li&gt;Auto Layout can be mentally exhausting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Build momentum with SwiftUI first.&lt;br&gt;&lt;br&gt;
Add UIKit once you’re comfortable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Persistence: Core Data &amp;amp; SwiftData
&lt;/h2&gt;

&lt;p&gt;Saving and querying data locally becomes essential as apps grow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core Data&lt;/strong&gt;: mature, powerful, widely used&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SwiftData&lt;/strong&gt;: newer, Swift-native, SwiftUI-friendly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don’t need persistence for your first job — but knowing &lt;em&gt;one&lt;/em&gt; of these makes you stronger.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;Testing helps ensure your app behaves correctly as it changes.&lt;/p&gt;

&lt;p&gt;Why it’s not core:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Many apps still have limited test coverage&lt;/li&gt;
&lt;li&gt;Employers prioritize platform knowledge first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My recommendation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build apps&lt;/li&gt;
&lt;li&gt;Add tests to key logic&lt;/li&gt;
&lt;li&gt;Learn unit tests and UI tests gradually&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Software Architecture
&lt;/h2&gt;

&lt;p&gt;Architecture is how you organize code so it scales.&lt;/p&gt;

&lt;p&gt;Early code will be messy — that’s expected.&lt;/p&gt;

&lt;p&gt;Architecture is about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Separating responsibilities&lt;/li&gt;
&lt;li&gt;Reducing coupling&lt;/li&gt;
&lt;li&gt;Making change easier&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you look back at code from 6–12 months ago and cringe — that’s growth.&lt;/p&gt;




&lt;h2&gt;
  
  
  Concurrency
&lt;/h2&gt;

&lt;p&gt;Concurrency lets your app do work without freezing the UI.&lt;/p&gt;

&lt;p&gt;In modern Swift, that means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;async/await&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Task&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;actors&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Learn the basics. Avoid over-engineering.&lt;/p&gt;

&lt;p&gt;Responsive, correct apps matter more than “maximum concurrency”.&lt;/p&gt;




&lt;p&gt;The biggest takeaway?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Progress beats perfection.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




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

&lt;p&gt;You don’t need a degree.&lt;br&gt;&lt;br&gt;
You don’t need a bootcamp.&lt;br&gt;&lt;br&gt;
You don’t need expensive courses.&lt;/p&gt;

&lt;p&gt;You need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistency&lt;/li&gt;
&lt;li&gt;Curiosity&lt;/li&gt;
&lt;li&gt;Patience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you keep building, keep asking questions, and keep showing up — you &lt;em&gt;will&lt;/em&gt; get there.&lt;/p&gt;

&lt;p&gt;Good luck on your journey. 🚀&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>ios</category>
      <category>swift</category>
    </item>
  </channel>
</rss>
