<?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" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarvesh Patel on Medium]]></title>
        <description><![CDATA[Stories by Sarvesh Patel on Medium]]></description>
        <link>https://medium.com/@sp824739?source=rss-5e1ce07f7f29------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HBtfHb_5ax98LnMD5ZsSyA.png</url>
            <title>Stories by Sarvesh Patel on Medium</title>
            <link>https://medium.com/@sp824739?source=rss-5e1ce07f7f29------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:29:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sp824739/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mastering Variables and Constants in Swift: A Beginner’s Guide]]></title>
            <link>https://medium.com/@sp824739/mastering-variables-and-constants-in-swift-a-beginners-guide-535876c0175f?source=rss-5e1ce07f7f29------2</link>
            <guid isPermaLink="false">https://medium.com/p/535876c0175f</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Sarvesh Patel]]></dc:creator>
            <pubDate>Sat, 04 Mar 2023 09:33:42 GMT</pubDate>
            <atom:updated>2023-03-04T09:33:42.169Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zg-keAFGhi_YlSZc2zamQ.png" /></figure><h3><strong>What are variables?</strong></h3><p>A variable is a value that can change, depending on conditions or on information passed to the program.</p><p>Suppose we have to store a person’s age, as we know age will change every year as the person grows.</p><pre>var age = 20</pre><p>After each one year we have to change the person’s age in our program. So we achieve this with the help of variable</p><pre>age = age + 1</pre><p>And so on.</p><p>Here <strong>age</strong> is a variable that stores a person’s age.</p><h3><strong>How to declare variables in swift?</strong></h3><p>In swift programming language we declare variables using <strong>var</strong> keyword.</p><p>Let’s declare variable</p><pre> var name: String<br> var age: Int<br> var isWorkDone: Bool<br> var percentage: Float<br> var dollarPrice: Double</pre><p><strong>Note</strong> : These are data types for now think like data type is used to store specific types of data.</p><ul><li><strong>String</strong> : Used to store text data. Ex, “I am a developer”</li><li><strong>Int</strong> : Used to store integer data. Ex, 1, 0, -1</li><li><strong>Bool</strong>: Used to store true or false</li><li><strong>Float</strong> and <strong>Double</strong>: Used to store decimal numbers. Ex, 20.9, 32.3, 3.141413</li></ul><h3><strong>How to assign data to variables in swift?</strong></h3><p>We can assign data in our variable using assignment <strong>=</strong> operator</p><p>Example :</p><pre>var name: String = &quot;Swift Programming&quot;<br>var age: Int = 20<br>var isWorkDone: Bool = true<br>var percentage: Float = 90.67<br>var dollarPrice: Double = 83.3</pre><p>You can assign data in a variable without mention data type</p><p>Example :</p><pre>var name = &quot;iOS Developer&quot;<br>var age = 20<br>var isWorkDone = true<br>var percentage = 90.67<br>var dollarPrice = 83.3</pre><h3><strong>How to change the data of variables in swift?</strong></h3><p>The best thing with variables are we can change the data associated with them in future</p><p>Suppose you have to store a shop name in our program.</p><pre>var shopName = &quot;Techys&quot;</pre><p>After 3 months you decide to change their name from current to CodeWithSwift and you have to update it in your code.</p><pre>shopName = &quot;CodeWithSwift&quot;</pre><p>With the above line of code your shopName will be changed from <strong>Techys</strong> to <strong>CodeWithSwift</strong></p><h3><strong>4 Rules of naming variables and constants in swift</strong></h3><p>Now we know about variables but we cannot give random names to our variables. There are certain rules that we have to follow.</p><h4><strong>Rule 1</strong></h4><p>Variable names must start with a letter, or underscore _</p><p><strong>For Example :</strong></p><pre>var developer = &quot;iOS Developer&quot;<br>var _developer = &quot;Backend Developer&quot;</pre><h4><strong>Rule 2</strong></h4><p>Variable names must not start with number i.e (0–9)</p><pre>var 4developer = &quot;First developer of our organisation&quot; //It will give you an error</pre><h4><strong>Rule 3</strong></h4><p>Variable names should not be the swift programming reserved keywords i,e var, let, String, Int etc.</p><p>For Example :</p><pre>var var = &quot;Variable&quot; //It will give you an error</pre><h4><strong>Rule 4</strong></h4><p>Special symbols other than underscore (_) are allowed.</p><p>For Example :</p><pre>var swift%programmer = “Swift Programmer ” //It will give you an error</pre><h4><strong>Bonus :</strong></h4><p>Swift is a case sensitive programming language meaning A and a have different meanings.</p><pre>var A = &quot;Capital A&quot;<br>var a = &quot;Small a&quot;</pre><h3><strong>What are constants?</strong></h3><p>A <strong>constant</strong> is a special type of variable whose value cannot be changed throughout the programme.</p><p>Suppose we want to store the date of birth of a person in our programme as we all know <strong>DOB</strong> is a constant meaning cannot be changed.</p><p>A <strong>constant</strong> is a special type of variable whose value cannot be changed throughout the programme.</p><p>Suppose we want to store the date of birth of a person in our programme as we all know <strong>DOB</strong> is a constant meaning cannot be changed.</p><h3><strong>How to declare/assign constants in swift?</strong></h3><p>In swift programming language we declare variables using <strong>let</strong> keyword.</p><p>Let’s declare constant</p><pre>let dateOfBirth: String = &quot;21/01/2003&quot; </pre><h3><strong>Can we change the data of constants in swift?</strong></h3><p>The value of a <strong>constant</strong> cannot be changed.</p><h3><strong>Conclusion</strong></h3><p>Congratulation ✨💫🌟💥🌈, you have just learn the basic concept of swift programming i,e <strong>variable</strong> and <strong>constants</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535876c0175f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Private Libraries Using CocoaPods]]></title>
            <link>https://medium.com/@sp824739/private-libraries-using-cocoapods-b074b64f06d0?source=rss-5e1ce07f7f29------2</link>
            <guid isPermaLink="false">https://medium.com/p/b074b64f06d0</guid>
            <dc:creator><![CDATA[Sarvesh Patel]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 11:08:26 GMT</pubDate>
            <atom:updated>2022-07-25T13:21:50.961Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this Article, I’am going to explain about Private Libraries in iOS Development through Dependency Manager called CocoaPods.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DMwe0Xar-enfrhOxtV3gA.jpeg" /></figure><p>Hello Developers,</p><p>Hope you’re doing awesome😎</p><p>Before starting actual creation of private library.</p><blockquote><strong>WHAT IS PRIVATE LIBRARY</strong></blockquote><p>Private libraries are collection of prewritten code developed by in house developer of an organization to achieve common task.</p><blockquote><strong>WHY DO WE USE PRIVATE LIBRARY IN OUR PROJECT</strong></blockquote><ol><li>No need to rewrite the code multiple time.</li><li>It saves development time.</li><li>Make easy to distribute code within team.</li></ol><blockquote><strong>TYPE OF LIBRARY</strong></blockquote><ol><li>Static Library</li><li>Dynamic Library</li></ol><blockquote><strong>WHAT IS COCOAPODS</strong></blockquote><p>CocoaPods manages library dependencies for your Xcode projects.</p><p>The dependencies for your projects are specified in a single text file called a <strong>Podfile</strong>.</p><p>CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project.</p><p>Ultimately the goal is to improve discoverability of, and engagement in, third party open-source libraries by creating a more centralised ecosystem.</p><p>With this small talk Let’s create our own private cocoapods.</p><blockquote><strong>WARNING!</strong></blockquote><p>Please install cocoapods in your mac first.</p><blockquote><strong>REQUIREMENT</strong></blockquote><p>We need two private repositories</p><ol><li>First Respository is for the code that you want to share with other team. Often called <strong>Pod or Library</strong>.</li><li>Second Respository which includes all the information about that <strong>Pod or Library</strong>. Like name, version, author etc. Often called <strong>PodSpec or Spec</strong>.</li></ol><p>STEP 1</p><p>Create two private repositories with the help of step give below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*tn0MPsDrcj0Fa0D1iCWNzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*5xuqDW67SMJ7rxkjyDo0GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*PmNrKfyQdBTd4kxZjT4_zA.png" /></figure><p>STEP 2</p><p>Create Pod Project</p><p>Type the below command in terminal</p><blockquote><em>pod lib create [POD_NAME]</em></blockquote><p>[POD_NAME] = <a href="https://github.com/sarvesh829/SPCircularImage.git">SPCircularImage</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTgkbF5DK_AmPEXhfLXmrw.png" /></figure><p>This is the new project automatically generated by cocoapods installation utility. After giving all answer on terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUne6WhaUU6rxn_X0D-fQQ.png" /></figure><p>Its time to look inside the file structure . As you can see that S<strong>PCircularImage Folder</strong> and <strong>ReplaceMe File. </strong>We will place our .swift file under this folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*8necg3unVTsFtopJwIyxdQ.png" /></figure><p>For now let’s talk about SPCircularImage.podspec file</p><blockquote><strong>PODSPEC</strong></blockquote><p>A PodSpec, or Spec, describes a version of a Pod or Library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*FFhmedrW5HnL9tD4yMEuug.png" /></figure><p>STEP 2</p><p>Now its time to add your private PodSpec Repository with cocoapods.</p><p>Type the below command in terminal</p><blockquote><em>1. pod repo add [REPOSITORY_NAME] [SOURCE_URL]</em></blockquote><blockquote><em>2. cd ~/.cocoapods/repos/REPOSITORY_NAME<br>3. pod repo lint</em> .</blockquote><p><em>[REPO_NAME] = </em>SPCircularImagePodSpec</p><p><em>[SOURCE_URL] = </em><a href="https://github.com/sarvesh829/SPCircularImagePodSpec.git">https://github.com/sarvesh829/SPCircularImagePodSpec.git</a></p><p>Replace with your PodSpec Repository</p><p>Congratulation 🎉 🎉 You have Successfully linked your PodSpec Repository with Cocoapods installation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b074b64f06d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Programming Language]]></title>
            <link>https://medium.com/@sp824739/swift-programming-language-99945b4f1d55?source=rss-5e1ce07f7f29------2</link>
            <guid isPermaLink="false">https://medium.com/p/99945b4f1d55</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Sarvesh Patel]]></dc:creator>
            <pubDate>Wed, 25 May 2022 11:56:36 GMT</pubDate>
            <atom:updated>2022-05-25T11:56:36.378Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="SWIFT PROGRAMMING IMAGE" src="https://cdn-images-1.medium.com/max/1024/1*IGgxAsJknc4MZCFbhBKkcQ.png" /></figure><p><strong>“Learning never exhausts the mind.” — Leonardo da Vinci</strong></p><h3><strong>What is Swift ?</strong></h3><p>Swift is a new programming language created by Apple Inc. Development of Swift started in <strong>July 2010</strong> by <strong>Chris Lattner</strong>, with the collaboration of many other programmers at Apple.</p><h3>Use of Swift</h3><p>Swift is used for.</p><ol><li><strong>iOS Development</strong></li><li><strong>macOS Development</strong></li><li><strong>watchOS Development</strong></li><li><strong>tvOS Development</strong></li></ol><p>Thanks for reading article 🎉🎉🎉🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99945b4f1d55" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>